diff --git a/config/testdata/post-renderer-kustomize/helmrelease.yaml b/config/testdata/post-renderer-kustomize/helmrelease.yaml index 7ec4b1769..7eee06c70 100644 --- a/config/testdata/post-renderer-kustomize/helmrelease.yaml +++ b/config/testdata/post-renderer-kustomize/helmrelease.yaml @@ -21,7 +21,6 @@ spec: apiVersion: apps/v1 metadata: name: mypodinfo - namespace: helm-system labels: xxxx: yyyy patchesJson6902: @@ -30,7 +29,6 @@ spec: version: v1 kind: Deployment name: mypodinfo - namespace: helm-system patch: - op: add path: /metadata/labels/yyyy diff --git a/docs/spec/v2beta1/helmreleases.md b/docs/spec/v2beta1/helmreleases.md index c1c2078c2..1c320fe59 100644 --- a/docs/spec/v2beta1/helmreleases.md +++ b/docs/spec/v2beta1/helmreleases.md @@ -1092,7 +1092,6 @@ spec: apiVersion: apps/v1 metadata: name: metrics-server - namespace: kube-system spec: template: spec: diff --git a/internal/runner/post_renderer.go b/internal/runner/post_renderer.go index e82f9093d..239bbf123 100644 --- a/internal/runner/post_renderer.go +++ b/internal/runner/post_renderer.go @@ -18,7 +18,7 @@ func newCombinedPostRenderer() combinedPostRenderer { } } -func (c combinedPostRenderer) addRenderer(renderer postrender.PostRenderer) { +func (c *combinedPostRenderer) addRenderer(renderer postrender.PostRenderer) { c.renderers = append(c.renderers, renderer) } diff --git a/internal/runner/post_renderer_kustomize.go b/internal/runner/post_renderer_kustomize.go index a650cdc4c..4945bfdfb 100644 --- a/internal/runner/post_renderer_kustomize.go +++ b/internal/runner/post_renderer_kustomize.go @@ -102,7 +102,7 @@ func (k *postRendererKustomize) Run(renderedManifests *bytes.Buffer) (modifiedMa } // add JSON patches for _, m := range k.spec.PatchesJSON6902 { - patch, err := json.Marshal(m) + patch, err := json.Marshal(m.Patch) if err != nil { return nil, err }