diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index 11b238bb..31f18390 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nextcloud -version: 4.6.1 +version: 4.6.2 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/_helpers.tpl b/charts/nextcloud/templates/_helpers.tpl index d250589c..8214e1ab 100644 --- a/charts/nextcloud/templates/_helpers.tpl +++ b/charts/nextcloud/templates/_helpers.tpl @@ -45,7 +45,7 @@ Create image name that is used in the deployment {{- if .Values.image.tag -}} {{- printf "%s:%s" .Values.image.repository .Values.image.tag -}} {{- else -}} -{{- printf "%s:%s-%s" .Values.image.repository .Chart.AppVersion (default "apache" .Values.image.flavor) -}} +{{- printf "%s:%s-%s" .Values.image.repository .Chart.AppVersion .Values.image.flavor -}} {{- end -}} {{- end -}} diff --git a/charts/nextcloud/templates/db-secret.yaml b/charts/nextcloud/templates/db-secret.yaml index dcc3129a..491c460d 100644 --- a/charts/nextcloud/templates/db-secret.yaml +++ b/charts/nextcloud/templates/db-secret.yaml @@ -1,5 +1,6 @@ {{- if or .Values.mariadb.enabled .Values.externalDatabase.enabled .Values.postgresql.enabled }} {{- if not .Values.externalDatabase.existingSecret.enabled }} +--- apiVersion: v1 kind: Secret metadata: diff --git a/charts/nextcloud/templates/hpa.yaml b/charts/nextcloud/templates/hpa.yaml index d75c611b..229a647c 100644 --- a/charts/nextcloud/templates/hpa.yaml +++ b/charts/nextcloud/templates/hpa.yaml @@ -1,4 +1,5 @@ {{- if .Values.hpa.enabled }} +--- apiVersion: autoscaling/v1 kind: HorizontalPodAutoscaler metadata: diff --git a/charts/nextcloud/templates/ingress.yaml b/charts/nextcloud/templates/ingress.yaml index 6e90d754..51a1e9d8 100644 --- a/charts/nextcloud/templates/ingress.yaml +++ b/charts/nextcloud/templates/ingress.yaml @@ -1,4 +1,5 @@ {{- if .Values.ingress.enabled }} +--- apiVersion: {{ include "nextcloud.ingress.apiVersion" . }} kind: Ingress metadata: @@ -25,11 +26,11 @@ spec: http: paths: - path: {{ .Values.ingress.path }} - {{- if eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- 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" }} + {{- if (eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1") }} service: name: {{ template "nextcloud.fullname" . }} port: diff --git a/charts/nextcloud/templates/metrics/deployment.yaml b/charts/nextcloud/templates/metrics/deployment.yaml index 8c48a11c..b52f405d 100644 --- a/charts/nextcloud/templates/metrics/deployment.yaml +++ b/charts/nextcloud/templates/metrics/deployment.yaml @@ -1,4 +1,5 @@ {{- if .Values.metrics.enabled }} +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -18,7 +19,8 @@ spec: app.kubernetes.io/component: metrics template: metadata: - annotations: {{- toYaml .Values.metrics.podAnnotations | nindent 8 }} + annotations: + {{- toYaml .Values.metrics.podAnnotations | nindent 8 }} labels: app.kubernetes.io/name: {{ include "nextcloud.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/charts/nextcloud/templates/metrics/service.yaml b/charts/nextcloud/templates/metrics/service.yaml index c9fc72ad..82eb0ad8 100644 --- a/charts/nextcloud/templates/metrics/service.yaml +++ b/charts/nextcloud/templates/metrics/service.yaml @@ -1,4 +1,5 @@ {{- if .Values.metrics.enabled }} +--- apiVersion: v1 kind: Service metadata: @@ -11,7 +12,7 @@ metadata: app.kubernetes.io/component: metrics {{- with .Values.metrics.service.labels }} {{- toYaml . | nindent 4 }} - {{- end -}} + {{- end }} {{- with .Values.metrics.service.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/charts/nextcloud/templates/metrics/servicemonitor.yaml b/charts/nextcloud/templates/metrics/servicemonitor.yaml index b84196a0..0209b4e9 100644 --- a/charts/nextcloud/templates/metrics/servicemonitor.yaml +++ b/charts/nextcloud/templates/metrics/servicemonitor.yaml @@ -1,4 +1,5 @@ {{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} +--- apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/charts/nextcloud/templates/nextcloud-data-pvc.yaml b/charts/nextcloud/templates/nextcloud-data-pvc.yaml index a5cad605..d10900a8 100644 --- a/charts/nextcloud/templates/nextcloud-data-pvc.yaml +++ b/charts/nextcloud/templates/nextcloud-data-pvc.yaml @@ -1,4 +1,5 @@ {{- if and .Values.persistence.enabled .Values.persistence.nextcloudData.enabled (not .Values.persistence.nextcloudData.existingClaim) }} +--- kind: PersistentVolumeClaim apiVersion: v1 metadata: diff --git a/charts/nextcloud/templates/rbac.yaml b/charts/nextcloud/templates/rbac.yaml index c5d0564f..e6b6a11a 100644 --- a/charts/nextcloud/templates/rbac.yaml +++ b/charts/nextcloud/templates/rbac.yaml @@ -1,4 +1,5 @@ {{- if .Values.rbac.enabled }} +--- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: diff --git a/charts/nextcloud/templates/secrets.yaml b/charts/nextcloud/templates/secrets.yaml index be9897d6..9b3ed4f9 100644 --- a/charts/nextcloud/templates/secrets.yaml +++ b/charts/nextcloud/templates/secrets.yaml @@ -1,4 +1,5 @@ {{- if not .Values.nextcloud.existingSecret.enabled }} +--- apiVersion: v1 kind: Secret metadata: diff --git a/charts/nextcloud/templates/service.yaml b/charts/nextcloud/templates/service.yaml index 3c10bdc5..0c5d0327 100644 --- a/charts/nextcloud/templates/service.yaml +++ b/charts/nextcloud/templates/service.yaml @@ -1,3 +1,4 @@ +--- apiVersion: v1 kind: Service metadata: @@ -10,8 +11,10 @@ metadata: app.kubernetes.io/component: app spec: type: {{ .Values.service.type }} - {{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.service.loadBalancerIP | default "" }} + {{- if (eq .Values.service.type "LoadBalancer") }} + {{- with .Values.service.loadBalancerIP }} + loadBalancerIP: {{ . }} + {{- end }} {{- end }} {{- with .Values.service.ipFamilies }} ipFamilies: @@ -25,7 +28,7 @@ spec: targetPort: {{ .Values.nextcloud.containerPort }} protocol: TCP name: http - {{- if eq .Values.service.type "NodePort" }} + {{- if (eq .Values.service.type "NodePort") }} nodePort: {{ .Values.service.nodePort | default "" }} {{- end }} selector: diff --git a/charts/nextcloud/templates/serviceaccount.yaml b/charts/nextcloud/templates/serviceaccount.yaml index 132f336b..84989dc0 100644 --- a/charts/nextcloud/templates/serviceaccount.yaml +++ b/charts/nextcloud/templates/serviceaccount.yaml @@ -1,4 +1,5 @@ {{- if and .Values.rbac.enabled .Values.rbac.serviceaccount.create }} +--- apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/nextcloud/values.yaml b/charts/nextcloud/values.yaml index 7ec63f72..8a0868dd 100644 --- a/charts/nextcloud/values.yaml +++ b/charts/nextcloud/values.yaml @@ -3,7 +3,9 @@ ## image: repository: nextcloud - # tag: 24.0.3-apache + flavor: apache + # default is generated by flavor and appVersion + tag: pullPolicy: IfNotPresent # pullSecrets: # - myRegistrKeySecretName