refactor(kubeaid-agent): make the exporters local subcharts - #220
Merged
Conversation
Moves the two exporters into charts/security-exporter and charts/backup-exporter,
each with its own Chart.yaml, values.yaml and templates/. The parent's
templates/ drops from 26 files to 8, and its values.yaml from 584 lines to 170.
They resolve from the working tree: no repository field, no Chart.lock, no
`helm dependency update`. This is NOT the pattern used for vendored upstream
charts, where the source is checked in twice -- nothing here is duplicated.
Two bugs the flat layout had introduced come out in the wash, both invisible
until now because backup-exporter defaults to off:
- Its image tag is restored. image.tag defaults to .Chart.AppVersion, which
after the fold-in was kubeaid-agent's "0.0.3" rather than backup-exporter's
own "v1.2.2" -- so enabling it would have pulled a tag that does not exist.
The subchart carries its original version and appVersion again.
- Its container was named kubeaid-agent, from .Chart.Name. Inside a subchart
that is backup-exporter, which is also why app.kubernetes.io/name -- the
label kubeaid-agent and kubeaid-cli discover this exporter by -- is now
correct by construction instead of pinned by hand.
Values keys follow the subchart names: securityExporter -> security-exporter,
backupExporter -> backup-exporter. An alias would have kept the old camelCase,
but it rewrites .Chart.Name to the alias too, which puts that discovery label
back at risk; the rename is the safer trade.
The promtool workflow follows the templates into the subchart and now enables
backup-exporter explicitly, since the rules no longer render by default.
Verified by rendering master and this branch and diffing the objects: same 16
objects by default and 25 with backup-exporter enabled, none missing, none new,
and no difference beyond metadata.labels -- where helm.sh/chart now names the
subchart -- plus the two backup-exporter fixes above.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves the two exporters into charts/security-exporter and charts/backup-exporter, each with its own Chart.yaml, values.yaml and templates/. The parent's templates/ drops from 26 files to 8, and its values.yaml from 584 lines to 170.
They resolve from the working tree: no repository field, no Chart.lock, no
helm dependency update. This is NOT the pattern used for vendored upstream charts, where the source is checked in twice -- nothing here is duplicated.Two bugs the flat layout had introduced come out in the wash, both invisible until now because backup-exporter defaults to off:
Values keys follow the subchart names: securityExporter -> security-exporter, backupExporter -> backup-exporter. An alias would have kept the old camelCase, but it rewrites .Chart.Name to the alias too, which puts that discovery label back at risk; the rename is the safer trade.
The promtool workflow follows the templates into the subchart and now enables backup-exporter explicitly, since the rules no longer render by default.
Verified by rendering master and this branch and diffing the objects: same 16 objects by default and 25 with backup-exporter enabled, none missing, none new, and no difference beyond metadata.labels -- where helm.sh/chart now names the subchart -- plus the two backup-exporter fixes above.