Skip to content

Commit

Permalink
Merge pull request #517 from wrenix/chore/metrics-indent
Browse files Browse the repository at this point in the history
  • Loading branch information
provokateurin authored Feb 2, 2024
2 parents ef41d75 + 76825b4 commit e1cea34
Show file tree
Hide file tree
Showing 11 changed files with 105 additions and 105 deletions.
2 changes: 1 addition & 1 deletion charts/nextcloud/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
14 changes: 7 additions & 7 deletions charts/nextcloud/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
46 changes: 23 additions & 23 deletions charts/nextcloud/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
66 changes: 33 additions & 33 deletions charts/nextcloud/templates/metrics/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
6 changes: 3 additions & 3 deletions charts/nextcloud/templates/metrics/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
14 changes: 7 additions & 7 deletions charts/nextcloud/templates/nextcloud-data-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
14 changes: 7 additions & 7 deletions charts/nextcloud/templates/nextcloud-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
8 changes: 4 additions & 4 deletions charts/nextcloud/templates/nginx-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
4 changes: 2 additions & 2 deletions charts/nextcloud/templates/php-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
22 changes: 11 additions & 11 deletions charts/nextcloud/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
14 changes: 7 additions & 7 deletions charts/nextcloud/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit e1cea34

Please sign in to comment.