원클릭으로
bump-kubetail
// Bump kubetail components (dashboard, cluster-api, cluster-agent) to their latest releases and update config variables
// Bump kubetail components (dashboard, cluster-api, cluster-agent) to their latest releases and update config variables
| name | bump-kubetail |
| description | Bump kubetail components (dashboard, cluster-api, cluster-agent) to their latest releases and update config variables |
| disable-model-invocation | true |
Bump the kubetail components (dashboard, cluster-api, cluster-agent) to their latest releases and update config variables as needed.
The helm-charts repo manages the kubetail Helm chart with three main components:
| Component | Image tag location in values.yaml | Config struct source |
|---|---|---|
| dashboard | kubetail.dashboard.image.tag | modules/dashboard/pkg/config/config.go |
| cluster-api | kubetail.clusterAPI.image.tag | modules/cluster-api/pkg/config/config.go |
| cluster-agent | kubetail.clusterAgent.image.tag | crates/cluster_agent/src/config.rs |
The source code is available at https://github.com/kubetail-org/kubetail. Git tags follow the pattern <component>/v<semver> (e.g., dashboard/v0.10.1, cluster-api/v0.5.3, cluster-agent/v0.6.2).
Runtime config for each component is rendered via Helm ConfigMap templates:
| Component | ConfigMap template | Values path |
|---|---|---|
| dashboard | charts/kubetail/templates/dashboard/config-map.yaml | kubetail.dashboard.runtimeConfig |
| cluster-api | charts/kubetail/templates/cluster-api/config-map.yaml | kubetail.clusterAPI.runtimeConfig |
| cluster-agent | charts/kubetail/templates/cluster-agent/config-map.yaml | kubetail.clusterAgent.runtimeConfig |
First, determine which remote points to kubetail-org/helm-charts:
git remote -v | grep 'kubetail-org/helm-charts.*fetch'
Use that remote name (e.g., origin, upstream, etc.) for all subsequent commands. Call it <remote>.
Then run in parallel:
git fetch <remote>git branch --show-currentThen check if the current branch is behind <remote>/main:
git log HEAD..<remote>/main --oneline
Read charts/kubetail/values.yaml and extract the current image tags:
kubetail.dashboard.image.tag (e.g., "0.10.1")kubetail.clusterAPI.image.tag (e.g., "0.5.3")kubetail.clusterAgent.image.tag (e.g., "0.6.2")Use the GitHub API to list tags for each component:
gh api repos/kubetail-org/kubetail/git/matching-refs/tags/dashboard/v --jq '.[].ref' | sed 's|refs/tags/dashboard/v||' | grep -v '\-rc' | sort -V | tail -1
gh api repos/kubetail-org/kubetail/git/matching-refs/tags/cluster-api/v --jq '.[].ref' | sed 's|refs/tags/cluster-api/v||' | grep -v '\-rc' | sort -V | tail -1
gh api repos/kubetail-org/kubetail/git/matching-refs/tags/cluster-agent/v --jq '.[].ref' | sed 's|refs/tags/cluster-agent/v||' | grep -v '\-rc' | sort -V | tail -1
Take the highest non-rc version for each component.
For each component where the version has changed, use the GitHub compare API to diff the config struct between the old and new tags:
Dashboard (Go):
gh api repos/kubetail-org/kubetail/compare/dashboard/v<old>...dashboard/v<new> --jq '.files[] | select(.filename == "modules/dashboard/pkg/config/config.go") | .patch'
Cluster API (Go):
gh api repos/kubetail-org/kubetail/compare/cluster-api/v<old>...cluster-api/v<new> --jq '.files[] | select(.filename == "modules/cluster-api/pkg/config/config.go") | .patch'
Cluster Agent (Rust):
gh api repos/kubetail-org/kubetail/compare/cluster-agent/v<old>...cluster-agent/v<new> --jq '.files[] | select(.filename == "crates/cluster_agent/src/config.rs") | .patch'
Also fetch the current config struct at the new tag and read the current Helm ConfigMap template + values to understand all available options:
gh api repos/kubetail-org/kubetail/contents/<path>?ref=<component>/v<new> --jq '.content' | base64 -d
For each config diff:
runtimeConfig values structure. If the new fields can be added as simple key-value pairs under the existing runtimeConfig hierarchy, propose the additions.runtimeConfig in values.yaml.Collect all proposed config changes and present them to the user for approval before making any edits. Show a clear diff-like summary of what will change.
After the user approves (or modifies) the config proposals:
Update image tags in charts/kubetail/values.yaml -- replace the old tag value with the new one for each component that changed.
Apply config changes to charts/kubetail/values.yaml -- add/remove/modify runtimeConfig fields as approved.
Update charts/kubetail/Chart.yaml — determine the bump severity by looking at the semver change across all components:
appVersion and version major.appVersion and version minor.appVersion and version patch.Both version and appVersion get the same bump level and stay in sync.
Summarize what was changed:
version and appVersion-rc) when determining the latest version.<REPLACE_ME> and call them out to the user.validate:"required" tags -- these fields must have values.#[serde(default)] and Option<T> types to determine which fields are optional.