From 76825b40129b1b96e84455c715b064837dd556d0 Mon Sep 17 00:00:00 2001 From: WrenIX Date: Fri, 2 Feb 2024 11:29:35 +0100 Subject: [PATCH] chore: easier readable indent Signed-off-by: WrenIX --- charts/nextcloud/Chart.yaml | 2 +- charts/nextcloud/templates/deployment.yaml | 14 ++-- charts/nextcloud/templates/ingress.yaml | 46 ++++++------- .../templates/metrics/deployment.yaml | 66 +++++++++---------- .../nextcloud/templates/metrics/service.yaml | 6 +- .../templates/nextcloud-data-pvc.yaml | 14 ++-- charts/nextcloud/templates/nextcloud-pvc.yaml | 14 ++-- charts/nextcloud/templates/nginx-config.yaml | 8 +-- charts/nextcloud/templates/php-config.yaml | 4 +- charts/nextcloud/templates/rbac.yaml | 22 +++---- charts/nextcloud/templates/service.yaml | 14 ++-- 11 files changed, 105 insertions(+), 105 deletions(-) diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index 05e0dd81..3c38f70a 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nextcloud -version: 4.5.14 +version: 4.5.15 appVersion: 28.0.2 description: A file sharing server that puts the control and security of your own data back into your hands. keywords: diff --git a/charts/nextcloud/templates/deployment.yaml b/charts/nextcloud/templates/deployment.yaml index 084a3018..3d6840c0 100644 --- a/charts/nextcloud/templates/deployment.yaml +++ b/charts/nextcloud/templates/deployment.yaml @@ -151,8 +151,8 @@ spec: path: /status.php port: {{ $.Values.nextcloud.containerPort }} httpHeaders: - - name: Host - value: {{ $.Values.nextcloud.host | quote }} + - name: Host + value: {{ $.Values.nextcloud.host | quote }} initialDelaySeconds: {{ .initialDelaySeconds }} periodSeconds: {{ .periodSeconds }} timeoutSeconds: {{ .timeoutSeconds }} @@ -167,8 +167,8 @@ spec: path: /status.php port: {{ $.Values.nextcloud.containerPort }} httpHeaders: - - name: Host - value: {{ $.Values.nextcloud.host | quote }} + - name: Host + value: {{ $.Values.nextcloud.host | quote }} initialDelaySeconds: {{ .initialDelaySeconds }} periodSeconds: {{ .periodSeconds }} timeoutSeconds: {{ .timeoutSeconds }} @@ -183,8 +183,8 @@ spec: path: /status.php port: {{ $.Values.nextcloud.containerPort }} httpHeaders: - - name: Host - value: {{ $.Values.nextcloud.host | quote }} + - name: Host + value: {{ $.Values.nextcloud.host | quote }} initialDelaySeconds: {{ .initialDelaySeconds }} periodSeconds: {{ .periodSeconds }} timeoutSeconds: {{ .timeoutSeconds }} @@ -238,7 +238,7 @@ spec: image: {{ include "nextcloud.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} command: - - /cron.sh + - /cron.sh {{- with .Values.cronjob.lifecycle }} lifecycle: {{- with .postStartCommand }} diff --git a/charts/nextcloud/templates/ingress.yaml b/charts/nextcloud/templates/ingress.yaml index 9f93c2e8..f26c4d4d 100644 --- a/charts/nextcloud/templates/ingress.yaml +++ b/charts/nextcloud/templates/ingress.yaml @@ -9,37 +9,37 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/component: app -{{- if .Values.ingress.labels }} + {{- if .Values.ingress.labels }} {{ toYaml .Values.ingress.labels | indent 4 }} -{{- end }} -{{- if .Values.ingress.annotations }} + {{- end }} + {{- if .Values.ingress.annotations }} annotations: {{ toYaml .Values.ingress.annotations | indent 4 }} -{{- end }} + {{- end }} spec: {{- if .Values.ingress.className }} ingressClassName: {{ .Values.ingress.className }} {{- end }} rules: - - host: {{ .Values.nextcloud.host }} - http: - paths: - - path: {{ .Values.ingress.path }} - {{- if eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1" }} - pathType: {{ .Values.ingress.pathType }} - {{- end }} - backend: - {{- if eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1" }} - service: - name: {{ template "nextcloud.fullname" . }} - port: - number: {{ .Values.service.port }} - {{- else }} - serviceName: {{ template "nextcloud.fullname" . }} - servicePort: {{ .Values.service.port }} - {{- end }} -{{- if .Values.ingress.tls }} + - host: {{ .Values.nextcloud.host }} + http: + paths: + - path: {{ .Values.ingress.path }} + {{- if eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1" }} + pathType: {{ .Values.ingress.pathType }} + {{- end }} + backend: + {{- if eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1" }} + service: + name: {{ template "nextcloud.fullname" . }} + port: + number: {{ .Values.service.port }} + {{- else }} + serviceName: {{ template "nextcloud.fullname" . }} + servicePort: {{ .Values.service.port }} + {{- end }} + {{- if .Values.ingress.tls }} tls: {{ toYaml .Values.ingress.tls | indent 4 }} -{{- end -}} + {{- end }} {{- end }} diff --git a/charts/nextcloud/templates/metrics/deployment.yaml b/charts/nextcloud/templates/metrics/deployment.yaml index 40740082..0e6771ca 100644 --- a/charts/nextcloud/templates/metrics/deployment.yaml +++ b/charts/nextcloud/templates/metrics/deployment.yaml @@ -29,43 +29,43 @@ spec: spec: {{- if .Values.metrics.image.pullSecrets }} imagePullSecrets: - {{- range .Values.metrics.image.pullSecrets }} + {{- range .Values.metrics.image.pullSecrets }} - name: {{ . }} - {{- end}} + {{- end}} {{- end }} containers: - - name: metrics-exporter - image: "{{ .Values.metrics.image.repository }}:{{ .Values.metrics.image.tag }}" - imagePullPolicy: {{ .Values.metrics.image.pullPolicy }} - env: - {{- if .Values.metrics.token }} - - name: NEXTCLOUD_AUTH_TOKEN - valueFrom: - secretKeyRef: - name: {{ .Values.nextcloud.existingSecret.secretName | default (include "nextcloud.fullname" .) }} - key: {{ .Values.nextcloud.existingSecret.tokenKey }} - {{- else }} - - name: NEXTCLOUD_USERNAME - valueFrom: - secretKeyRef: - name: {{ .Values.nextcloud.existingSecret.secretName | default (include "nextcloud.fullname" .) }} - key: {{ .Values.nextcloud.existingSecret.usernameKey }} - - name: NEXTCLOUD_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.nextcloud.existingSecret.secretName | default (include "nextcloud.fullname" .) }} - key: {{ .Values.nextcloud.existingSecret.passwordKey }} - {{- end }} - # NEXTCLOUD_SERVER is used by metrics-exporter to reach the Nextcloud (K8s-)Service to grab the serverinfo api endpoint - - name: NEXTCLOUD_SERVER # deployment.namespace.svc.cluster.local - value: "http{{ if .Values.metrics.https }}s{{ end }}://{{ template "nextcloud.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }}" - - name: NEXTCLOUD_TIMEOUT - value: {{ .Values.metrics.timeout }} - - name: NEXTCLOUD_TLS_SKIP_VERIFY - value: {{ .Values.metrics.tlsSkipVerify | quote }} + - name: metrics-exporter + image: "{{ .Values.metrics.image.repository }}:{{ .Values.metrics.image.tag }}" + imagePullPolicy: {{ .Values.metrics.image.pullPolicy }} + env: + {{- if .Values.metrics.token }} + - name: NEXTCLOUD_AUTH_TOKEN + valueFrom: + secretKeyRef: + name: {{ .Values.nextcloud.existingSecret.secretName | default (include "nextcloud.fullname" .) }} + key: {{ .Values.nextcloud.existingSecret.tokenKey }} + {{- else }} + - name: NEXTCLOUD_USERNAME + valueFrom: + secretKeyRef: + name: {{ .Values.nextcloud.existingSecret.secretName | default (include "nextcloud.fullname" .) }} + key: {{ .Values.nextcloud.existingSecret.usernameKey }} + - name: NEXTCLOUD_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.nextcloud.existingSecret.secretName | default (include "nextcloud.fullname" .) }} + key: {{ .Values.nextcloud.existingSecret.passwordKey }} + {{- end }} + # NEXTCLOUD_SERVER is used by metrics-exporter to reach the Nextcloud (K8s-)Service to grab the serverinfo api endpoint + - name: NEXTCLOUD_SERVER # deployment.namespace.svc.cluster.local + value: "http{{ if .Values.metrics.https }}s{{ end }}://{{ template "nextcloud.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }}" + - name: NEXTCLOUD_TIMEOUT + value: {{ .Values.metrics.timeout }} + - name: NEXTCLOUD_TLS_SKIP_VERIFY + value: {{ .Values.metrics.tlsSkipVerify | quote }} ports: - - name: metrics - containerPort: 9205 + - name: metrics + containerPort: 9205 {{- if .Values.metrics.resources }} resources: {{- toYaml .Values.metrics.resources | nindent 10 }} {{- end }} diff --git a/charts/nextcloud/templates/metrics/service.yaml b/charts/nextcloud/templates/metrics/service.yaml index 1d287451..6544db8d 100644 --- a/charts/nextcloud/templates/metrics/service.yaml +++ b/charts/nextcloud/templates/metrics/service.yaml @@ -22,9 +22,9 @@ spec: {{ end -}} {{- end -}} ports: - - name: metrics - port: 9205 - targetPort: metrics + - name: metrics + port: 9205 + targetPort: metrics selector: app.kubernetes.io/name: {{ include "nextcloud.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/charts/nextcloud/templates/nextcloud-data-pvc.yaml b/charts/nextcloud/templates/nextcloud-data-pvc.yaml index 7c2febc3..518451d7 100644 --- a/charts/nextcloud/templates/nextcloud-data-pvc.yaml +++ b/charts/nextcloud/templates/nextcloud-data-pvc.yaml @@ -10,22 +10,22 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/component: app -{{- if .Values.persistence.nextcloudData.annotations }} + {{- if .Values.persistence.nextcloudData.annotations }} annotations: {{ toYaml .Values.persistence.nextcloudData.annotations | indent 4 }} -{{- end }} + {{- end }} spec: accessModes: - {{ .Values.persistence.nextcloudData.accessMode | quote }} resources: requests: storage: {{ .Values.persistence.nextcloudData.size | quote }} -{{- if .Values.persistence.nextcloudData.storageClass }} -{{- if (eq "-" .Values.persistence.nextcloudData.storageClass) }} + {{- if .Values.persistence.nextcloudData.storageClass }} + {{- if (eq "-" .Values.persistence.nextcloudData.storageClass) }} storageClassName: "" -{{- else }} + {{- else }} storageClassName: "{{ .Values.persistence.nextcloudData.storageClass }}" -{{- end }} -{{- end }} + {{- end }} + {{- end }} {{- end -}} {{- end -}} diff --git a/charts/nextcloud/templates/nextcloud-pvc.yaml b/charts/nextcloud/templates/nextcloud-pvc.yaml index 8c1789af..dc96ba0c 100644 --- a/charts/nextcloud/templates/nextcloud-pvc.yaml +++ b/charts/nextcloud/templates/nextcloud-pvc.yaml @@ -10,22 +10,22 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/component: app -{{- if .Values.persistence.annotations }} + {{- if .Values.persistence.annotations }} annotations: {{ toYaml .Values.persistence.annotations | indent 4 }} -{{- end }} + {{- end }} spec: accessModes: - {{ .Values.persistence.accessMode | quote }} resources: requests: storage: {{ .Values.persistence.size | quote }} -{{- if .Values.persistence.storageClass }} -{{- if (eq "-" .Values.persistence.storageClass) }} + {{- if .Values.persistence.storageClass }} + {{- if (eq "-" .Values.persistence.storageClass) }} storageClassName: "" -{{- else }} + {{- else }} storageClassName: "{{ .Values.persistence.storageClass }}" -{{- end }} -{{- end }} + {{- end }} + {{- end }} {{- end -}} {{- end -}} diff --git a/charts/nextcloud/templates/nginx-config.yaml b/charts/nextcloud/templates/nginx-config.yaml index df5b64c5..9c48aadd 100644 --- a/charts/nextcloud/templates/nginx-config.yaml +++ b/charts/nextcloud/templates/nginx-config.yaml @@ -144,12 +144,12 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} data: -{{- if .Values.nginx.config.default }} + {{- if .Values.nginx.config.default }} default.conf: |- {{- template "default.conf" $ }} -{{- end }} -{{- if .Values.nginx.config.custom }} + {{- end }} + {{- if .Values.nginx.config.custom }} zz-custom.conf: |- {{ .Values.nginx.config.custom | indent 4 }} -{{- end }} + {{- end }} {{- end }} diff --git a/charts/nextcloud/templates/php-config.yaml b/charts/nextcloud/templates/php-config.yaml index 3ff9e95a..e8bfbbbf 100644 --- a/charts/nextcloud/templates/php-config.yaml +++ b/charts/nextcloud/templates/php-config.yaml @@ -9,8 +9,8 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} data: -{{- range $key, $value := .Values.nextcloud.phpConfigs }} + {{- range $key, $value := .Values.nextcloud.phpConfigs }} {{ $key }}: |- {{ $value | indent 4 }} -{{- end }} + {{- end }} {{- end }} diff --git a/charts/nextcloud/templates/rbac.yaml b/charts/nextcloud/templates/rbac.yaml index 6a1c9fab..c5d0564f 100644 --- a/charts/nextcloud/templates/rbac.yaml +++ b/charts/nextcloud/templates/rbac.yaml @@ -5,14 +5,14 @@ metadata: name: {{ template "nextcloud.fullname" . }}-privileged namespace: {{ .Release.Namespace }} rules: -- apiGroups: - - extensions - resourceNames: - - privileged - resources: - - podsecuritypolicies - verbs: - - use + - apiGroups: + - extensions + resourceNames: + - privileged + resources: + - podsecuritypolicies + verbs: + - use --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding @@ -24,7 +24,7 @@ roleRef: kind: Role name: {{ template "nextcloud.fullname" . }}-privileged subjects: -- kind: ServiceAccount - name: {{ .Values.rbac.serviceaccount.name }} - namespace: {{ .Release.Namespace }} + - kind: ServiceAccount + name: {{ .Values.rbac.serviceaccount.name }} + namespace: {{ .Release.Namespace }} {{- end }} diff --git a/charts/nextcloud/templates/service.yaml b/charts/nextcloud/templates/service.yaml index eb9fcd39..84f1d2fb 100644 --- a/charts/nextcloud/templates/service.yaml +++ b/charts/nextcloud/templates/service.yaml @@ -21,13 +21,13 @@ spec: ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }} {{- end }} ports: - - port: {{ .Values.service.port }} - targetPort: {{ .Values.nextcloud.containerPort }} - protocol: TCP - name: http - {{- if eq .Values.service.type "NodePort" }} - nodePort: {{ default "" .Values.service.nodePort}} - {{- end }} + - port: {{ .Values.service.port }} + targetPort: {{ .Values.nextcloud.containerPort }} + protocol: TCP + name: http + {{- if eq .Values.service.type "NodePort" }} + nodePort: {{ default "" .Values.service.nodePort}} + {{- end }} selector: app.kubernetes.io/name: {{ include "nextcloud.name" . }} app.kubernetes.io/instance: {{ .Release.Name }}