Skip to content

Commit 1638e48

Browse files
authored
Merge pull request #12 from consideRatio/modern-indentation
Modern helm indentation
2 parents 4aaf407 + 1756b9e commit 1638e48

File tree

15 files changed

+112
-108
lines changed

15 files changed

+112
-108
lines changed

autocert/templates/NOTES.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ Thanks for installing Autocert.
1010
3. Get the PKI and Provisioner secrets running these commands:
1111
kubectl get -n {{ .Release.Namespace }} -o jsonpath='{.data.password}' secret/{{ .Release.Name }}-step-certificates-ca-password | base64 --decode
1212
kubectl get -n {{ .Release.Namespace }} -o jsonpath='{.data.password}' secret/{{ .Release.Name }}-step-certificates-provisioner-password | base64 --decode
13-
{{ if .Release.IsInstall }}
13+
{{- if .Release.IsInstall }}
14+
1415
4. Get the CA URL and the root certificate fingerprint running this command:
1516
kubectl -n {{ .Release.Namespace }} logs job.batch/{{ .Release.Name }}
1617

1718
5. Delete the configuration job running this command:
1819
kubectl -n {{ .Release.Namespace }} delete job.batch/{{ .Release.Name }}
19-
{{ end -}}
20+
{{- end }}

autocert/templates/autocert.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Deployment
33
metadata:
44
name: {{ include "autocert.fullname" . }}
55
labels:
6-
{{ include "autocert.labels" . | indent 4 }}
6+
{{- include "autocert.labels" . | nindent 4 }}
77
spec:
88
replicas: {{ .Values.replicaCount }}
99
selector:
@@ -16,13 +16,13 @@ spec:
1616
app.kubernetes.io/name: {{ include "autocert.name" . }}
1717
app.kubernetes.io/instance: {{ .Release.Name }}
1818
spec:
19-
{{- if .Release.IsInstall }}
19+
{{- if .Release.IsInstall }}
2020
initContainers:
2121
- name: {{ .Chart.Name }}-init
2222
image: busybox:latest
2323
imagePullPolicy: {{ .Values.autocert.image.pullPolicy }}
2424
command: ["sleep", "30"]
25-
{{- end }}
25+
{{- end }}
2626
containers:
2727
- name: {{ .Chart.Name }}
2828
image: {{ .Values.autocert.image.repository }}:{{ .Values.autocert.image.tag }}
@@ -33,7 +33,7 @@ spec:
3333
- name: PROVISIONER_NAME
3434
value: admin
3535
- name: NAMESPACE
36-
value: {{.Release.Namespace}}
36+
value: {{ .Release.Namespace }}
3737
volumeMounts:
3838
- name: config
3939
mountPath: /home/step/config
@@ -77,13 +77,13 @@ spec:
7777
name: {{ .Release.Name }}-autocert-config
7878
{{- with .Values.autocert.nodeSelector }}
7979
nodeSelector:
80-
{{- toYaml . | nindent 8 }}
80+
{{- toYaml . | nindent 8 }}
8181
{{- end }}
8282
{{- with .Values.autocert.affinity }}
8383
affinity:
84-
{{- toYaml . | nindent 8 }}
84+
{{- toYaml . | nindent 8 }}
8585
{{- end }}
8686
{{- with .Values.autocert.tolerations }}
8787
tolerations:
88-
{{- toYaml . | nindent 8 }}
88+
{{- toYaml . | nindent 8 }}
8989
{{- end }}

