From cb5b1453dfbfb1916d75fc13d7328b1fc11dd7a6 Mon Sep 17 00:00:00 2001 From: Yurii Vlasov Date: Tue, 21 Feb 2023 15:44:51 +0200 Subject: [PATCH] v0.1.2 --- .gitignore | 1 + .helmignore | 1 + Chart.yaml | 4 ++-- README.md | 13 +++++++++++++ templates/api/deployment.yaml | 5 +++-- templates/api/pdb.yaml | 18 ++++++++++++++++++ templates/frontend/pdb.yaml | 18 ++++++++++++++++++ values.yaml | 13 +++++++++++-- 8 files changed, 67 insertions(+), 6 deletions(-) create mode 100644 templates/api/pdb.yaml create mode 100644 templates/frontend/pdb.yaml diff --git a/.gitignore b/.gitignore index 948259a..f899a70 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ charts/*.tgz +*.tgz diff --git a/.helmignore b/.helmignore index 0e8a0eb..898df48 100644 --- a/.helmignore +++ b/.helmignore @@ -21,3 +21,4 @@ .idea/ *.tmproj .vscode/ + diff --git a/Chart.yaml b/Chart.yaml index 25e8768..6be89a3 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -10,8 +10,8 @@ description: |- the high alpine areas of the Andes and a relative of the llama. annotations: category: TaskTracker -version: 0.1.1 -appVersion: 0.20.1 +version: 0.1.2 +appVersion: unstable kubeVersion: ">= 1.19" dependencies: - name: redis diff --git a/README.md b/README.md index 5427954..d9b94fc 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,19 @@ Deployes both frontend and backend. Also, you can deploy bitnami's PostgreSQL an Kubernetes >= 1.19 Helm >= 3 +## Quickstart + +Default settings should work for you and if you define ingress settings according to your controller (for both API and Frontend), you will be able to access the frontend. Anyway, it won't have any default credentials. In order to create a user, you **have to enable registration** and register a new user. + +```yaml +api: + config: + service: + enableregistration: true +``` + +Once you have registered, you can disable registration back if you do not need it. + ## Advanced features ### Raw resources diff --git a/templates/api/deployment.yaml b/templates/api/deployment.yaml index e0f4642..6ff632b 100644 --- a/templates/api/deployment.yaml +++ b/templates/api/deployment.yaml @@ -16,8 +16,9 @@ spec: {{- include "vikunja.apiSelectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.api.podAnnotations }} annotations: + checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} + {{- with .Values.api.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: @@ -90,7 +91,7 @@ spec: {{- if eq .Values.api.config.database.type "sqlite" }} - name: storage subPath: sqlite - mountPath: {{ base .Values.api.config.database.path | quote }} + mountPath: {{ dir .Values.api.config.database.path | quote }} {{- end }} {{- end }} {{- with .Values.api.extraVolumeMounts }} diff --git a/templates/api/pdb.yaml b/templates/api/pdb.yaml new file mode 100644 index 0000000..d5a2e11 --- /dev/null +++ b/templates/api/pdb.yaml @@ -0,0 +1,18 @@ +{{- if .Values.api.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "vikunja.apiFullname" . }} + labels: + {{- include "vikunja.labels" . | nindent 4 }} +spec: + {{- with .Values.api.pdb.maxUnavailable }} + maxUnavailable: {{ . }} + {{- end }} + {{- with .Values.api.pdb.minAvailable }} + minAvailable: {{ . }} + {{- end }} + selector: + matchLabels: + {{- include "vikunja.apiSelectorLabels" . | nindent 6 }} +{{- end }} diff --git a/templates/frontend/pdb.yaml b/templates/frontend/pdb.yaml new file mode 100644 index 0000000..c81810f --- /dev/null +++ b/templates/frontend/pdb.yaml @@ -0,0 +1,18 @@ +{{- if .Values.frontend.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "vikunja.frontendFullname" . }} + labels: + {{- include "vikunja.labels" . | nindent 4 }} +spec: + {{- with .Values.frontend.pdb.maxUnavailable }} + maxUnavailable: {{ . }} + {{- end }} + {{- with .Values.frontend.pdb.minAvailable }} + minAvailable: {{ . }} + {{- end }} + selector: + matchLabels: + {{- include "vikunja.frontendSelectorLabels" . | nindent 6 }} +{{- end }} diff --git a/values.yaml b/values.yaml index 7a6475f..b8c1d5d 100644 --- a/values.yaml +++ b/values.yaml @@ -95,6 +95,11 @@ frontend: # Useful if you want to set minReadySeconds, progressDeadlineSeconds, strategy extraDeploymentSpec: {} + pdb: + enabled: false + # maxUnavailable: 50% + minAvailable: 50% + imagePullSecrets: [] podAnnotations: {} @@ -184,8 +189,7 @@ api: securityContext: capabilities: - drop: - - ALL + add: [CAP_CHOWN] # readOnlyRootFilesystem: true # runAsNonRoot: true # runAsUser: 1000 @@ -239,6 +243,11 @@ api: # Useful if you want to set minReadySeconds, progressDeadlineSeconds, strategy extraDeploymentSpec: {} + pdb: + enabled: false + # maxUnavailable: 50% + minAvailable: 50% + imagePullSecrets: [] podAnnotations: {}