mirror of
https://github.com/k3s-io/k3s.git
synced 2026-02-03 20:39:49 -05:00
Override DefaultHelmJob at build time (#13351)
Some checks are pending
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Some checks are pending
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
* Override DefaultHelmJob at build time * Bump klipper-helm airgap version Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
parent
c0b1314d15
commit
4116b53e86
4 changed files with 8 additions and 5 deletions
|
|
@ -41,8 +41,6 @@ import (
|
|||
clientset "k8s.io/client-go/kubernetes"
|
||||
)
|
||||
|
||||
var DefaultHelmJobImage = "rancher/klipper-helm:v0.9.10-build20251111"
|
||||
|
||||
func ResolveDataDir(dataDir string) (string, error) {
|
||||
dataDir, err := datadir.Resolve(dataDir)
|
||||
return filepath.Join(dataDir, "server"), err
|
||||
|
|
@ -221,11 +219,11 @@ func coreControllers(ctx context.Context, sc *Context, config *Config) error {
|
|||
}
|
||||
|
||||
// Apply SystemDefaultRegistry setting to Helm before starting controllers.
|
||||
// Additionally, set the helm job image to the immutable default image, internally helm-controller default to latest.
|
||||
// Internally helm-controller defaults to latest tag, but we inject a immutable version at build time.
|
||||
if config.ControlConfig.HelmJobImage != "" {
|
||||
helmchart.DefaultJobImage = config.ControlConfig.HelmJobImage
|
||||
} else if config.ControlConfig.SystemDefaultRegistry != "" {
|
||||
helmchart.DefaultJobImage = config.ControlConfig.SystemDefaultRegistry + "/" + DefaultHelmJobImage
|
||||
helmchart.DefaultJobImage = config.ControlConfig.SystemDefaultRegistry + "/" + helmchart.DefaultJobImage
|
||||
}
|
||||
|
||||
if sc.Helm != nil {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
docker.io/rancher/klipper-helm:v0.9.10-build20251111
|
||||
docker.io/rancher/klipper-helm:v0.9.12-build20251215
|
||||
docker.io/rancher/klipper-lb:v0.4.13
|
||||
docker.io/rancher/local-path-provisioner:v0.0.32
|
||||
docker.io/rancher/mirrored-coredns-coredns:1.13.1
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ PKG_CNI_PLUGINS="github.com/containernetworking/plugins"
|
|||
PKG_KUBE_ROUTER="github.com/cloudnativelabs/kube-router/v2"
|
||||
PKG_CRI_DOCKERD="github.com/Mirantis/cri-dockerd"
|
||||
PKG_ETCD="go.etcd.io/etcd"
|
||||
PKG_HELM_CONTROLLER="github.com/k3s-io/helm-controller"
|
||||
|
||||
buildDate=$(date -u '+%Y-%m-%dT%H:%M:%SZ')
|
||||
|
||||
|
|
@ -53,6 +54,8 @@ VERSIONFLAGS="
|
|||
-X ${PKG_CRI_DOCKERD}/cmd/version.BuildTime=${buildDate}
|
||||
|
||||
-X ${PKG_ETCD}/api/v3/version.GitSHA=HEAD
|
||||
|
||||
-X ${PKG_HELM_CONTROLLER}/pkg/controllers/chart.DefaultJobImage=rancher/klipper-helm:${VERSION_HELM_JOB}
|
||||
"
|
||||
if [ -n "${DEBUG}" ]; then
|
||||
GCFLAGS="-N -l"
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ fi
|
|||
|
||||
VERSION_ROOT="v0.15.0"
|
||||
|
||||
VERSION_HELM_JOB="v0.9.12-build20251215"
|
||||
|
||||
DEPENDENCIES_URL="https://raw.githubusercontent.com/kubernetes/kubernetes/${VERSION_K8S}/build/dependencies.yaml"
|
||||
VERSION_GOLANG="go"$(curl -sL "${DEPENDENCIES_URL}" | yq e '.dependencies[] | select(.name == "golang: upstream version").version' -)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue