diff --git a/chart/Chart.yaml b/chart/Chart.yaml index dfd476dad..820c2313a 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 +version: 0.1.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/chart/README.md b/chart/README.md index a04b3d29a..1bcbd8753 100644 --- a/chart/README.md +++ b/chart/README.md @@ -1,6 +1,6 @@ # calckey -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: rc](https://img.shields.io/badge/AppVersion-rc-informational?style=flat-square) +![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: rc](https://img.shields.io/badge/AppVersion-rc-informational?style=flat-square) A fun, new, open way to experience social media https://calckey.org @@ -22,8 +22,14 @@ A fun, new, open way to experience social media https://calckey.org | autoscaling.minReplicas | int | `1` | | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | | calckey.allowedPrivateNetworks | list | `[]` | If you want to allow calckey to connect to private ips, enter the cidrs here. | +| calckey.deepl.authKey | string | `""` | | +| calckey.deepl.isPro | bool | `false` | | +| calckey.deepl.managed | bool | `false` | | | calckey.domain | string | `"calckey.local"` | | | calckey.isManagedHosting | bool | `true` | | +| calckey.libreTranslate.apiKey | string | `""` | | +| calckey.libreTranslate.apiUrl | string | `""` | | +| calckey.libreTranslate.managed | bool | `false` | | | calckey.objectStorage.access_key | string | `""` | | | calckey.objectStorage.access_secret | string | `""` | | | calckey.objectStorage.baseUrl | string | `""` | | @@ -44,7 +50,7 @@ A fun, new, open way to experience social media https://calckey.org | calckey.smtp.port | int | `587` | | | calckey.smtp.server | string | `"smtp.mailgun.org"` | | | calckey.smtp.useImplicitSslTls | bool | `false` | | -| elasticsearch | object | `{"auth":null,"enabled":false,"hostname":"","port":9200,"ssl":false}` | https://github.com/bitnami/charts/tree/master/bitnami/elasticsearch#parameters | +| elasticsearch | object | `{"auth":{},"enabled":false,"hostname":"","port":9200,"ssl":false}` | https://github.com/bitnami/charts/tree/master/bitnami/elasticsearch#parameters | | fullnameOverride | string | `""` | | | image.pullPolicy | string | `"IfNotPresent"` | | | image.repository | string | `"docker.io/thatonecalculator/calckey"` | | diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index 00702ec34..b732fa5a4 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -282,10 +282,15 @@ allowedPrivateNetworks: #maxUserSignups: 100 isManagedHosting: {{ .Values.calckey.isManagedHosting }} deepl: - managed: false -# authKey: '' -# isPro: false -# + managed: {{ .Values.calckey.deepl.managed }} + authKey: {{ .Values.calckey.deepl.authKey | quote}} + isPro: {{ .Values.calckey.deepl.isPro }} + +libreTranslate: + managed: {{ .Values.calckey.libreTranslate.managed }} + apiUrl: {{ .Values.calckey.libreTranslate.apiUrl | quote }} + apiKey: {{ .Values.calckey.libreTranslate.apiKey | quote }} + email: managed: {{ .Values.calckey.smtp.managed }} address: {{ .Values.calckey.smtp.from_address | quote }} diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index 5bcf8851a..9b0c60694 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -38,6 +38,10 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - pnpm + - run + - start env: - name: "NODE_ENV" value: "production" diff --git a/chart/templates/job-db-migrate.yaml b/chart/templates/job-db-migrate.yaml new file mode 100644 index 000000000..e006aef3b --- /dev/null +++ b/chart/templates/job-db-migrate.yaml @@ -0,0 +1,59 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ include "calckey.fullname" . }}-db-migrate + labels: + {{- include "calckey.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": post-install,pre-upgrade + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded + "helm.sh/hook-weight": "-2" +spec: + template: + metadata: + name: {{ include "calckey.fullname" . }}-db-migrate + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + restartPolicy: Never + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "calckey.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + volumes: + - name: config-volume + secret: + secretName: {{ template "calckey.fullname" . }}-config + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - pnpm + - run + - migrate + env: + - name: "NODE_ENV" + value: "production" + volumeMounts: + - name: config-volume + mountPath: /calckey/.config + {{- 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/chart/values.yaml b/chart/values.yaml index 1f8f8c8f7..84c0536e5 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -14,6 +14,16 @@ calckey: isManagedHosting: true domain: calckey.local + deepl: + managed: false + authKey: "" + isPro: false + + libreTranslate: + managed: false + apiUrl: "" + apiKey: "" + smtp: managed: true from_address: notifications@example.com