From 28b3153b6cdaf6d26a0ff5165c87e0aac0d051e2 Mon Sep 17 00:00:00 2001 From: perf3ct Date: Thu, 28 Sep 2023 19:06:21 -0700 Subject: [PATCH] change environment variable names --- templates/backend.yaml | 8 -- values.yaml | 16 ++- values.yaml.old | 313 ----------------------------------------- 3 files changed, 15 insertions(+), 322 deletions(-) delete mode 100644 values.yaml.old diff --git a/templates/backend.yaml b/templates/backend.yaml index 2fd9d54..b867173 100644 --- a/templates/backend.yaml +++ b/templates/backend.yaml @@ -14,14 +14,6 @@ service: port: 3456 protocol: HTTP -env: - {{ if .Values.typesense.enabled }} - VIKUNJA_TYPESENSE_ENABLED: {{ .Values.typesense.apiKey }} - VIKUNJA_TYPESENSE_URL: {{ .Values.typesense.host }} - VIKUNJA_TYPESENSE_APIKEY: {{ .Values.typesense.apiKey }} - {{ end }} - - {{ end }} diff --git a/values.yaml b/values.yaml index 80d589c..a119345 100644 --- a/values.yaml +++ b/values.yaml @@ -4,6 +4,20 @@ # These entries are shared between all the vikunja components +env: + VIKUNJA_REDIS_HOST: '{{ printf "%s-redis-master" .Release.Name }}' + VIKUNJA_REDIS_DB: "{{ .Release.Name }}" + VIKUNJA_DATABASE_HOST: "{{ .Release.Name }}-postgresql" + VIKUNJA_DATABASE_USER: "{{ .Values.postgresql.global.postgresql.auth.username }}" + VIKUNJA_DATABASE_DATABASE: "{{ .Values.postgresql.global.postgresql.auth.database }}" + # -- You should provide your own secret outside of this helm-chart and use `postgresql.global.postgresql.auth.existingSecret` to provide credentials to the postgresql instance + VIKUNJA_DATABASE_PASSWORD: "{{ .Values.postgresql.global.postgresql.auth.password }}" + VIKUNJA_TYPESENSE_ENABLED: "{{ .Values.typesense.enabled }}" + VIKUNJA_TYPESENSE_APIKEY: "{{ .Values.typesense.env.TYPESENSE_API_KEY }}" + VIKUNJA_TYPESENSE_URL: '{{ printf "%s-typesense" .Release.Name }}' + VIKUNJA_FRONTEND_URL: '{{ printf "http://%s-frontend" .Release.Name }}' + VIKUNJA_API_URL: '{{ printf "http://%s-backend:3456" .Release.Name }}' + image: tag: 0.21.0 @@ -73,7 +87,7 @@ redis: enabled: false typesense: - enabled: false + enabled: true env: TYPESENSE_DATA_DIR: /tsdata TYPESENSE_API_KEY: typesense diff --git a/values.yaml.old b/values.yaml.old deleted file mode 100644 index bb89c14..0000000 --- a/values.yaml.old +++ /dev/null @@ -1,313 +0,0 @@ -# ┐ ┬o┬┌ ┬ ┐┌┐┐ ┬┬─┐ -# │┌┘│├┴┐│ ││││┌ ││─┤ -# └┘ ┘┘ ┘┘─┘┘└┘└─┘┘ ┘ - -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # Extra labels - extraLabels: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -# Extra labels that will be added to all resources -extraLabels: {} - -# ┬─┐┬─┐┌─┐┌┐┐┌┐┐┬─┐┌┐┐┬─┐ -# ├─ │┬┘│ ││││ │ ├─ ││││ │ -# ┘ ┘└┘┘─┘┘└┘ ┘ ┴─┘┘└┘┘─┘ - -frontend: - # Public API URL that client's browser will reach - apiUrl: "" - - replicaCount: 1 - - image: - repository: vikunja/frontend - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: "" - - podSecurityContext: {} - # fsGroup: 1000 - - securityContext: - allowPrivilegeEscalation: false - runAsUser: 101 # nginx - capabilities: - drop: - - ALL - add: - - NET_BIND_SERVICE - - - service: - type: ClusterIP - port: 80 - # If you want to set other fields, like externalName, externalTrafficPolicy, etc. - extraSpec: {} - - ingress: - enabled: false - className: "" - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: - - path: / - pathType: ImplementationSpecific - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - - resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - - autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - - initContainers: [] - - sidecarContainers: [] - - # Extra keys to set in deployment.spec. - # Useful if you want to set minReadySeconds, progressDeadlineSeconds, strategy - extraDeploymentSpec: {} - - pdb: - enabled: false - # maxUnavailable: 50% - minAvailable: 50% - - imagePullSecrets: [] - - podAnnotations: {} - - nodeSelector: {} - - tolerations: [] - - affinity: {} - - extraVolumes: [] - - extraVolumeMounts: [] - - livenessProbe: {} - # httpGet: - # path: /ready - # port: http - readinessProbe: {} - # httpGet: - # path: /ready - # port: http - startupProbe: {} - # httpGet: - # path: / - # port: http - - env: {} - - envFrom: {} - -# ┬─┐┬─┐o -# │─┤│─┘│ -# ┘ ┘┘ ┘ - -api: - # Values for this config are described here https://vikunja.io/docs/config-options/ - config: - service: - JWTSecret: "" - interface: ":3456" - frontendurl: "" - enableregistration: false - timezone: GMT - database: - type: sqlite - path: /sqlite/vikunja.db - cache: - enabled: true - type: redis - redis: - enabled: false - host: "" - password: "" - db: 0 - cors: - enable: false - origins: [] - mailer: - enabled: false - log: - path: null - files: - basepath: /files - defaultsettings: - avatar_provider: gravatar - discoverable_by_name: true - discoverable_by_email: true - week_start: 1 - - persistence: - enabled: false - # Specifies whether a PVC should be created - create: true - # The name of the PVC to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - spec: {} - # accessModes: ["ReadWriteOnce"] - # resources: - # requests: - # storage: 1Gi - # storageClassName: openebs-hostpath - - replicaCount: 1 - - image: - repository: vikunja/api - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: "" - - securityContext: - capabilities: - add: [CAP_CHOWN] - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - - service: - type: ClusterIP - port: 80 - # If you want to set other fields, like externalName, externalTrafficPolicy, etc. - extraSpec: {} - - ingress: - enabled: false - className: "" - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: - - path: / - pathType: ImplementationSpecific - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - - resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - - autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - - initContainers: [] - - sidecarContainers: [] - - # Extra keys to set in deployment.spec. - # Useful if you want to set minReadySeconds, progressDeadlineSeconds, strategy - extraDeploymentSpec: {} - - pdb: - enabled: false - # maxUnavailable: 50% - minAvailable: 50% - - imagePullSecrets: [] - - podAnnotations: {} - - podSecurityContext: {} - # fsGroup: 1000 - - nodeSelector: {} - - tolerations: [] - - affinity: {} - - extraVolumes: [] - - extraVolumeMounts: [] - - livenessProbe: {} - # httpGet: - # path: /ready - # port: http - readinessProbe: {} - # httpGet: - # path: /ready - # port: http - startupProbe: {} - # httpGet: - # path: / - # port: http - - env: {} - - envFrom: {} - -# ┬─┐┌─┐┐─┐┌┐┐┌─┐┬─┐┬─┐┐─┐┐─┐┬ -# │─┘│ │└─┐ │ │ ┬│┬┘├─ └─┐│ ││ -# ┘ ┘─┘──┘ ┘ ┘─┘┘└┘┴─┘──┘└─\┘─┘ - -postgresqlEnabled: false -# Please refer to PostgreSQL subchart for a full list of possible values -postgresql: {} - -# ┬─┐┬─┐┬─┐o┐─┐ -# │┬┘├─ │ ││└─┐ -# ┘└┘┴─┘┘─┘┘──┘ - -redisEnabled: false -# Please refer to Redis subchart for a full list of possible values -redis: {} - -# ┬─┐┬─┐┐ ┬ -# │┬┘│─┤│││ -# ┘└┘┘ ┘└┴┘ - -# You can create custom resources from the plaintext definition -raw: []