autocert/templates/configmaps.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@ apiVersion: v1
22
kind: ConfigMap
33
metadata:
44
name: {{ .Release.Name }}-autocert-config
5-
namespace: {{.Release.Namespace}}
5+
namespace: {{ .Release.Namespace }}
66
labels:
7-
{{ include "autocert.labels" . | indent 4 }}
7+
{{- include "autocert.labels" . | nindent 4 }}
88
data:
99
config.yaml: |
10-
address: :{{.Values.service.targetPort}}
10+
address: :{{ .Values.service.targetPort }}
1111
service: {{ include "autocert.fullname" . }}
12-
logFormat: {{.Values.autocert.logFormat}}
12+
logFormat: {{ .Values.autocert.logFormat }}
1313
caUrl: {{ include "autocert.ca.url" . }}
14-
certLifetime: {{.Values.autocert.certLifetime}}
15-
clusterDomain: {{.Values.autocert.clusterDomain}}
16-
restrictCertificatesToNamespace: {{.Values.autocert.restrictCertificatesToNamespace}}
14+
certLifetime: {{ .Values.autocert.certLifetime }}
15+
clusterDomain: {{ .Values.autocert.clusterDomain }}
16+
restrictCertificatesToNamespace: {{ .Values.autocert.restrictCertificatesToNamespace }}
1717
rootCAPath: /home/step/certs/root_ca.crt
1818
provisionerPasswordPath: /home/step/password/password
1919
renewer:
2020
name: autocert-renewer
21-
image: {{.Values.renewer.image.repository}}:{{.Values.renewer.image.tag}}
22-
imagePullPolicy: {{.Values.renewer.image.pullPolicy}}
21+
image: {{ .Values.renewer.image.repository }}:{{ .Values.renewer.image.tag }}
22+
imagePullPolicy: {{ .Values.renewer.image.pullPolicy }}
2323
resources:
2424
{{- toYaml .Values.renewer.resources | nindent 8 }}
2525
volumeMounts:
2626
- name: certs
2727
mountPath: /var/run/autocert.step.sm
2828
bootstrapper:
2929
name: autocert-bootstrapper
30-
image: {{.Values.bootstrapper.image.repository}}:{{.Values.bootstrapper.image.tag}}
31-
imagePullPolicy: {{.Values.bootstrapper.image.pullPolicy}}
30+
image: {{ .Values.bootstrapper.image.repository }}:{{ .Values.bootstrapper.image.tag }}
31+
imagePullPolicy: {{ .Values.bootstrapper.image.pullPolicy }}
3232
resources:
3333
{{- toYaml .Values.bootstrapper.resources | nindent 8 }}
3434
volumeMounts:

autocert/templates/rbac.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kind: ClusterRole
44
metadata:
55
name: {{ include "autocert.fullname" . }}
66
labels:
7-
{{ include "autocert.labels" . | indent 4 }}
7+
{{- include "autocert.labels" . | nindent 4 }}
88
rules:
99
- apiGroups: [""]
1010
resources: ["secrets"]
@@ -15,13 +15,13 @@ kind: ClusterRoleBinding
1515
metadata:
1616
name: {{ include "autocert.fullname" . }}
1717
labels:
18-
{{ include "autocert.labels" . | indent 4 }}
18+
{{- include "autocert.labels" . | nindent 4 }}
1919
roleRef:
2020
apiGroup: rbac.authorization.k8s.io
2121
kind: ClusterRole
2222
name: {{ include "autocert.fullname" . }}
2323
subjects:
2424
- kind: ServiceAccount
2525
name: default
26-
namespace: {{.Release.Namespace}}
27-
{{- end -}}
26+
namespace: {{ .Release.Namespace }}
27+
{{- end }}

autocert/templates/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Service
33
metadata:
44
name: {{ include "autocert.fullname" . }}
55
labels:
6-
{{ include "autocert.labels" . | indent 4 }}
6+
{{- include "autocert.labels" . | nindent 4 }}
77
spec:
88
type: {{ .Values.service.type }}
99
ports:

autocert/templates/webhook.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: MutatingWebhookConfiguration
33
metadata:
44
name: {{ .Release.Name }}-autocert-webhook-config
55
labels:
6-
{{ include "autocert.labels" . | indent 4 }}
6+
{{- include "autocert.labels" . | nindent 4 }}
77
webhooks:
88
- name: {{ .Values.autocert.label }}
99
clientConfig:

step-certificates/templates/NOTES.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ Thanks for installing Step CA.
44
1. Get the PKI and Provisioner secrets running these commands:
55
kubectl get -n {{ .Release.Namespace }} -o jsonpath='{.data.password}' secret/{{ include "step-certificates.fullname" . }}-ca-password | base64 --decode
66
kubectl get -n {{ .Release.Namespace }} -o jsonpath='{.data.password}' secret/{{ include "step-certificates.fullname" . }}-provisioner-password | base64 --decode
7-
{{ if .Release.IsInstall }}
7+
{{- if .Release.IsInstall }}
8+
89
2. Get the CA URL and the root certificate fingerprint running this command:
910
kubectl -n {{ .Release.Namespace }} logs job.batch/{{ .Release.Name }}
1011

1112
3. Delete the configuration job running this command:
1213
kubectl -n {{ .Release.Namespace }} delete job.batch/{{ .Release.Name }}
13-
{{ end -}}
14+
{{- end }}

