Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adjust values.schema.json to support client credentials in config or envs [PC-12120] #24

Merged
merged 2 commits into from
Feb 21, 2024

Conversation

mkaras-nobl9
Copy link
Contributor

Summary

  • valid value files are:

    deployment:
      extraEnvs:
       - name: N9_CLIENT_ID
         valueFrom:
           secretKeyRef:
             key: client_id
             name: my-existing-secret
       - name: N9_CLIENT_SECRET
         valueFrom:
           secretKeyRef:
             key: client_secret
             name: my-existing-secret
    

    or

    config:
      clientId: "theClientId"
      clientSecret: "theClientSecret"
    
  • when env and config are missing, validation expects config values to be present

Error: INSTALLATION FAILED: values don't meet the specifications of the schema(s) in the following chart(s):
nobl9-agent:
- (root): Must validate "else" as "if" was not valid
- config.clientSecret: Invalid type. Expected: string, given: null
- (root): Must validate "else" as "if" was not valid
- config.clientId: Invalid type. Expected: string, given: null
- (root): Must validate all the schemas (allOf)
  • when both env and config are passed, it expects config values to be null
Error: INSTALLATION FAILED: values don't meet the specifications of the schema(s) in the following chart(s):
nobl9-agent:
- (root): Must validate "then" as "if" was valid
- config.clientSecret: Invalid type. Expected: null, given: string
- (root): Must validate "then" as "if" was valid
- config.clientId: Invalid type. Expected: null, given: string
- (root): Must validate all the schemas (allOf)

@mkaras-nobl9 mkaras-nobl9 requested review from a team as code owners February 21, 2024 09:55
Copy link
Contributor

@triluch triluch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still has "object" types where there are arrays - extraVolumeMounts for example.
Please also test extraEnvs with other possible combinations - for example fieldRef or configMap sources.

@mkaras-nobl9 mkaras-nobl9 requested a review from triluch February 21, 2024 12:07
@mkaras-nobl9 mkaras-nobl9 merged commit e9a220d into main Feb 21, 2024
4 checks passed
@mkaras-nobl9 mkaras-nobl9 deleted the PC-12120-adjust-json-schema-to-support-envs branch February 21, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants