diff --git a/charts/vikunja/Chart.yaml b/charts/vikunja/Chart.yaml index 469dde3..7b605fd 100644 --- a/charts/vikunja/Chart.yaml +++ b/charts/vikunja/Chart.yaml @@ -6,8 +6,8 @@ sources: - https://kolaente.dev/vikunja/ - https://gitlab.com/oecis/charts/-/tree/main/charts/vikunja type: application -version: 0.1.4 -appVersion: "0.22.1" +version: 0.1.5 +appVersion: "0.23.0" dependencies: - condition: postgresql.enabled name: postgresql diff --git a/charts/vikunja/README.md b/charts/vikunja/README.md index 931a461..d6fe69a 100644 --- a/charts/vikunja/README.md +++ b/charts/vikunja/README.md @@ -1,6 +1,6 @@ # vikunja -![Version: 0.1.4](https://img.shields.io/badge/Version-0.1.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.22.1](https://img.shields.io/badge/AppVersion-0.22.1-informational?style=flat-square) +![Version: 0.1.5](https://img.shields.io/badge/Version-0.1.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.23.0](https://img.shields.io/badge/AppVersion-0.23.0-informational?style=flat-square) The to-do app to organize your life @@ -27,15 +27,6 @@ The to-do app to organize your life | autoscaling.maxReplicas | int | `100` | | | autoscaling.minReplicas | int | `1` | | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | -| backend.extraEnv | list | `[]` | | -| backend.extraVolumeMounts | list | `[]` | | -| backend.extraVolumes | list | `[]` | | -| backend.image.pullPolicy | string | `"IfNotPresent"` | | -| backend.image.repository | string | `"vikunja/api"` | | -| backend.image.tag | string | `"latest"` | | -| backend.initContainers | list | `[]` | | -| backend.service.port | int | `3456` | | -| backend.service.type | string | `"ClusterIP"` | | | config.cache.enabled | bool | `false` | | | config.cache.maxElementSize | int | `1000` | | | config.cache.redis.enabled | bool | `false` | | @@ -48,29 +39,29 @@ The to-do app to organize your life | config.db.secretKeys.dbPasswordKey | string | `"user-password"` | | | config.db.type | string | `"postgres"` | | | config.db.user | string | `""` | | -| config.frontendUrl | string | `"https://tasks.local"` | | | config.jwt.existingSecret | string | `""` | | | config.jwt.secretKeys.jwtSecretKey | string | `"jwt-secret"` | | | config.linkSharing | bool | `true` | | | config.log.level | string | `"ERROR"` | | +| config.publicUrl | string | `"https://tasks.local"` | | | config.registration | bool | `true` | | | config.taskAttachments | bool | `true` | | -| frontend.extraEnv | list | `[]` | | -| frontend.extraVolumeMounts | list | `[]` | | -| frontend.extraVolumes | list | `[]` | | -| frontend.image.pullPolicy | string | `"IfNotPresent"` | | -| frontend.image.repository | string | `"vikunja/frontend"` | | -| frontend.image.tag | string | `"latest"` | | -| frontend.initContainers | list | `[]` | | -| frontend.service.port | int | `80` | | -| frontend.service.type | string | `"ClusterIP"` | | +| extraEnv | list | `[]` | | +| extraVolumeMounts | list | `[]` | | +| extraVolumes | list | `[]` | | | fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.repository | string | `"vikunja/vikunja"` | | +| image.tag | string | `""` | | | imagePullSecrets | list | `[]` | | | ingress.annotations | object | `{}` | | | ingress.className | string | `""` | | | ingress.enabled | bool | `false` | | | ingress.hosts[0].host | string | `"tasks.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | | ingress.tls | list | `[]` | | +| initContainers | list | `[]` | | | nameOverride | string | `""` | | | nodeSelector | object | `{}` | | | podAnnotations | object | `{}` | | @@ -81,6 +72,8 @@ The to-do app to organize your life | replicaCount | int | `1` | | | resources | object | `{}` | | | securityContext | object | `{}` | | +| service.port | int | `3456` | | +| service.type | string | `"ClusterIP"` | | | serviceAccount.annotations | object | `{}` | | | serviceAccount.create | bool | `true` | | | serviceAccount.name | string | `""` | | diff --git a/charts/vikunja/templates/backend/service.yaml b/charts/vikunja/templates/backend/service.yaml deleted file mode 100644 index 94e2d78..0000000 --- a/charts/vikunja/templates/backend/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "vikunja.fullname" . }}-api - labels: - {{- include "vikunja.labels" . | nindent 4 }} -spec: - type: {{ .Values.backend.service.type }} - ports: - - port: {{ .Values.backend.service.port }} - targetPort: api - protocol: TCP - name: api - selector: - {{- include "vikunja.selectorLabels" . | nindent 4 }} diff --git a/charts/vikunja/templates/backend/deployment.yaml b/charts/vikunja/templates/deployment.yaml similarity index 75% rename from charts/vikunja/templates/backend/deployment.yaml rename to charts/vikunja/templates/deployment.yaml index f562f6f..5ee0a04 100644 --- a/charts/vikunja/templates/backend/deployment.yaml +++ b/charts/vikunja/templates/deployment.yaml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "vikunja.fullname" . }}-backend + name: {{ include "vikunja.fullname" . }} labels: {{- include "vikunja.labels" . | nindent 4 }} spec: @@ -27,32 +27,32 @@ spec: serviceAccountName: {{ include "vikunja.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if not (empty .Values.backend.extraVolumes ) }} + {{- if not (empty .Values.extraVolumes ) }} volumes: - {{- toYaml .Values.backend.extraVolumes | nindent 8 }} + {{- toYaml .Values.extraVolumes | nindent 8 }} {{- end }} - {{- if not (empty .Values.backend.initContainers)}} + {{- if not (empty .Values.initContainers)}} initContainers: - {{- toYaml .Values.backend.initContainers | nindent 10}} + {{- toYaml .Values.initContainers | nindent 10}} {{- end }} containers: - - name: {{ .Chart.Name }}-backend + - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.backend.image.repository }}:{{ .Values.backend.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.backend.image.pullPolicy }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - - name: api - containerPort: {{ .Values.backend.service.port }} + - name: http + containerPort: {{ .Values.service.port }} protocol: TCP livenessProbe: httpGet: path: /api/v1/info - port: api + port: http readinessProbe: httpGet: path: /api/v1/info - port: api + port: http resources: {{- toYaml .Values.resources | nindent 12 }} env: @@ -87,14 +87,14 @@ spec: {{- end }} - name: VIKUNJA_DATABASE_USER value: {{ .Values.config.db.user }} - - name: VIKUNJA_SERVICE_FRONTENDURL - value: {{ .Values.config.frontendUrl }} - {{- if not (empty .Values.backend.extraEnv) }} - {{- toYaml .Values.backend.extraEnv | nindent 12 }} + - name: VIKUNJA_SERVICE_PUBLICURL + value: {{ .Values.config.publicUrl }} + {{- if not (empty .Values.extraEnv) }} + {{- toYaml .Values.extraEnv | nindent 12 }} {{- end }} - {{- if not (empty .Values.backend.extraVolumeMounts) }} + {{- if not (empty .Values.extraVolumeMounts) }} volumeMounts: - {{- toYaml .Values.backend.extraVolumeMounts | nindent 12 }} + {{- toYaml .Values.extraVolumeMounts | nindent 12 }} {{- end}} {{- with .Values.nodeSelector }} nodeSelector: diff --git a/charts/vikunja/templates/frontend/deployment.yaml b/charts/vikunja/templates/frontend/deployment.yaml deleted file mode 100644 index c43dd4b..0000000 --- a/charts/vikunja/templates/frontend/deployment.yaml +++ /dev/null @@ -1,77 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "vikunja.fullname" . }}-frontend - labels: - {{- include "vikunja.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "vikunja.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "vikunja.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "vikunja.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if not (empty .Values.frontend.extraVolumes ) }} - volumes: - {{- toYaml .Values.frontend.extraVolumes | nindent 8 }} - {{- end }} - {{- if not (empty .Values.frontend.initContainers)}} - initContainers: - {{- toYaml .Values.frontend.initContainers | nindent 10}} - {{- end }} - containers: - - name: {{ .Chart.Name }}-frontend - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.frontend.image.pullPolicy }} - ports: - - name: http - containerPort: {{ .Values.frontend.service.port }} - protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- if not (empty .Values.backend.extraEnv) }} - env: - {{- toYaml .Values.backend.extraEnv | nindent 12 }} - {{- end }} - {{- if not (empty .Values.frontend.extraVolumeMounts) }} - volumeMounts: - {{- toYaml .Values.frontend.extraVolumeMounts | nindent 12 }} - {{- end}} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/charts/vikunja/templates/ingress.yaml b/charts/vikunja/templates/ingress.yaml index 1baef6b..c545175 100644 --- a/charts/vikunja/templates/ingress.yaml +++ b/charts/vikunja/templates/ingress.yaml @@ -1,5 +1,6 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "vikunja.fullname" . -}} +{{- $svcPort := .Values.service.port -}} {{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} @@ -40,33 +41,21 @@ spec: - host: {{ .host | quote }} http: paths: - - path: / - pathType: Prefix + {{- range .paths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ $fullName }}-frontend + name: {{ $fullName }} port: - name: http - - path: /api - pathType: Prefix - backend: - service: - name: {{ $fullName }}-api - port: - name: api - - path: /dav - pathType: Prefix - backend: - service: - name: {{ $fullName }}-api - port: - name: api - - path: /.well-known - pathType: Prefix - backend: - service: - name: {{ $fullName }}-api - port: - name: api + number: {{ $svcPort }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} {{- end }} {{- end }} diff --git a/charts/vikunja/templates/frontend/service.yaml b/charts/vikunja/templates/service.yaml similarity index 62% rename from charts/vikunja/templates/frontend/service.yaml rename to charts/vikunja/templates/service.yaml index 115efb9..e64a4bc 100644 --- a/charts/vikunja/templates/frontend/service.yaml +++ b/charts/vikunja/templates/service.yaml @@ -1,13 +1,13 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "vikunja.fullname" . }}-frontend + name: {{ include "vikunja.fullname" . }} labels: {{- include "vikunja.labels" . | nindent 4 }} spec: - type: {{ .Values.frontend.service.type }} + type: {{ .Values.service.type }} ports: - - port: {{ .Values.frontend.service.port }} + - port: {{ .Values.service.port }} targetPort: http protocol: TCP name: http diff --git a/charts/vikunja/values.yaml b/charts/vikunja/values.yaml index 034b7d3..79f3275 100644 --- a/charts/vikunja/values.yaml +++ b/charts/vikunja/values.yaml @@ -4,32 +4,19 @@ replicaCount: 1 -frontend: - image: - repository: vikunja/frontend - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: latest - service: - type: ClusterIP - port: 80 - extraEnv: [] - extraVolumes: [] - extraVolumeMounts: [] - initContainers: [] -backend: - image: - repository: vikunja/api - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: latest - service: - type: ClusterIP - port: 3456 - extraEnv: [] - extraVolumes: [] - extraVolumeMounts: [] - initContainers: [] +image: + repository: vikunja/vikunja + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" +service: + type: ClusterIP + port: 3456 + +extraEnv: [] +extraVolumes: [] +extraVolumeMounts: [] +initContainers: [] ingress: enabled: false @@ -39,6 +26,9 @@ ingress: # kubernetes.io/tls-acme: "true" hosts: - host: tasks.local + paths: + - path: / + pathType: ImplementationSpecific tls: [] # - secretName: chart-example-tls @@ -127,7 +117,7 @@ config: existingSecret: "" secretKeys: dbPasswordKey: user-password - frontendUrl: https://tasks.local + publicUrl: https://tasks.local registration: true linkSharing: true taskAttachments: true