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

feat: truthy statements and integers should have an override #115

Open
scottd018 opened this issue Jan 25, 2022 · 6 comments
Open

feat: truthy statements and integers should have an override #115

scottd018 opened this issue Jan 25, 2022 · 6 comments

Comments

@scottd018
Copy link
Contributor

When using other systems like Kubernetes, there should be an override when using -S doubleQuoted to override that setting for integers and truthy statements:

error validating "STDIN": error validating data: ValidationError(Certificate.spec.isCA): invalid type for io.cert-manager.v1.Certificate.spec.isCA: got "string", expected "boolean"; if you choose to ignore these errors, turn validation off with --validate=false
Error from server (Invalid): error when creating "STDIN": Namespace "saas-watch" is invalid: metadata.labels: Invalid value: "us‑gov‑west‑1": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')
Error from server (NotFound): error when creating "STDIN": namespaces "saas-watch" not found
make: *** [deploy-backend] Error 1
@ahuffman
Copy link
Contributor

@scottd018
Copy link
Contributor Author

scottd018 commented Jan 25, 2022

@ahuffman I didn't but I just tried again with the same result:

Error:

Error from server (BadRequest): error when creating "STDIN": Secret in version "v1" cannot be handled as a Secret: v1.Secret.StringData: ReadString: expects " or n, but found t, error found in #10 byte of ...|ASSWORD":true,"RABBI|..., bigger context ...|_PASSWORD":"rabbitmq","RABBITMQ_SECURE_PASSWORD":true,"RABBITMQ_USERNAME":"rabbitmq"}}

Task:

      - name: "ensure the rabbitmq secure password is output as a string"
        query: stringData.RABBITMQ_SECURE_PASSWORD
        value: !!str "%v"

Output:

ENVIRONMENT=dev make overlay-backend | grep SECURE
  RABBITMQ_SECURE_PASSWORD: yes

Manifest:

stringData:
  RABBITMQ_SECURE_PASSWORD: "yes"

@ahuffman
Copy link
Contributor

Thanks for the further details. Have you tried running without the extra formatting option -S?

@scottd018
Copy link
Contributor Author

Yep. I've tried it with all available options. It's almost like truthy values are ignored when attempting to type convert

@ahuffman
Copy link
Contributor

Interesting, what's the original manifest look like?

@ahuffman
Copy link
Contributor

@JefeDavis any thoughts on this one?

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

2 participants