-
Notifications
You must be signed in to change notification settings - Fork 148
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
[Helm] Implement values.schema.json #5535
[Helm] Implement values.schema.json #5535
Conversation
This pull request does not have a backport label. Could you fix it @pkoutsovasilis? 🙏
|
|
e8f34e4
to
4f9ae86
Compare
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a quick glance at the values.schema.json
for a couple of validations that were moved from the helm template itself and it looks consistent.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
…better validation
553613f
to
e4f3207
Compare
Quality Gate passedIssues Measures |
* feat: implement values.schema.json for elastic-agent helm chart * fix: update rendered examples to latest elastic-agent version * feat: split ESPlainAuth into ESPlainAuthBasic and ESPlainAuthAPI for better validation * fix: omit redundant keys for ESSecretAuthBasic and ESSecretAuthAPI * fix: update output type in TestKubernetesAgentHelm according to new values.schema.json (cherry picked from commit 5c24129)
* feat: implement values.schema.json for elastic-agent helm chart * fix: update rendered examples to latest elastic-agent version * feat: split ESPlainAuth into ESPlainAuthBasic and ESPlainAuthAPI for better validation * fix: omit redundant keys for ESSecretAuthBasic and ESSecretAuthAPI * fix: update output type in TestKubernetesAgentHelm according to new values.schema.json (cherry picked from commit 5c24129)
* feat: implement values.schema.json for elastic-agent helm chart * fix: update rendered examples to latest elastic-agent version * feat: split ESPlainAuth into ESPlainAuthBasic and ESPlainAuthAPI for better validation * fix: omit redundant keys for ESSecretAuthBasic and ESSecretAuthAPI * fix: update output type in TestKubernetesAgentHelm according to new values.schema.json (cherry picked from commit 5c24129) Co-authored-by: Panos Koutsovasilis <[email protected]>
* feat: implement values.schema.json for elastic-agent helm chart * fix: update rendered examples to latest elastic-agent version * feat: split ESPlainAuth into ESPlainAuthBasic and ESPlainAuthAPI for better validation * fix: omit redundant keys for ESSecretAuthBasic and ESSecretAuthAPI * fix: update output type in TestKubernetesAgentHelm according to new values.schema.json
What does this PR do?
This PR does the following:
value.schema.json
inside the chart which is used by Helm to validate the input values.yamlhostNetwork
as an option in an Agent presetWhy is it important?
By having a
value.schema.json
we can reduce validation checks inside the templates of the Helm chart (less ifs inside templates). Furthermore, many text editors/IDEs offer the capability to import the schema and hence get hints and proposal write writing avalues.yaml
for the Helm chartChecklist
I have made corresponding changes to the documentationI have added tests that prove my fix is effective or that my feature worksI have added an entry in./changelog/fragments
using the changelog toolI have added an integration test or an E2E testDisruptive User Impact
N/A
How to test this PR locally
Checking validation
run the following which is actually missing required values
helm template test ./deploy/helm/elastic-agent --set kubernetes.enabled=true --set outputs.default.type=ESSecretAuthBasic --set agent.fleet.enabled=true --set agent.fleet.token=""
you should see the following errors
Checking hints
# yaml-language-server: $schema=elastic-agent/deploy/helm/elastic-agent/values.schema.json
Related issues
N/A