Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

feat: replace text with missing replace results in hard-coded values #298

Open
scottd018 opened this issue Jun 10, 2022 · 0 comments
Open

Comments

@scottd018
Copy link
Contributor

scottd018 commented Jun 10, 2022

When using the replace function of a marker, with the missing replace string, the values become hard-coded.

Given the following markers:

    # +operator-builder:field:name=google.region,type=string,replace=GOOGLE_LOCATION,default=us-east1
    # +operator-builder:field:name=clusterName,type=string,replace=GOOGLE_KMS_KEY_RING,default=cluster-key-ring
    # +operator-builder:field:name=clusterName,type=string,replace=GOOGLE_KMS_KEY,default=cluster-key
    # +operator-builder:collection:field:name=google.project,type=string,replace=GOOGLE_PROJECT,default=my-project
    keyName: projects/my-project/locations/us-east1/keyRings/cluster-key-ring/cryptoKeys/cluster-key
    state: ENCRYPTED

Would result in:

    keyName: "projects/my-project/locations/us-east1/keyRings/cluster-key-ring/cryptoKeys/cluster-key",
    state: "ENCRYPTED"

We should error out and let the user know that they have made a mistake with their markers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant