From 94a2b5e09844764dc0fbbba4cead6c3a594ee6e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Svantesson?= Date: Mon, 29 Apr 2024 10:47:34 +0200 Subject: [PATCH] feat: replace chart --- go.mod | 8 +- go.sum | 15 +-- pkg/cmd/helmfile/resolve/resolve.go | 113 +++++++++++++----- pkg/cmd/helmfile/resolve/resolve_test.go | 4 + .../replace-chart/expected-helmfile.yaml | 5 + .../expected-secret-infra-helmfile.yaml | 17 +++ .../testdata/replace-chart/helmfile.yaml | 7 ++ .../replace-chart/jx-requirements.yml | 15 +++ .../charts/jxgh/pusher-wave/defaults.yaml | 2 + .../versionStream/charts/repositories.yml | 4 + .../charts/wave-k8s/wave/defaults.yaml | 3 + 11 files changed, 140 insertions(+), 53 deletions(-) create mode 100644 pkg/cmd/helmfile/resolve/testdata/replace-chart/expected-helmfile.yaml create mode 100644 pkg/cmd/helmfile/resolve/testdata/replace-chart/expected-secret-infra-helmfile.yaml create mode 100644 pkg/cmd/helmfile/resolve/testdata/replace-chart/helmfile.yaml create mode 100644 pkg/cmd/helmfile/resolve/testdata/replace-chart/jx-requirements.yml create mode 100644 pkg/cmd/helmfile/resolve/testdata/replace-chart/versionStream/charts/jxgh/pusher-wave/defaults.yaml create mode 100644 pkg/cmd/helmfile/resolve/testdata/replace-chart/versionStream/charts/repositories.yml create mode 100644 pkg/cmd/helmfile/resolve/testdata/replace-chart/versionStream/charts/wave-k8s/wave/defaults.yaml diff --git a/go.mod b/go.mod index 418860dbf..3700afe0a 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/jenkins-x-plugins/jx-charter v0.0.28 github.com/jenkins-x/go-scm v1.14.30 github.com/jenkins-x/jx-api/v4 v4.7.4 - github.com/jenkins-x/jx-helpers/v3 v3.4.12 + github.com/jenkins-x/jx-helpers/v3 v3.7.0 github.com/jenkins-x/jx-kube-client/v3 v3.0.4 github.com/jenkins-x/jx-logging/v3 v3.0.9 github.com/jenkins-x/lighthouse-client v0.0.1109 @@ -168,7 +168,6 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/itchyny/gojq v0.9.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/jenkins-x/gen-crd-api-reference-docs v0.1.7 // indirect github.com/jenkins-x/logrus-stackdriver-formatter v0.2.4 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -220,7 +219,6 @@ require ( github.com/rickar/props v0.0.0-20170718221555-0b06aeb2f037 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/russross/blackfriday v1.6.0 // indirect - github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/shopspring/decimal v1.2.0 // indirect @@ -229,7 +227,6 @@ require ( github.com/sirupsen/logrus v1.9.3 // indirect github.com/skeema/knownhosts v1.2.1 // indirect github.com/spf13/cast v1.4.1 // indirect - github.com/src-d/gcfg v1.4.0 // indirect github.com/tatsushid/go-prettytable v0.0.0-20141013043238-ed2d14c29939 // indirect github.com/ulikunitz/xz v0.5.8 // indirect github.com/variantdev/chartify v0.12.0 // indirect @@ -271,15 +268,12 @@ require ( gopkg.in/ini.v1 v1.66.2 // indirect gopkg.in/robfig/cron.v2 v2.0.0-20150107220207-be2e0b0deed5 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect - gopkg.in/src-d/go-git.v4 v4.13.1 // indirect gopkg.in/urfave/cli.v1 v1.20.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.25.2 // indirect k8s.io/cli-runtime v0.28.4 // indirect - k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect - k8s.io/klog v1.0.0 // indirect k8s.io/klog/v2 v2.110.1 // indirect k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect diff --git a/go.sum b/go.sum index c07711281..814b716a0 100644 --- a/go.sum +++ b/go.sum @@ -889,8 +889,6 @@ github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869/go.mod h1:cJ6Cj github.com/jenkins-x-plugins/jx-charter v0.0.28 h1:Pwtcm2L8+xmtboPBIvTsc3jPLEwZuYnzDtBQurdVuv0= github.com/jenkins-x-plugins/jx-charter v0.0.28/go.mod h1:oWhIpQIRc08qikMIH7VF08kQM/onYtU9teWq8eCSaJE= github.com/jenkins-x/gen-crd-api-reference-docs v0.1.6/go.mod h1:a4dzSf/nNLMMMqultm6IlV/04xq26uICEYPkSTOahWQ= -github.com/jenkins-x/gen-crd-api-reference-docs v0.1.7 h1:k6+0411dvhy9ygbCcpKqoFgDwqoaathYevQwOuBtEh4= -github.com/jenkins-x/gen-crd-api-reference-docs v0.1.7/go.mod h1:1ACCcPZWVWTfq6hCJ5m1HSHswQa+T2iiAaJ8dbuTFS4= github.com/jenkins-x/go-scm v1.10.10/go.mod h1:z7xTO9/VzqW3xEbEMH2z5cpOGrZ8+nOHOWfU1ngFGxs= github.com/jenkins-x/go-scm v1.14.30 h1:UWhpY1906IQn4FtFo5CAuhpZtsHLnIjYlKinmDkBvXo= github.com/jenkins-x/go-scm v1.14.30/go.mod h1:9MGEHpudIt+JypKTf4zUHpiRggl5piIb9xcLu+1FrbU= @@ -898,8 +896,8 @@ github.com/jenkins-x/jx-api/v4 v4.1.5/go.mod h1:l11kHlFy40UGu9pdhCRxDiJcEgRubSVz github.com/jenkins-x/jx-api/v4 v4.7.4 h1:b5/UunAUkqIFx2ACTR0EsU6VRlwveOZQtRNQP4kTJWk= github.com/jenkins-x/jx-api/v4 v4.7.4/go.mod h1:WIuWzQkBOIlEdyPIcdqGzvtJDPUmlEkpPjjyHFOFle0= github.com/jenkins-x/jx-helpers/v3 v3.0.127/go.mod h1:0U5fcXnqSv5ugx+XMZ2rYT+VU3o+pyJeXJEiNMAVeSU= -github.com/jenkins-x/jx-helpers/v3 v3.4.12 h1:Avx1/KxyFxIhvpOr7J6Dn0WvcZmsm1i7ZFXmRd/WhZc= -github.com/jenkins-x/jx-helpers/v3 v3.4.12/go.mod h1:/2n7uMXbbLp1V9fG1fnf7ngdu3vGQFSMYnglY4oKx7c= +github.com/jenkins-x/jx-helpers/v3 v3.7.0 h1:vrcE9G2xuRZFy3R4ikoQ3gNh5erJv0QHQAABEWo/9tY= +github.com/jenkins-x/jx-helpers/v3 v3.7.0/go.mod h1:3VlqQ/FtxJo/pElOvYDFQ5lwuICC8iltpSpFy77imq0= github.com/jenkins-x/jx-kube-client/v3 v3.0.2/go.mod h1:C/mKnCT5wvolX61eLKJVBNev9sqnkGNpi4skTQ1Gr3Q= github.com/jenkins-x/jx-kube-client/v3 v3.0.4 h1:/MbqKke3q9/JYrXCHCyqDXiyD0ybnouK7fIfCPCJ/Ck= github.com/jenkins-x/jx-kube-client/v3 v3.0.4/go.mod h1:suKBiBs7DKHzOEyhcsr5QhFs/Wcm0agLFMoYlIf3bPA= @@ -1309,7 +1307,6 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -1380,7 +1377,6 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/src-d/gcfg v1.4.0 h1:xXbNR5AlLSA315x2UO+fTSSAXCDf+Ar38/6oyGbDKQ4= github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -2140,7 +2136,6 @@ gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= -gopkg.in/src-d/go-git.v4 v4.13.1 h1:SRtFyV8Kxc0UP7aCHcijOMQGPxHSmMOPrzulQWolkYE= gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -2212,19 +2207,13 @@ k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8 k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/gengo v0.0.0-20230306165830-ab3349d207d4/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks= -k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.2.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= diff --git a/pkg/cmd/helmfile/resolve/resolve.go b/pkg/cmd/helmfile/resolve/resolve.go index 59b41cda1..72a4757d9 100644 --- a/pkg/cmd/helmfile/resolve/resolve.go +++ b/pkg/cmd/helmfile/resolve/resolve.go @@ -470,40 +470,9 @@ func (o *Options) resolveHelmfile(helmState *state.HelmState, helmfile helmfiles // lets look for an override version label if stringhelpers.StringArrayIndex(ignoreRepositories, repository) < 0 && !IsLabelValue(&release, helmhelpers.VersionLabel, helmhelpers.LockLabelValue) { - // first try and match using the prefix and release name as we might have a version stream folder that uses helm alias - versionProperties, err := o.Options.Resolver.StableVersion(versionstream.KindChart, prefix+"/"+release.Name) + err = o.updateRelease(helmState, prefix, &release, fullChartName, repository, helmfile) if err != nil { - return errors.Wrapf(err, "failed to find version number for chart %s", release.Name) - } - - // lets fall back to using the full chart name - if versionProperties.Version == "" { - versionProperties, err = o.Options.Resolver.StableVersion(versionstream.KindChart, fullChartName) - if err != nil { - return errors.Wrapf(err, "failed to find version number for chart %s", fullChartName) - } - } - - version := versionProperties.Version - - if release.Version == "" && version == "" { - log.Logger().Debugf("could not find version for chart %s so using latest found in helm repository %s", fullChartName, repository) - } - - versionChanged := false - if release.Version == "" { - release.Version = version - versionChanged = true - } else if o.UpdateMode && release.Version != version && version != "" { - release.Version = version - versionChanged = true - } - if versionChanged { - log.Logger().Debugf("resolved chart %s version %s", fullChartName, version) - } - - if release.Namespace == "" && helmState.OverrideNamespace == "" && versionProperties.Namespace != "" { - release.Namespace = versionProperties.Namespace + return err } } } @@ -578,6 +547,84 @@ func (o *Options) resolveHelmfile(helmState *state.HelmState, helmfile helmfiles return nil } +func (o *Options) updateRelease(helmState *state.HelmState, prefix string, release *state.ReleaseSpec, fullChartName, repository string, helmfile helmfiles.Helmfile) error { + // first try and match using the prefix and release name as we might have a version stream folder that uses helm alias + versionProperties, err := o.Options.Resolver.StableVersion(versionstream.KindChart, prefix+"/"+release.Name) + if err != nil { + return errors.Wrapf(err, "failed to find version number for chart %s", release.Name) + } + if versionProperties.ReplacementChart != "" && (release.Version == "" || o.UpdateMode) { + release.Name = versionProperties.ReplacementChart + if versionProperties.ReplacementChartPrefix != "" { + prefix = versionProperties.ReplacementChartPrefix + newChart := fmt.Sprintf("%s/%s", prefix, versionProperties.ReplacementChart) + // Checking that replacement chart doesn't already exist in helmfile + for i := range helmState.Releases { + existingRelease := helmState.Releases[i] + if existingRelease.Chart == newChart { + log.Logger().Warningf("Can't replace %s with %s since %s already exist in helmfile. You should probably remove %s from %s yourself.", release.Chart, newChart, newChart, release.Chart, helmfile.Filepath) + return nil + } + } + release.Chart = newChart + + // let's make sure we have the repository + found := false + for k := range helmState.Repositories { + repo := helmState.Repositories[k] + if repo.Name == versionProperties.ReplacementChartPrefix { + found = true + break + } + } + if !found { + repository, err = versionstreamer.MatchRepositoryPrefix(o.prefixes, versionProperties.ReplacementChartPrefix) + if err != nil { + return err + } + helmState.Repositories = append(helmState.Repositories, state.RepositorySpec{ + Name: versionProperties.ReplacementChartPrefix, + URL: repository, + }) + } + } + log.Logger().Debugf("replacing chart %s with %s", fullChartName, release.Chart) + return o.updateRelease(helmState, prefix, release, release.Chart, repository, helmfile) + } + + // Only falling back if the file for the alias exists, but doesn't contain version. Weird... + // lets fall back to using the full chart name + if versionProperties.Version == "" { + versionProperties, err = o.Options.Resolver.StableVersion(versionstream.KindChart, fullChartName) + if err != nil { + return errors.Wrapf(err, "failed to find version number for chart %s", fullChartName) + } + } + + version := versionProperties.Version + + if release.Version == "" && version == "" { + log.Logger().Debugf("could not find version for chart %s so using latest found in helm repository %s", fullChartName, repository) + } + + versionChanged := false + if release.Version == "" { + release.Version = version + versionChanged = true + } else if o.UpdateMode && release.Version != version && version != "" { + release.Version = version + versionChanged = true + } + if versionChanged { + log.Logger().Debugf("resolved chart %s version %s", fullChartName, version) + } + + if release.Namespace == "" && helmState.OverrideNamespace == "" && versionProperties.Namespace != "" { + release.Namespace = versionProperties.Namespace + } + return nil +} + // IsLabelValue returns true if the release is labelled with the given label with a value func IsLabelValue(release *state.ReleaseSpec, label, value string) bool { answer := false diff --git a/pkg/cmd/helmfile/resolve/resolve_test.go b/pkg/cmd/helmfile/resolve/resolve_test.go index 40da0370c..23f7fd4f8 100644 --- a/pkg/cmd/helmfile/resolve/resolve_test.go +++ b/pkg/cmd/helmfile/resolve/resolve_test.go @@ -75,6 +75,10 @@ func TestStepHelmfileResolve(t *testing.T) { folder: "helmfile_multi_subfolder", namespaces: []string{"kuberhealthy", "secret-infra"}, }, + { + folder: "replace-chart", + namespaces: []string{"secret-infra"}, + }, } // lets find the helm binary on the $PATH or download a plugin if inside CI/CD diff --git a/pkg/cmd/helmfile/resolve/testdata/replace-chart/expected-helmfile.yaml b/pkg/cmd/helmfile/resolve/testdata/replace-chart/expected-helmfile.yaml new file mode 100644 index 000000000..95161a21f --- /dev/null +++ b/pkg/cmd/helmfile/resolve/testdata/replace-chart/expected-helmfile.yaml @@ -0,0 +1,5 @@ +filepath: "" +helmfiles: +- path: helmfiles/secret-infra/helmfile.yaml +templates: {} +renderedvalues: {} \ No newline at end of file diff --git a/pkg/cmd/helmfile/resolve/testdata/replace-chart/expected-secret-infra-helmfile.yaml b/pkg/cmd/helmfile/resolve/testdata/replace-chart/expected-secret-infra-helmfile.yaml new file mode 100644 index 000000000..7d3922d95 --- /dev/null +++ b/pkg/cmd/helmfile/resolve/testdata/replace-chart/expected-secret-infra-helmfile.yaml @@ -0,0 +1,17 @@ +filepath: "" +environments: + default: + values: + - jx-values.yaml +namespace: secret-infra +repositories: +- name: wave-k8s + url: https://wave-k8s.github.io/wave/ +releases: +- chart: wave-k8s/wave + version: 3.0.0 + name: wave + values: + - jx-values.yaml +templates: {} +renderedvalues: {} \ No newline at end of file diff --git a/pkg/cmd/helmfile/resolve/testdata/replace-chart/helmfile.yaml b/pkg/cmd/helmfile/resolve/testdata/replace-chart/helmfile.yaml new file mode 100644 index 000000000..5012faeef --- /dev/null +++ b/pkg/cmd/helmfile/resolve/testdata/replace-chart/helmfile.yaml @@ -0,0 +1,7 @@ +releases: + - chart: jxgh/pusher-wave + name: pusher-wave + version: 1.2.3 +repositories: + - name: jxgh + url: https://jenkins-x-charts.github.io/repo diff --git a/pkg/cmd/helmfile/resolve/testdata/replace-chart/jx-requirements.yml b/pkg/cmd/helmfile/resolve/testdata/replace-chart/jx-requirements.yml new file mode 100644 index 000000000..ddad44257 --- /dev/null +++ b/pkg/cmd/helmfile/resolve/testdata/replace-chart/jx-requirements.yml @@ -0,0 +1,15 @@ +apiVersion: core.jenkins-x.io/v4beta1 +kind: Requirements +spec: + autoUpdate: + enabled: false + schedule: "" + cluster: + clusterName: mycluster + project: myproject + provider: gke + ingress: + domain: "" + externalDNS: false + namespaceSubDomain: "" + vault: {} diff --git a/pkg/cmd/helmfile/resolve/testdata/replace-chart/versionStream/charts/jxgh/pusher-wave/defaults.yaml b/pkg/cmd/helmfile/resolve/testdata/replace-chart/versionStream/charts/jxgh/pusher-wave/defaults.yaml new file mode 100644 index 000000000..445c1908e --- /dev/null +++ b/pkg/cmd/helmfile/resolve/testdata/replace-chart/versionStream/charts/jxgh/pusher-wave/defaults.yaml @@ -0,0 +1,2 @@ +replacementChart: wave +replacementChartPrefix: wave-k8s diff --git a/pkg/cmd/helmfile/resolve/testdata/replace-chart/versionStream/charts/repositories.yml b/pkg/cmd/helmfile/resolve/testdata/replace-chart/versionStream/charts/repositories.yml new file mode 100644 index 000000000..0831ab81e --- /dev/null +++ b/pkg/cmd/helmfile/resolve/testdata/replace-chart/versionStream/charts/repositories.yml @@ -0,0 +1,4 @@ +repositories: +- prefix: wave-k8s + urls: + - https://wave-k8s.github.io/wave/ \ No newline at end of file diff --git a/pkg/cmd/helmfile/resolve/testdata/replace-chart/versionStream/charts/wave-k8s/wave/defaults.yaml b/pkg/cmd/helmfile/resolve/testdata/replace-chart/versionStream/charts/wave-k8s/wave/defaults.yaml new file mode 100644 index 000000000..4689870f8 --- /dev/null +++ b/pkg/cmd/helmfile/resolve/testdata/replace-chart/versionStream/charts/wave-k8s/wave/defaults.yaml @@ -0,0 +1,3 @@ +gitUrl: https://github.com/wave-k8s/wave +namespace: secret-infra +version: 3.0.0