step-certificates/templates/bootstrap.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ apiVersion: v1
33
kind: ServiceAccount
44
metadata:
55
name: {{ include "step-certificates.fullname" . }}-config
6-
namespace: {{.Release.Namespace}}
6+
namespace: {{ .Release.Namespace }}
77
labels:
8-
{{ include "step-certificates.labels" . | indent 4 }}
8+
{{- include "step-certificates.labels" . | nindent 4 }}
99
---
1010
apiVersion: batch/v1
1111
kind: Job
1212
metadata:
13-
name: "{{.Release.Name}}"
13+
name: "{{ .Release.Name }}"
1414
labels:
15-
{{ include "step-certificates.labels" . | indent 4 }}
15+
{{- include "step-certificates.labels" . | nindent 4 }}
1616
spec:
1717
template:
1818
metadata:
19-
name: "{{.Release.Name}}"
19+
name: "{{ .Release.Name }}"
2020
labels:
2121
app.kubernetes.io/name: {{ include "step-certificates.name" . }}
2222
app.kubernetes.io/instance: {{ .Release.Name }}
@@ -36,4 +36,4 @@ spec:
3636
- name: bootstrap
3737
mountPath: /home/step/bootstrap
3838
readOnly: true
39-
{{- end -}}
39+
{{- end }}

step-certificates/templates/ca.yaml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: StatefulSet
33
metadata:
44
name: {{ include "step-certificates.fullname" . }}
55
labels:
6-
{{ include "step-certificates.labels" . | indent 4 }}
6+
{{- include "step-certificates.labels" . | nindent 4 }}
77
spec:
88
# Only one replica is supported at this moment
99
# Requested {{ .Values.replicaCount }}
@@ -19,13 +19,13 @@ spec:
1919
app.kubernetes.io/name: {{ include "step-certificates.name" . }}
2020
app.kubernetes.io/instance: {{ .Release.Name }}
2121
spec:
22-
{{- if .Release.IsInstall }}
22+
{{- if .Release.IsInstall }}
2323
initContainers:
2424
- name: {{ .Chart.Name }}-init
2525
image: busybox:latest
2626
imagePullPolicy: {{ .Values.image.pullPolicy }}
2727
command: ["sleep", "20"]
28-
{{- end }}
28+
{{- end }}
2929
securityContext:
3030
{{- if .Values.ca.runAsRoot }}
3131
runAsUser: 0
@@ -39,9 +39,11 @@ spec:
3939
- name: {{ .Chart.Name }}
4040
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
4141
imagePullPolicy: {{ .Values.image.pullPolicy }}
42-
command: ["/usr/local/bin/step-ca",
42+
command: [
43+
"/usr/local/bin/step-ca",
4344
"--password-file", "/home/step/secrets/passwords/password",
44-
"/home/step/config/ca.json"]
45+
"/home/step/config/ca.json"
46+
]
4547
env:
4648
- name: NAMESPACE
4749
value: "{{ .Release.Namespace }}"
@@ -104,17 +106,17 @@ spec:
104106
{{- end }}
105107
{{- with .Values.nodeSelector }}
106108
nodeSelector:
107-
{{- toYaml . | nindent 8 }}
109+
{{- toYaml . | nindent 8 }}
108110
{{- end }}
109111
{{- with .Values.affinity }}
110112
affinity:
111-
{{- toYaml . | nindent 8 }}
113+
{{- toYaml . | nindent 8 }}
112114
{{- end }}
113115
{{- with .Values.tolerations }}
114116
tolerations:
115-
{{- toYaml . | nindent 8 }}
117+
{{- toYaml . | nindent 8 }}
116118
{{- end }}
117-
{{- if and .Values.ca.db.enabled .Values.ca.db.persistent }}
119+
{{- if and .Values.ca.db.enabled .Values.ca.db.persistent }}
118120
volumeClaimTemplates:
119121
- metadata:
120122
name: database
@@ -130,11 +132,11 @@ spec:
130132
resources:
131133
requests:
132134
storage: {{ .Values.ca.db.size | quote }}
133-
{{- if .Values.ca.db.storageClass }}
134-
{{- if (eq "-" .Values.ca.db.storageClass) }}
135+
{{- if .Values.ca.db.storageClass }}
136+
{{- if (eq "-" .Values.ca.db.storageClass) }}
135137
storageClassName: ""
136-
{{- else }}
138+
{{- else }}
137139
storageClassName: {{ .Values.ca.db.storageClass | quote }}
138-
{{- end }}
139-
{{- end }}
140-
{{- end }}
140+
{{- end }}
141+
{{- end }}
142+
{{- end }}

0 commit comments

Comments
 (0)