Skip to content

Commit b2e160a

Browse files
committed
trim crd empty lines
1 parent eecc5e6 commit b2e160a

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

examples/operator/templates/manifestcephvolume-crd.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ metadata:
66
cert-manager.io/inject-ca-from: '{{ .Release.Namespace }}/{{ include "operator.fullname"
77
. }}-serving-cert'
88
labels:
9-
109
{{- include "operator.labels" . | nindent 4 }}
1110
spec:
1211
conversion:

pkg/processor/crd/crd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ func (c crd) Process(appMeta helmify.AppMetadata, obj *unstructured.Unstructured
111111
specYaml = bytes.TrimRight(specYaml, "\n ")
112112

113113
res := fmt.Sprintf(crdTeml, obj.GetName(), appMeta.ChartName(), annotations, labels, string(specYaml))
114+
res = strings.ReplaceAll(res, "\n\n", "\n")
114115
name, _, err := unstructured.NestedString(obj.Object, "spec", "names", "singular")
115116
if err != nil || !ok {
116117
return true, nil, errors.Wrap(err, "unable to create crd template")

0 commit comments

Comments
 (0)