Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/app/templates/batch-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ spec:
| default .Chart.AppVersion }}
name: pi
resources: {}
restartPolicy: Never
restartPolicy: Never
2 changes: 1 addition & 1 deletion examples/app/templates/cron-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ spec:
name: hello
resources: {}
restartPolicy: OnFailure
schedule: {{ .Values.cronJob.schedule | quote }}
schedule: {{ .Values.cronJob.schedule | quote }}
2 changes: 1 addition & 1 deletion examples/app/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ spec:
name: varlog
- hostPath:
path: /var/lib/docker/containers
name: varlibdockercontainers
name: varlibdockercontainers
2 changes: 1 addition & 1 deletion examples/app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ spec:
secretName: {{ include "app.fullname" . }}-my-secret-ca
- name: sample-pv-storage
persistentVolumeClaim:
claimName: {{ include "app.fullname" . }}-my-sample-pv-claim
claimName: {{ include "app.fullname" . }}-my-sample-pv-claim
2 changes: 1 addition & 1 deletion examples/app/templates/my-config-props.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ data:
my.prop1: {{ .Values.myConfigProps.myProp1 | quote }}
my.prop2: {{ .Values.myConfigProps.myProp2 | quote }}
my.prop3: {{ .Values.myConfigProps.myProp3 | quote }}
myval.yaml: {{ .Values.myConfigProps.myvalYaml | toYaml | indent 1 }}
myval.yaml: {{ .Values.myConfigProps.myvalYaml | toYaml | indent 1 }}
2 changes: 1 addition & 1 deletion examples/app/templates/my-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ data:
dummyconfigmapkey: {{ .Values.myConfig.dummyconfigmapkey | quote }}
my_config.properties: |
health.healthProbeBindAddress={{ .Values.myConfig.myConfigProperties.health.healthProbeBindAddress | quote }}
metrics.bindAddress={{ .Values.myConfig.myConfigProperties.metrics.bindAddress | quote }}
metrics.bindAddress={{ .Values.myConfig.myConfigProperties.metrics.bindAddress | quote }}
2 changes: 1 addition & 1 deletion examples/app/templates/my-sample-pv-claim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ spec:
storage: {{ .Values.pvc.mySamplePvClaim.storageLimit | quote }}
requests:
storage: {{ .Values.pvc.mySamplePvClaim.storageRequest | quote }}
storageClassName: {{ .Values.pvc.mySamplePvClaim.storageClass | quote }}
storageClassName: {{ .Values.pvc.mySamplePvClaim.storageClass | quote }}
2 changes: 1 addition & 1 deletion examples/app/templates/my-secret-ca.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ metadata:
data:
ca.crt: {{ required "mySecretCa.caCrt is required" .Values.mySecretCa.caCrt | b64enc
| quote }}
type: opaque
type: opaque
2 changes: 1 addition & 1 deletion examples/app/templates/my-secret-vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ data:
stringData:
str: {{ required "mySecretVars.str is required" .Values.mySecretVars.str | quote
}}
type: opaque
type: opaque
2 changes: 1 addition & 1 deletion examples/app/templates/myapp-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ spec:
port:
number: 8443
path: /testpath
pathType: Prefix
pathType: Prefix
2 changes: 1 addition & 1 deletion examples/app/templates/myapp-lb-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ spec:
ports:
{{- .Values.myappLbService.ports | toYaml | nindent 2 }}
loadBalancerSourceRanges:
{{- .Values.myappLbService.loadBalancerSourceRanges | toYaml | nindent 2 }}
{{- .Values.myappLbService.loadBalancerSourceRanges | toYaml | nindent 2 }}
2 changes: 1 addition & 1 deletion examples/app/templates/myapp-pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ spec:
selector:
matchLabels:
app: nginx
{{- include "app.selectorLabels" . | nindent 6 }}
{{- include "app.selectorLabels" . | nindent 6 }}
2 changes: 1 addition & 1 deletion examples/app/templates/myapp-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ spec:
app: myapp
{{- include "app.selectorLabels" . | nindent 4 }}
ports:
{{- .Values.myappService.ports | toYaml | nindent 2 }}
{{- .Values.myappService.ports | toYaml | nindent 2 }}
2 changes: 1 addition & 1 deletion examples/app/templates/nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ spec:
app: nginx
{{- include "app.selectorLabels" . | nindent 4 }}
ports:
{{- .Values.nginx.ports | toYaml | nindent 2 }}
{{- .Values.nginx.ports | toYaml | nindent 2 }}
2 changes: 1 addition & 1 deletion examples/app/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ spec:
spec:
accessModes:
- ReadWriteOnce
resources: {{ .Values.web.volumeClaims.www | toYaml | nindent 8 }}
resources: {{ .Values.web.volumeClaims.www | toYaml | nindent 8 }}
2 changes: 1 addition & 1 deletion examples/operator/templates/cephvolume-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,4 @@ status:
kind: ""
plural: ""
conditions: []
storedVersions: []
storedVersions: []
2 changes: 1 addition & 1 deletion examples/operator/templates/configmap-vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ metadata:
labels:
{{- include "operator.labels" . | nindent 4 }}
data:
VAR4: {{ .Values.configmapVars.var4 | quote }}
VAR4: {{ .Values.configmapVars.var4 | quote }}
2 changes: 1 addition & 1 deletion examples/operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ spec:
name: manager-config
- name: secret-volume
secret:
secretName: {{ include "operator.fullname" . }}-secret-ca
secretName: {{ include "operator.fullname" . }}-secret-ca
2 changes: 1 addition & 1 deletion examples/operator/templates/leader-election-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: '{{ include "operator.fullname" . }}-controller-manager'
namespace: '{{ .Release.Namespace }}'
namespace: '{{ .Release.Namespace }}'
2 changes: 1 addition & 1 deletion examples/operator/templates/manager-aggregated-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ aggregationRule:
operator: In
values:
- my-operator
rules: []
rules: []
2 changes: 1 addition & 1 deletion examples/operator/templates/manager-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ metadata:
data:
controller_manager_config.yaml: {{ .Values.managerConfig.controllerManagerConfigYaml
| toYaml | indent 1 }}
dummyconfigmapkey: {{ .Values.managerConfig.dummyconfigmapkey | quote }}
dummyconfigmapkey: {{ .Values.managerConfig.dummyconfigmapkey | quote }}
2 changes: 1 addition & 1 deletion examples/operator/templates/manager-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: '{{ include "operator.fullname" . }}-controller-manager'
namespace: '{{ .Release.Namespace }}'
namespace: '{{ .Release.Namespace }}'
2 changes: 1 addition & 1 deletion examples/operator/templates/manifestcephvolume-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ status:
kind: ""
plural: ""
conditions: []
storedVersions: []
storedVersions: []
2 changes: 1 addition & 1 deletion examples/operator/templates/metrics-reader-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ rules:
- nonResourceURLs:
- /metrics
verbs:
- get
- get
2 changes: 1 addition & 1 deletion examples/operator/templates/metrics-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ spec:
control-plane: controller-manager
{{- include "operator.selectorLabels" . | nindent 4 }}
ports:
{{- .Values.metricsService.ports | toYaml | nindent 2 }}
{{- .Values.metricsService.ports | toYaml | nindent 2 }}
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ webhooks:
- UPDATE
resources:
- myclusters
sideEffects: None
sideEffects: None
2 changes: 1 addition & 1 deletion examples/operator/templates/proxy-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: '{{ include "operator.fullname" . }}-controller-manager'
namespace: '{{ .Release.Namespace }}'
namespace: '{{ .Release.Namespace }}'
2 changes: 1 addition & 1 deletion examples/operator/templates/pvc-lim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ spec:
resources:
requests:
storage: {{ .Values.pvc.pvcLim.storageRequest | quote }}
storageClassName: {{ .Values.pvc.pvcLim.storageClass | quote }}
storageClassName: {{ .Values.pvc.pvcLim.storageClass | quote }}
2 changes: 1 addition & 1 deletion examples/operator/templates/secret-ca.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ metadata:
data:
ca.crt: {{ required "secretCa.caCrt is required" .Values.secretCa.caCrt | b64enc
| quote }}
type: opaque
type: opaque
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ metadata:
data:
.dockerconfigjson: {{ required "secretRegistryCredentials.dockerconfigjson is required"
.Values.secretRegistryCredentials.dockerconfigjson | b64enc | quote }}
type: kubernetes.io/dockerconfigjson
type: kubernetes.io/dockerconfigjson
2 changes: 1 addition & 1 deletion examples/operator/templates/secret-vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ data:
| quote }}
VAR2: {{ required "secretVars.var2 is required" .Values.secretVars.var2 | b64enc
| quote }}
type: opaque
type: opaque
2 changes: 1 addition & 1 deletion examples/operator/templates/selfsigned-issuer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ metadata:
labels:
{{- include "operator.labels" . | nindent 4 }}
spec:
selfSigned: {}
selfSigned: {}
2 changes: 1 addition & 1 deletion examples/operator/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ metadata:
labels:
{{- include "operator.labels" . | nindent 4 }}
annotations:
{{- toYaml .Values.controllerManager.serviceAccount.annotations | nindent 4 }}
{{- toYaml .Values.controllerManager.serviceAccount.annotations | nindent 4 }}
2 changes: 1 addition & 1 deletion examples/operator/templates/serving-cert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ spec:
issuerRef:
kind: Issuer
name: '{{ include "operator.fullname" . }}-selfsigned-issuer'
secretName: webhook-server-cert
secretName: webhook-server-cert
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ webhooks:
- UPDATE
resources:
- volumes
sideEffects: None
sideEffects: None
2 changes: 1 addition & 1 deletion examples/operator/templates/webhook-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ spec:
control-plane: controller-manager
{{- include "operator.selectorLabels" . | nindent 4 }}
ports:
{{- .Values.webhookService.ports | toYaml | nindent 2 }}
{{- .Values.webhookService.ports | toYaml | nindent 2 }}
6 changes: 6 additions & 0 deletions pkg/helm/chart.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ func overwriteTemplateFile(filename, chartDir string, crd bool, templates []helm
}
}
}
if len(templates) != 0 {
_, err = f.Write([]byte("\n"))
if err != nil {
return fmt.Errorf("%w: unable to write newline into %s", err, file)
}
}
logrus.WithField("file", file).Info("overwritten")
return nil
}
Expand Down