fix(template): drop extra blank line before document separators

helm template stdout in v4.2.0+ emits a blank line before each --- when
the rendered document already ends with a newline. The extra line comes
from writing "%s\n" after SplitManifests started preserving trailing
newlines (needed for YAML |+ chomping).

Trim a single trailing newline before writing so documents still end
with exactly one newline and extra trailing newlines are preserved.

Fixes #32565

Signed-off-by: elix3r <157088510+22elix3r@users.noreply.github.com>
pull/32580/head
elix3r 1 month ago
parent d62bee21c2
commit fbda217620

@ -270,6 +270,14 @@ func splitAndDeannotate(postrendered, fallbackPrefix string) (map[string]string,
return reconstructed, nil return reconstructed, nil
} }
// writeSourceManifest writes a YAML document with a --- separator and source
// comment. One trailing newline is trimmed from content so the format's final
// \n does not create a blank line before the next --- (issue 32565). Extra
// trailing newlines, such as those required by YAML |+ chomping, are kept.
func writeSourceManifest(w io.Writer, name, content string) {
fmt.Fprintf(w, "---\n# Source: %s\n%s\n", name, strings.TrimSuffix(content, "\n"))
}
// renderResources renders the templates in a chart // renderResources renders the templates in a chart
// //
// TODO: This function is badly in need of a refactor. // TODO: This function is badly in need of a refactor.
@ -355,7 +363,7 @@ func (cfg *Configuration) renderResources(ctx context.Context, ch *chart.Chart,
if strings.TrimSpace(content) == "" { if strings.TrimSpace(content) == "" {
continue continue
} }
fmt.Fprintf(b, "---\n# Source: %s\n%s\n", name, content) writeSourceManifest(b, name, content)
} }
return hs, b, "", err return hs, b, "", err
} }
@ -473,7 +481,7 @@ func (cfg *Configuration) renderResources(ctx context.Context, ch *chart.Chart,
if strings.TrimSpace(content) == "" { if strings.TrimSpace(content) == "" {
continue continue
} }
fmt.Fprintf(b, "---\n# Source: %s\n%s\n", name, content) writeSourceManifest(b, name, content)
} }
return hs, b, "", err return hs, b, "", err
} }
@ -484,7 +492,7 @@ func (cfg *Configuration) renderResources(ctx context.Context, ch *chart.Chart,
if includeCrds { if includeCrds {
for _, crd := range ch.CRDObjects() { for _, crd := range ch.CRDObjects() {
if outputDir == "" { if outputDir == "" {
fmt.Fprintf(b, "---\n# Source: %s\n%s\n", crd.Filename, string(crd.File.Data)) writeSourceManifest(b, crd.Filename, string(crd.File.Data))
} else { } else {
err = writeToFile(outputDir, crd.Filename, string(crd.File.Data), fileWritten[crd.Filename]) err = writeToFile(outputDir, crd.Filename, string(crd.File.Data), fileWritten[crd.Filename])
if err != nil { if err != nil {
@ -500,7 +508,7 @@ func (cfg *Configuration) renderResources(ctx context.Context, ch *chart.Chart,
if hideSecret && m.Head.Kind == "Secret" && m.Head.Version == "v1" { if hideSecret && m.Head.Kind == "Secret" && m.Head.Version == "v1" {
fmt.Fprintf(b, "---\n# Source: %s\n# HIDDEN: The Secret output has been suppressed\n", m.Name) fmt.Fprintf(b, "---\n# Source: %s\n# HIDDEN: The Secret output has been suppressed\n", m.Name)
} else { } else {
fmt.Fprintf(b, "---\n# Source: %s\n%s\n", m.Name, m.Content) writeSourceManifest(b, m.Name, m.Content)
} }
} else { } else {
newDir := outputDir newDir := outputDir

@ -1826,15 +1826,12 @@ func TestRenderResources_PostRenderer_Success(t *testing.T) {
expectedBuf := `--- expectedBuf := `---
# Source: yellow/templates/foodpie # Source: yellow/templates/foodpie
foodpie: world foodpie: world
--- ---
# Source: yellow/templates/with-partials # Source: yellow/templates/with-partials
yellow: Earth yellow: Earth
--- ---
# Source: yellow/templates/yellow # Source: yellow/templates/yellow
yellow: world yellow: world
` `
expectedHook := `kind: ConfigMap expectedHook := `kind: ConfigMap
metadata: metadata:
@ -1946,17 +1943,14 @@ func TestRenderResources_PostRenderer_Integration(t *testing.T) {
# Source: hello/templates/goodbye # Source: hello/templates/goodbye
goodbye: world goodbye: world
color: blue color: blue
--- ---
# Source: hello/templates/hello # Source: hello/templates/hello
hello: world hello: world
color: blue color: blue
--- ---
# Source: hello/templates/with-partials # Source: hello/templates/with-partials
hello: Earth hello: Earth
color: blue color: blue
` `
assert.Contains(t, output, "color: blue") assert.Contains(t, output, "color: blue")
assert.Equal(t, 3, strings.Count(output, "color: blue")) assert.Equal(t, 3, strings.Count(output, "color: blue"))
@ -1980,6 +1974,50 @@ func TestRenderResources_NoPostRenderer(t *testing.T) {
assert.Empty(t, notes) assert.Empty(t, notes)
} }
func TestRenderResources_StdoutHasNoExtraBlankLineBeforeDocumentSeparator(t *testing.T) {
cfg := actionConfigFixture(t)
modTime := time.Now()
// Reproduces https://github.com/helm/helm/issues/32565: a template that
// already ends with a newline must not gain a blank line before the next ---.
ch := buildChartWithTemplates([]*common.File{
{Name: "templates/one.yaml", ModTime: modTime, Data: []byte("apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: one\n")},
{Name: "templates/two.yaml", ModTime: modTime, Data: []byte("apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: two")},
})
_, buf, _, err := cfg.renderResources(
t.Context(), ch, map[string]any{}, "test-release", "", false, false, false,
nil, false, false, false, PostRenderStrategyCombined,
)
require.NoError(t, err)
out := buf.String()
assert.NotContains(t, out, "\n\n---", "helm template stdout must not insert a blank line before ---")
assert.Contains(t, out, "name: one\n---\n")
assert.True(t, strings.HasSuffix(out, "name: two\n"), "final document should end with a single newline")
}
func TestRenderResources_StdoutPreservesExtraTrailingNewlines(t *testing.T) {
cfg := actionConfigFixture(t)
modTime := time.Now()
// YAML |+ keep relies on extra trailing newlines surviving in non-final
// documents (issue 32326). Trim only the printer's extra \n, not all of them.
ch := buildChartWithTemplates([]*common.File{
{Name: "templates/keep.yaml", ModTime: modTime, Data: []byte("apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: keep\ndata:\n key: |+\n hello\n\n\n")},
{Name: "templates/zlast.yaml", ModTime: modTime, Data: []byte("apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: zlast")},
})
_, buf, _, err := cfg.renderResources(
t.Context(), ch, map[string]any{}, "test-release", "", false, false, false,
nil, false, false, false, PostRenderStrategyCombined,
)
require.NoError(t, err)
out := buf.String()
assert.Contains(t, out, " hello\n\n\n---\n", "extra trailing newlines from |+ must be preserved")
}
func TestRenderResources_PostRenderer_DuplicateResourceInHookAndTemplate(t *testing.T) { func TestRenderResources_PostRenderer_DuplicateResourceInHookAndTemplate(t *testing.T) {
cfg := actionConfigFixture(t) cfg := actionConfigFixture(t)

@ -127,7 +127,7 @@ func newTemplateCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
continue continue
} }
if client.OutputDir == "" { if client.OutputDir == "" {
fmt.Fprintf(&manifests, "---\n# Source: %s\n%s\n", m.Path, m.Manifest) fmt.Fprintf(&manifests, "---\n# Source: %s\n%s\n", m.Path, strings.TrimSuffix(m.Manifest, "\n"))
} else { } else {
newDir := client.OutputDir newDir := client.OutputDir
if client.UseReleaseName { if client.UseReleaseName {
@ -195,7 +195,7 @@ func newTemplateCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
} }
} }
for _, m := range manifestsToRender { for _, m := range manifestsToRender {
fmt.Fprintf(out, "---\n%s\n", m) fmt.Fprintf(out, "---\n%s\n", strings.TrimSuffix(m, "\n"))
} }
} else { } else {
fmt.Fprintf(out, "%s", manifests.String()) fmt.Fprintf(out, "%s", manifests.String())

@ -19,4 +19,3 @@ metadata:
data: data:
foo: bar foo: bar

@ -15,7 +15,6 @@ metadata:
name: test-secret name: test-secret
stringData: stringData:
foo: bar foo: bar
--- ---
# Source: chart-with-secret/templates/configmap.yaml # Source: chart-with-secret/templates/configmap.yaml
apiVersion: v1 apiVersion: v1
@ -25,4 +24,3 @@ metadata:
data: data:
foo: bar foo: bar

@ -15,7 +15,6 @@ hash:
key4: 4 key4: 4
key5: 5 key5: 5
key6: 6 key6: 6
--- ---
# Source: issue-9027/templates/values.yaml # Source: issue-9027/templates/values.yaml
global: global:

@ -11,7 +11,6 @@ spec:
- Egress - Egress
- Ingress - Ingress
--- ---
# Source: object-order/templates/01-a.yml # Source: object-order/templates/01-a.yml
# 2 # 2
@ -25,7 +24,6 @@ spec:
- Egress - Egress
- Ingress - Ingress
--- ---
# Source: object-order/templates/01-a.yml # Source: object-order/templates/01-a.yml
# 3 # 3
@ -39,7 +37,6 @@ spec:
- Egress - Egress
- Ingress - Ingress
--- ---
# Source: object-order/templates/02-b.yml # Source: object-order/templates/02-b.yml
# 5 # 5
@ -53,7 +50,6 @@ spec:
- Egress - Egress
- Ingress - Ingress
--- ---
# Source: object-order/templates/02-b.yml # Source: object-order/templates/02-b.yml
# 7 # 7
@ -67,7 +63,6 @@ spec:
- Egress - Egress
- Ingress - Ingress
--- ---
# Source: object-order/templates/02-b.yml # Source: object-order/templates/02-b.yml
# 8 # 8
@ -81,7 +76,6 @@ spec:
- Egress - Egress
- Ingress - Ingress
--- ---
# Source: object-order/templates/02-b.yml # Source: object-order/templates/02-b.yml
# 9 # 9
@ -95,7 +89,6 @@ spec:
- Egress - Egress
- Ingress - Ingress
--- ---
# Source: object-order/templates/02-b.yml # Source: object-order/templates/02-b.yml
# 10 # 10
@ -109,7 +102,6 @@ spec:
- Egress - Egress
- Ingress - Ingress
--- ---
# Source: object-order/templates/02-b.yml # Source: object-order/templates/02-b.yml
# 11 # 11
@ -123,7 +115,6 @@ spec:
- Egress - Egress
- Ingress - Ingress
--- ---
# Source: object-order/templates/02-b.yml # Source: object-order/templates/02-b.yml
# 12 # 12
@ -137,7 +128,6 @@ spec:
- Egress - Egress
- Ingress - Ingress
--- ---
# Source: object-order/templates/02-b.yml # Source: object-order/templates/02-b.yml
# 13 # 13
@ -151,7 +141,6 @@ spec:
- Egress - Egress
- Ingress - Ingress
--- ---
# Source: object-order/templates/02-b.yml # Source: object-order/templates/02-b.yml
# 14 # 14
@ -165,7 +154,6 @@ spec:
- Egress - Egress
- Ingress - Ingress
--- ---
# Source: object-order/templates/02-b.yml # Source: object-order/templates/02-b.yml
# 15 (11th object within 02-b.yml, in order to test `SplitManifests` which assigns `manifest-10` # 15 (11th object within 02-b.yml, in order to test `SplitManifests` which assigns `manifest-10`
@ -179,7 +167,6 @@ spec:
policyTypes: policyTypes:
- Egress - Egress
- Ingress - Ingress
--- ---
# Source: object-order/templates/01-a.yml # Source: object-order/templates/01-a.yml
# 4 (Deployment should come after all NetworkPolicy manifests, since 'helm template' outputs in install order) # 4 (Deployment should come after all NetworkPolicy manifests, since 'helm template' outputs in install order)
@ -215,4 +202,3 @@ spec:
- Egress - Egress
- Ingress - Ingress

@ -4,7 +4,6 @@ apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: subchart-sa name: subchart-sa
--- ---
# Source: subchart/templates/subdir/role.yaml # Source: subchart/templates/subdir/role.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -15,7 +14,6 @@ rules:
- apiGroups: [""] - apiGroups: [""]
resources: ["pods"] resources: ["pods"]
verbs: ["get","list","watch"] verbs: ["get","list","watch"]
--- ---
# Source: subchart/templates/subdir/rolebinding.yaml # Source: subchart/templates/subdir/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -30,7 +28,6 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: subchart-sa name: subchart-sa
namespace: default namespace: default
--- ---
# Source: subchart/charts/subcharta/templates/service.yaml # Source: subchart/charts/subcharta/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -48,7 +45,6 @@ spec:
name: apache name: apache
selector: selector:
app.kubernetes.io/name: subcharta app.kubernetes.io/name: subcharta
--- ---
# Source: subchart/charts/subchartb/templates/service.yaml # Source: subchart/charts/subchartb/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -66,7 +62,6 @@ spec:
name: nginx name: nginx
selector: selector:
app.kubernetes.io/name: subchartb app.kubernetes.io/name: subchartb
--- ---
# Source: subchart/templates/service.yaml # Source: subchart/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -98,7 +93,6 @@ metadata:
"helm.sh/hook": test "helm.sh/hook": test
data: data:
message: Hello World message: Hello World
--- ---
# Source: subchart/templates/tests/test-nothing.yaml # Source: subchart/templates/tests/test-nothing.yaml
apiVersion: v1 apiVersion: v1
@ -118,4 +112,3 @@ spec:
- echo - echo
- "$message" - "$message"
restartPolicy: Never restartPolicy: Never

@ -4,7 +4,6 @@ apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: subchart-sa name: subchart-sa
--- ---
# Source: subchart/templates/subdir/role.yaml # Source: subchart/templates/subdir/role.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -15,7 +14,6 @@ rules:
- apiGroups: [""] - apiGroups: [""]
resources: ["pods"] resources: ["pods"]
verbs: ["get","list","watch"] verbs: ["get","list","watch"]
--- ---
# Source: subchart/templates/subdir/rolebinding.yaml # Source: subchart/templates/subdir/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -30,7 +28,6 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: subchart-sa name: subchart-sa
namespace: default namespace: default
--- ---
# Source: subchart/charts/subcharta/templates/service.yaml # Source: subchart/charts/subcharta/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -48,7 +45,6 @@ spec:
name: apache name: apache
selector: selector:
app.kubernetes.io/name: subcharta app.kubernetes.io/name: subcharta
--- ---
# Source: subchart/charts/subchartb/templates/service.yaml # Source: subchart/charts/subchartb/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -66,7 +62,6 @@ spec:
name: nginx name: nginx
selector: selector:
app.kubernetes.io/name: subchartb app.kubernetes.io/name: subchartb
--- ---
# Source: subchart/templates/service.yaml # Source: subchart/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -98,7 +93,6 @@ metadata:
"helm.sh/hook": test "helm.sh/hook": test
data: data:
message: Hello World message: Hello World
--- ---
# Source: subchart/templates/tests/test-nothing.yaml # Source: subchart/templates/tests/test-nothing.yaml
apiVersion: v1 apiVersion: v1
@ -118,4 +112,3 @@ spec:
- echo - echo
- "$message" - "$message"
restartPolicy: Never restartPolicy: Never

@ -8,8 +8,6 @@ rules:
- apiGroups: [""] - apiGroups: [""]
resources: ["pods"] resources: ["pods"]
verbs: ["get","list","watch"] verbs: ["get","list","watch"]
--- ---
# Source: subchart/templates/subdir/rolebinding.yaml # Source: subchart/templates/subdir/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -24,5 +22,3 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: subchart-sa name: subchart-sa
namespace: default namespace: default

@ -19,7 +19,6 @@ spec:
name: nginx name: nginx
selector: selector:
app.kubernetes.io/name: subchart app.kubernetes.io/name: subchart
--- ---
# Source: subchart/charts/subcharta/templates/service.yaml # Source: subchart/charts/subcharta/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -37,5 +36,3 @@ spec:
name: apache name: apache
selector: selector:
app.kubernetes.io/name: subcharta app.kubernetes.io/name: subcharta

@ -19,4 +19,3 @@ spec:
name: nginx name: nginx
selector: selector:
app.kubernetes.io/name: subchart app.kubernetes.io/name: subchart

@ -4,7 +4,6 @@ apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: subchart-sa name: subchart-sa
--- ---
# Source: subchart/templates/subdir/role.yaml # Source: subchart/templates/subdir/role.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -15,7 +14,6 @@ rules:
- apiGroups: [""] - apiGroups: [""]
resources: ["pods"] resources: ["pods"]
verbs: ["get","list","watch"] verbs: ["get","list","watch"]
--- ---
# Source: subchart/templates/subdir/rolebinding.yaml # Source: subchart/templates/subdir/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -30,7 +28,6 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: subchart-sa name: subchart-sa
namespace: default namespace: default
--- ---
# Source: subchart/charts/subcharta/templates/service.yaml # Source: subchart/charts/subcharta/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -48,7 +45,6 @@ spec:
name: apache name: apache
selector: selector:
app.kubernetes.io/name: subcharta app.kubernetes.io/name: subcharta
--- ---
# Source: subchart/charts/subchartb/templates/service.yaml # Source: subchart/charts/subchartb/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -66,7 +62,6 @@ spec:
name: nginx name: nginx
selector: selector:
app.kubernetes.io/name: subchartb app.kubernetes.io/name: subchartb
--- ---
# Source: subchart/templates/service.yaml # Source: subchart/templates/service.yaml
apiVersion: v1 apiVersion: v1

@ -4,7 +4,6 @@ apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: subchart-sa name: subchart-sa
--- ---
# Source: subchart/templates/subdir/configmap.yaml # Source: subchart/templates/subdir/configmap.yaml
apiVersion: v1 apiVersion: v1
@ -23,7 +22,6 @@ rules:
- apiGroups: [""] - apiGroups: [""]
resources: ["pods"] resources: ["pods"]
verbs: ["get","list","watch"] verbs: ["get","list","watch"]
--- ---
# Source: subchart/templates/subdir/rolebinding.yaml # Source: subchart/templates/subdir/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -38,7 +36,6 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: subchart-sa name: subchart-sa
namespace: default namespace: default
--- ---
# Source: subchart/charts/subcharta/templates/service.yaml # Source: subchart/charts/subcharta/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -56,7 +53,6 @@ spec:
name: apache name: apache
selector: selector:
app.kubernetes.io/name: subcharta app.kubernetes.io/name: subcharta
--- ---
# Source: subchart/charts/subchartb/templates/service.yaml # Source: subchart/charts/subchartb/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -74,7 +70,6 @@ spec:
name: nginx name: nginx
selector: selector:
app.kubernetes.io/name: subchartb app.kubernetes.io/name: subchartb
--- ---
# Source: subchart/templates/service.yaml # Source: subchart/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -106,7 +101,6 @@ metadata:
"helm.sh/hook": test "helm.sh/hook": test
data: data:
message: Hello World message: Hello World
--- ---
# Source: subchart/templates/tests/test-nothing.yaml # Source: subchart/templates/tests/test-nothing.yaml
apiVersion: v1 apiVersion: v1
@ -126,4 +120,3 @@ spec:
- echo - echo
- "$message" - "$message"
restartPolicy: Never restartPolicy: Never

@ -4,7 +4,6 @@ apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: subchart-sa name: subchart-sa
--- ---
# Source: subchart/templates/subdir/configmap.yaml # Source: subchart/templates/subdir/configmap.yaml
apiVersion: v1 apiVersion: v1
@ -23,7 +22,6 @@ rules:
- apiGroups: [""] - apiGroups: [""]
resources: ["pods"] resources: ["pods"]
verbs: ["get","list","watch"] verbs: ["get","list","watch"]
--- ---
# Source: subchart/templates/subdir/rolebinding.yaml # Source: subchart/templates/subdir/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -38,7 +36,6 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: subchart-sa name: subchart-sa
namespace: default namespace: default
--- ---
# Source: subchart/charts/subcharta/templates/service.yaml # Source: subchart/charts/subcharta/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -56,7 +53,6 @@ spec:
name: apache name: apache
selector: selector:
app.kubernetes.io/name: subcharta app.kubernetes.io/name: subcharta
--- ---
# Source: subchart/charts/subchartb/templates/service.yaml # Source: subchart/charts/subchartb/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -74,7 +70,6 @@ spec:
name: nginx name: nginx
selector: selector:
app.kubernetes.io/name: subchartb app.kubernetes.io/name: subchartb
--- ---
# Source: subchart/templates/service.yaml # Source: subchart/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -106,7 +101,6 @@ metadata:
"helm.sh/hook": test "helm.sh/hook": test
data: data:
message: Hello World message: Hello World
--- ---
# Source: subchart/templates/tests/test-nothing.yaml # Source: subchart/templates/tests/test-nothing.yaml
apiVersion: v1 apiVersion: v1
@ -126,4 +120,3 @@ spec:
- echo - echo
- "$message" - "$message"
restartPolicy: Never restartPolicy: Never

@ -4,7 +4,6 @@ apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: subchart-sa name: subchart-sa
--- ---
# Source: subchart/templates/subdir/configmap.yaml # Source: subchart/templates/subdir/configmap.yaml
apiVersion: v1 apiVersion: v1
@ -23,7 +22,6 @@ rules:
- apiGroups: [""] - apiGroups: [""]
resources: ["pods"] resources: ["pods"]
verbs: ["get","list","watch"] verbs: ["get","list","watch"]
--- ---
# Source: subchart/templates/subdir/rolebinding.yaml # Source: subchart/templates/subdir/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -38,7 +36,6 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: subchart-sa name: subchart-sa
namespace: default namespace: default
--- ---
# Source: subchart/charts/subcharta/templates/service.yaml # Source: subchart/charts/subcharta/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -56,7 +53,6 @@ spec:
name: apache name: apache
selector: selector:
app.kubernetes.io/name: subcharta app.kubernetes.io/name: subcharta
--- ---
# Source: subchart/charts/subchartb/templates/service.yaml # Source: subchart/charts/subchartb/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -74,7 +70,6 @@ spec:
name: nginx name: nginx
selector: selector:
app.kubernetes.io/name: subchartb app.kubernetes.io/name: subchartb
--- ---
# Source: subchart/templates/service.yaml # Source: subchart/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -106,7 +101,6 @@ metadata:
"helm.sh/hook": test "helm.sh/hook": test
data: data:
message: Hello World message: Hello World
--- ---
# Source: subchart/templates/tests/test-nothing.yaml # Source: subchart/templates/tests/test-nothing.yaml
apiVersion: v1 apiVersion: v1
@ -126,4 +120,3 @@ spec:
- echo - echo
- "$message" - "$message"
restartPolicy: Never restartPolicy: Never

@ -4,7 +4,6 @@ apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: subchart-sa name: subchart-sa
--- ---
# Source: subchart/templates/subdir/role.yaml # Source: subchart/templates/subdir/role.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -15,7 +14,6 @@ rules:
- apiGroups: [""] - apiGroups: [""]
resources: ["pods"] resources: ["pods"]
verbs: ["get","list","watch"] verbs: ["get","list","watch"]
--- ---
# Source: subchart/templates/subdir/rolebinding.yaml # Source: subchart/templates/subdir/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -30,7 +28,6 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: subchart-sa name: subchart-sa
namespace: default namespace: default
--- ---
# Source: subchart/charts/subcharta/templates/service.yaml # Source: subchart/charts/subcharta/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -48,7 +45,6 @@ spec:
name: apache name: apache
selector: selector:
app.kubernetes.io/name: subcharta app.kubernetes.io/name: subcharta
--- ---
# Source: subchart/charts/subchartb/templates/service.yaml # Source: subchart/charts/subchartb/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -66,7 +62,6 @@ spec:
name: nginx name: nginx
selector: selector:
app.kubernetes.io/name: subchartb app.kubernetes.io/name: subchartb
--- ---
# Source: subchart/templates/service.yaml # Source: subchart/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -98,7 +93,6 @@ metadata:
"helm.sh/hook": test "helm.sh/hook": test
data: data:
message: Hello World message: Hello World
--- ---
# Source: subchart/templates/tests/test-nothing.yaml # Source: subchart/templates/tests/test-nothing.yaml
apiVersion: v1 apiVersion: v1
@ -118,4 +112,3 @@ spec:
- echo - echo
- "$message" - "$message"
restartPolicy: Never restartPolicy: Never

@ -4,7 +4,6 @@ apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: subchart-sa name: subchart-sa
--- ---
# Source: subchart/templates/subdir/role.yaml # Source: subchart/templates/subdir/role.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -15,7 +14,6 @@ rules:
- apiGroups: [""] - apiGroups: [""]
resources: ["pods"] resources: ["pods"]
verbs: ["get","list","watch"] verbs: ["get","list","watch"]
--- ---
# Source: subchart/templates/subdir/rolebinding.yaml # Source: subchart/templates/subdir/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -30,7 +28,6 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: subchart-sa name: subchart-sa
namespace: default namespace: default
--- ---
# Source: subchart/charts/subcharta/templates/service.yaml # Source: subchart/charts/subcharta/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -48,7 +45,6 @@ spec:
name: apache name: apache
selector: selector:
app.kubernetes.io/name: subcharta app.kubernetes.io/name: subcharta
--- ---
# Source: subchart/charts/subchartb/templates/service.yaml # Source: subchart/charts/subchartb/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -66,7 +62,6 @@ spec:
name: nginx name: nginx
selector: selector:
app.kubernetes.io/name: subchartb app.kubernetes.io/name: subchartb
--- ---
# Source: subchart/templates/service.yaml # Source: subchart/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -100,7 +95,6 @@ metadata:
"helm.sh/hook": test "helm.sh/hook": test
data: data:
message: Hello World message: Hello World
--- ---
# Source: subchart/templates/tests/test-nothing.yaml # Source: subchart/templates/tests/test-nothing.yaml
apiVersion: v1 apiVersion: v1
@ -120,4 +114,3 @@ spec:
- echo - echo
- "$message" - "$message"
restartPolicy: Never restartPolicy: Never

@ -14,14 +14,12 @@ spec:
shortNames: shortNames:
- tc - tc
singular: authconfig singular: authconfig
--- ---
# Source: subchart/templates/subdir/serviceaccount.yaml # Source: subchart/templates/subdir/serviceaccount.yaml
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: subchart-sa name: subchart-sa
--- ---
# Source: subchart/templates/subdir/role.yaml # Source: subchart/templates/subdir/role.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -32,7 +30,6 @@ rules:
- apiGroups: [""] - apiGroups: [""]
resources: ["pods"] resources: ["pods"]
verbs: ["get","list","watch"] verbs: ["get","list","watch"]
--- ---
# Source: subchart/templates/subdir/rolebinding.yaml # Source: subchart/templates/subdir/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -47,7 +44,6 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: subchart-sa name: subchart-sa
namespace: default namespace: default
--- ---
# Source: subchart/charts/subcharta/templates/service.yaml # Source: subchart/charts/subcharta/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -65,7 +61,6 @@ spec:
name: apache name: apache
selector: selector:
app.kubernetes.io/name: subcharta app.kubernetes.io/name: subcharta
--- ---
# Source: subchart/charts/subchartb/templates/service.yaml # Source: subchart/charts/subchartb/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -83,7 +78,6 @@ spec:
name: nginx name: nginx
selector: selector:
app.kubernetes.io/name: subchartb app.kubernetes.io/name: subchartb
--- ---
# Source: subchart/templates/service.yaml # Source: subchart/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -115,7 +109,6 @@ metadata:
"helm.sh/hook": test "helm.sh/hook": test
data: data:
message: Hello World message: Hello World
--- ---
# Source: subchart/templates/tests/test-nothing.yaml # Source: subchart/templates/tests/test-nothing.yaml
apiVersion: v1 apiVersion: v1
@ -135,4 +128,3 @@ spec:
- echo - echo
- "$message" - "$message"
restartPolicy: Never restartPolicy: Never

@ -4,7 +4,6 @@ apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: subchart-sa name: subchart-sa
--- ---
# Source: subchart/templates/subdir/role.yaml # Source: subchart/templates/subdir/role.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -15,7 +14,6 @@ rules:
- apiGroups: [""] - apiGroups: [""]
resources: ["pods"] resources: ["pods"]
verbs: ["get","list","watch"] verbs: ["get","list","watch"]
--- ---
# Source: subchart/templates/subdir/rolebinding.yaml # Source: subchart/templates/subdir/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -30,7 +28,6 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: subchart-sa name: subchart-sa
namespace: default namespace: default
--- ---
# Source: subchart/charts/subcharta/templates/service.yaml # Source: subchart/charts/subcharta/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -48,7 +45,6 @@ spec:
name: apache name: apache
selector: selector:
app.kubernetes.io/name: subcharta app.kubernetes.io/name: subcharta
--- ---
# Source: subchart/charts/subchartb/templates/service.yaml # Source: subchart/charts/subchartb/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -66,7 +62,6 @@ spec:
name: nginx name: nginx
selector: selector:
app.kubernetes.io/name: subchartb app.kubernetes.io/name: subchartb
--- ---
# Source: subchart/templates/service.yaml # Source: subchart/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -98,7 +93,6 @@ metadata:
"helm.sh/hook": test "helm.sh/hook": test
data: data:
message: Hello World message: Hello World
--- ---
# Source: subchart/templates/tests/test-nothing.yaml # Source: subchart/templates/tests/test-nothing.yaml
apiVersion: v1 apiVersion: v1
@ -118,4 +112,3 @@ spec:
- echo - echo
- "$message" - "$message"
restartPolicy: Never restartPolicy: Never

@ -4,7 +4,6 @@ apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: subchart-sa name: subchart-sa
--- ---
# Source: subchart/templates/subdir/role.yaml # Source: subchart/templates/subdir/role.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -15,7 +14,6 @@ rules:
- apiGroups: [""] - apiGroups: [""]
resources: ["pods"] resources: ["pods"]
verbs: ["get","list","watch"] verbs: ["get","list","watch"]
--- ---
# Source: subchart/templates/subdir/rolebinding.yaml # Source: subchart/templates/subdir/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -30,7 +28,6 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: subchart-sa name: subchart-sa
namespace: default namespace: default
--- ---
# Source: subchart/charts/subcharta/templates/service.yaml # Source: subchart/charts/subcharta/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -48,7 +45,6 @@ spec:
name: apache name: apache
selector: selector:
app.kubernetes.io/name: subcharta app.kubernetes.io/name: subcharta
--- ---
# Source: subchart/charts/subchartb/templates/service.yaml # Source: subchart/charts/subchartb/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -66,7 +62,6 @@ spec:
name: nginx name: nginx
selector: selector:
app.kubernetes.io/name: subchartb app.kubernetes.io/name: subchartb
--- ---
# Source: subchart/templates/service.yaml # Source: subchart/templates/service.yaml
apiVersion: v1 apiVersion: v1
@ -98,7 +93,6 @@ metadata:
"helm.sh/hook": test "helm.sh/hook": test
data: data:
message: Hello World message: Hello World
--- ---
# Source: subchart/templates/tests/test-nothing.yaml # Source: subchart/templates/tests/test-nothing.yaml
apiVersion: v1 apiVersion: v1
@ -118,4 +112,3 @@ spec:
- echo - echo
- "$message" - "$message"
restartPolicy: Never restartPolicy: Never

Loading…
Cancel
Save