diff --git a/src/helm/README.md b/src/helm/README.md index 7cb901bb0..e32efecd1 100644 --- a/src/helm/README.md +++ b/src/helm/README.md @@ -106,10 +106,10 @@ Ralph is also distributed as a Helm chart. Check out the [Ralph Helm chart READM ### Deploy the dashboard suite: Warren -Let's create secrets needed for Warren deployment with: +Let's create the secrets needed for Warren deployment: ```bash -kubectl create secret generic warren-api-secrets --from-env-file=warren/charts/api/.secret -kubectl create secret generic warren-app-secrets --from-env-file=warren/charts/app/.secret +kubectl apply -f manifests/warren-app-secrets.yaml +kubectl apply -f manifests/warren-api-secrets.yaml ``` We can now deploy Warren along with its dependencies diff --git a/src/helm/manifests/warren-api-secrets.yaml b/src/helm/manifests/warren-api-secrets.yaml new file mode 100644 index 000000000..b75ed3fbc --- /dev/null +++ b/src/helm/manifests/warren-api-secrets.yaml @@ -0,0 +1,17 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: warren-api-db +type: Opaque +stringData: + WARREN_API_DB_PASSWORD: pass +--- +apiVersion: v1 +kind: Secret +metadata: + name: warren-api-lrs +type: Opaque +stringData: + WARREN_LRS_AUTH_BASIC_PASSWORD: password +--- \ No newline at end of file diff --git a/src/helm/manifests/warren-app-secrets.yaml b/src/helm/manifests/warren-app-secrets.yaml new file mode 100644 index 000000000..2a2bdee6a --- /dev/null +++ b/src/helm/manifests/warren-app-secrets.yaml @@ -0,0 +1,25 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: warren-app-db +type: Opaque +stringData: + WARREN_APP_DB_PASSWORD: pass +--- +apiVersion: v1 +kind: Secret +metadata: + name: warren-app-secret-key +type: Opaque +stringData: + WARREN_APP_SECRET_KEY: change_me_please +--- +apiVersion: v1 +kind: Secret +metadata: + name: warren-signing-key +type: Opaque +stringData: + WARREN_APP_SIGNING_KEY: change_me +--- \ No newline at end of file diff --git a/src/helm/warren/charts/api/.secret b/src/helm/warren/charts/api/.secret deleted file mode 100644 index 238ac7644..000000000 --- a/src/helm/warren/charts/api/.secret +++ /dev/null @@ -1,3 +0,0 @@ -WARREN_API_DB_PASSWORD=pass -WARREN_LRS_AUTH_BASIC_PASSWORD=password -WARREN_APP_SIGNING_KEY=change_me diff --git a/src/helm/warren/charts/api/templates/NOTES.txt b/src/helm/warren/charts/api/templates/NOTES.txt index 1bdec90bd..b2fd38352 100644 --- a/src/helm/warren/charts/api/templates/NOTES.txt +++ b/src/helm/warren/charts/api/templates/NOTES.txt @@ -1,21 +1,28 @@ -1. Get the application URL by running these commands: +CHART NAME: {{ .Chart.Name }} +CHART VERSION: {{ .Chart.Version }} +APP VERSION: {{ .Chart.AppVersion }} + +** Please be patient while the chart is being deployed ** + +1. Access your Warren api installation: {{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + Connect to one of the following hosts: + {{ if .Values.ingress.tls }} + https://{{ .Values.ingress.host }} + {{- else }} + http://{{ .Values.ingress.host }} {{- end }} -{{- end }} {{- else if contains "NodePort" .Values.service.type }} export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "api.fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT + echo "Warren API URL: http://$NODE_IP:$NODE_PORT" {{- else if contains "LoadBalancer" .Values.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "api.fullname" . }}' export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "api.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") echo http://$SERVICE_IP:{{ .Values.service.port }} {{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "api.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "api.name" . }},api.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") echo "Visit http://127.0.0.1:8080 to use your application" kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT diff --git a/src/helm/warren/charts/api/templates/_helpers.tpl b/src/helm/warren/charts/api/templates/_helpers.tpl index c0db42e2a..0a51dedc9 100644 --- a/src/helm/warren/charts/api/templates/_helpers.tpl +++ b/src/helm/warren/charts/api/templates/_helpers.tpl @@ -48,6 +48,8 @@ Selector labels {{- define "api.selectorLabels" -}} app.kubernetes.io/name: {{ include "api.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/component: api +app.kubernetes.io/part-of: warren {{- end }} {{/* @@ -63,7 +65,7 @@ Environment variables - name: "WARREN_API_DB_PASSWORD" valueFrom: secretKeyRef: - name: warren-api-secrets + name: warren-api-db key: WARREN_API_DB_PASSWORD - name: "WARREN_API_DB_ENGINE" value: "{{ .Values.fastapi.db.engine }}" @@ -74,20 +76,29 @@ Environment variables - name: "WARREN_ALLOWED_HOSTS" value: {{ printf "%q" .Values.fastapi.allowedHosts | replace " " "," | quote }} - name: "WARREN_LRS_HOSTS" - value: "{{ .Values.fastapi.lrs.hosts }}" + value: "{{ .Values.fastapi.lrs.host }}" - name: "WARREN_LRS_AUTH_BASIC_USERNAME" value: "{{ .Values.fastapi.lrs.username }}" - name: "WARREN_LRS_AUTH_BASIC_PASSWORD" valueFrom: secretKeyRef: - name: warren-api-secrets + name: warren-api-lrs key: WARREN_LRS_AUTH_BASIC_PASSWORD +- name: "WARREN_XI_LMS_BASE_URL" + value: "{{ .Values.fastapi.xi.lmsBaseUrl }}" +- name: "WARREN_XI_LMS_API_TOKEN" + valueFrom: + secretKeyRef: + name: warren-api-lms + key: WARREN_XI_LMS_API_TOKEN +- name: "WARREN_XI_DEFAULT_LANG" + value: "{{ .Values.fastapi.xi.defaultLang }}" - name: "WARREN_APP_SIGNING_ALGORITHM" value: "{{ .Values.fastapi.signingAlgorithm }}" - name: "WARREN_APP_SIGNING_KEY" valueFrom: secretKeyRef: - name: warren-api-secrets + name: warren-signing-key key: WARREN_APP_SIGNING_KEY {{- range $key, $val := .Values.env.secret }} - name: {{ $val.envName }} diff --git a/src/helm/warren/charts/api/templates/configmap.yaml b/src/helm/warren/charts/api/templates/configmap.yaml index 24bfead3a..f9113cab3 100644 --- a/src/helm/warren/charts/api/templates/configmap.yaml +++ b/src/helm/warren/charts/api/templates/configmap.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: "{{ template "api.fullname" . }}-logging-config" + name: "{{ include "api.fullname" . }}-logging-config" labels: {{- include "api.labels" . | nindent 4 }} data: diff --git a/src/helm/warren/charts/api/templates/cronjobs.yaml b/src/helm/warren/charts/api/templates/cronjobs.yaml new file mode 100644 index 000000000..7c384a306 --- /dev/null +++ b/src/helm/warren/charts/api/templates/cronjobs.yaml @@ -0,0 +1,49 @@ +{{- range .Values.fastapi.cronjobs }} +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + name: {{ include "api.fullname" $ }}-{{ .name }} + namespace: {{ $.Release.Namespace | quote }} + labels: {{- include "api.labels" $ | nindent 4 }} + {{- if $.Values.commonLabels }} + {{ toYaml $.Values.commonLabels | nindent 4 }} + {{- end }} +{{- if $.Values.commonAnnotations }} + annotations: +{{- toYaml $.Values.commonAnnotations | nindent 4 }} +{{- end }} +spec: + schedule: {{ .schedule | quote }} + successfulJobsHistoryLimit: 2 + concurrencyPolicy: Forbid + failedJobsHistoryLimit: 1 + suspend: {{ .suspend }} + jobTemplate: + spec: + template: + metadata: + labels: {{- include "api.selectorLabels" $ | nindent 12 }} + spec: + {{- include "fastapi.imagePullSecrets" $ | nindent 10 }} + containers: + - name: "{{ $.Chart.Name }}-{{ .name }}" + image: "{{ $.Values.image.repository }}:{{ $.Values.image.tag }}" + imagePullPolicy: {{ $.Values.image.pullPolicy }} + env: + - name: "WARREN_SERVER_HOST" + value: {{ include "api.fullname" $ }} + {{- include "api.envs" $ | nindent 16 }} + command: {{ .command | toJson }} + {{- if $.Values.resources }} + resources: {{ toYaml $.Values.resources | nindent 16 }} + {{- end }} + volumeMounts: + - name: logging-config + mountPath: "/etc/warren/api" + volumes: + - name: logging-config + configMap: + name: {{ include "api.fullname" $ }}-logging-config + restartPolicy: Never +{{- end }} diff --git a/src/helm/warren/charts/api/templates/deployment.yaml b/src/helm/warren/charts/api/templates/deployment.yaml index a13a579b9..2a1498f93 100644 --- a/src/helm/warren/charts/api/templates/deployment.yaml +++ b/src/helm/warren/charts/api/templates/deployment.yaml @@ -31,13 +31,13 @@ spec: livenessProbe: httpGet: path: /__heartbeat__ - port: http + port: {{ .Values.fastapi.port }} initialDelaySeconds: 15 periodSeconds: 30 readinessProbe: httpGet: path: /__lbheartbeat__ - port: http + port: {{ .Values.fastapi.port }} initialDelaySeconds: 5 periodSeconds: 5 startupProbe: @@ -48,7 +48,7 @@ spec: - "warren migration check" initialDelaySeconds: 5 periodSeconds: 5 - timeoutSeconds: 120 + timeoutSeconds: 30 env: {{- include "api.envs" . | nindent 12 }} {{ with .Values.fastapi.command }} @@ -61,7 +61,7 @@ spec: volumes: - name: logging-config configMap: - name: "warren-api-logging-config" + name: {{ include "api.fullname" . }}-logging-config {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/src/helm/warren/charts/api/templates/ingress.yaml b/src/helm/warren/charts/api/templates/ingress.yaml index 9ad4fa586..da86640f6 100644 --- a/src/helm/warren/charts/api/templates/ingress.yaml +++ b/src/helm/warren/charts/api/templates/ingress.yaml @@ -2,12 +2,11 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ template "api.fullname" . }}-ingress + name: {{ template "api.fullname" . }} labels: {{- include "api.labels" . | nindent 4 }} {{- if .Values.commonLabels }} {{ toYaml .Values.commonLabels | nindent 4 }} {{- end }} - app.kubernetes.io/component: fastapi annotations: {{- if .Values.commonAnnotations }} {{- toYaml .Values.commonAnnotations | nindent 4 }} @@ -17,11 +16,11 @@ metadata: {{- end }} spec: ingressClassName: {{ .Values.ingress.className }} - {{- if $.Values.ingress.tls.enable }} + {{- if $.Values.ingress.tls.enabled }} tls: - hosts: - {{ $.Values.ingress.host }} - secretName: {{ $.Values.ingress.tls.certificateSecretName }} + secretName: {{ $.Values.ingress.tls.certificateSecretName }} {{- end }} rules: - host: {{ .Values.ingress.host }} @@ -31,7 +30,7 @@ spec: pathType: Prefix backend: service: - name: {{ include "api.fullname" . }}-service + name: {{ include "api.fullname" . }} port: number: {{ .Values.service.port }} {{- end }} diff --git a/src/helm/warren/charts/api/templates/jobs.yaml b/src/helm/warren/charts/api/templates/jobs.yaml index 724befa7e..ed69372a9 100644 --- a/src/helm/warren/charts/api/templates/jobs.yaml +++ b/src/helm/warren/charts/api/templates/jobs.yaml @@ -19,12 +19,11 @@ spec: template: metadata: labels: {{- include "api.selectorLabels" $ | nindent 8 }} - app.kubernetes.io/component: fastapi spec: {{- include "fastapi.imagePullSecrets" $ | nindent 6 }} containers: - - name: fastapi-{{ .name }} - image: {{ $.Values.image.repository }}:{{ $.Values.image.tag }} + - name: "{{ $.Chart.Name }}-{{ .name }}" + image: "{{ $.Values.image.repository }}:{{ $.Values.image.tag }}" imagePullPolicy: {{ $.Values.image.pullPolicy }} env: {{- include "api.envs" $ | nindent 12 }} @@ -38,6 +37,6 @@ spec: volumes: - name: logging-config configMap: - name: "warren-api-logging-config" + name: {{ include "api.fullname" $ }}-logging-config restartPolicy: Never {{- end }} diff --git a/src/helm/warren/charts/api/templates/service.yaml b/src/helm/warren/charts/api/templates/service.yaml index 8ea391933..014966d52 100644 --- a/src/helm/warren/charts/api/templates/service.yaml +++ b/src/helm/warren/charts/api/templates/service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "api.fullname" . }}-service + name: {{ include "api.fullname" . }} labels: {{- include "api.labels" . | nindent 4 }} spec: ports: diff --git a/src/helm/warren/charts/api/values.yaml b/src/helm/warren/charts/api/values.yaml index 9a521a759..afaa274ec 100644 --- a/src/helm/warren/charts/api/values.yaml +++ b/src/helm/warren/charts/api/values.yaml @@ -23,7 +23,7 @@ ingress: host: "" annotations: {} tls: - enable: false + enabled: false certificateSecretName: warren-api-certificate affinity: @@ -76,6 +76,7 @@ volumeMounts: # API configuration fastapi: fullname: "api" + port: 8100 allowedHosts: - "*" signingAlgorithm: "HS256" @@ -86,8 +87,11 @@ fastapi: host: "warren-postgresql" port: 5432 lrs: - hosts: "http://lrs-ralph:8080" + host: "http://lrs-ralph:8080" username: "admin" + xi: + lmsBaseUrl: "http://my-moodle-instance" + defaultLang: "fr" command: - "uvicorn" - "warren.api:app" @@ -101,6 +105,18 @@ fastapi: jobs: - name: dbmigrate command: ["warren", "migration", "upgrade", "head"] + cronjobs: [] + # Cronjobs should define a name, a schedule, the schedule suspension + # and a command to execute, e.g. + # - name: "index-moodle" + # schedule: "0 1 * * *" + # suspend: false + # command: + # - "warren" + # - "xi" + # - "index" + # - "all" + # - "--ignore-errors" resources: {} loggingConfig: diff --git a/src/helm/warren/charts/app/.secret b/src/helm/warren/charts/app/.secret deleted file mode 100644 index 4de6c33f1..000000000 --- a/src/helm/warren/charts/app/.secret +++ /dev/null @@ -1,3 +0,0 @@ -WARREN_APP_SECRET_KEY=change_me_please -WARREN_APP_DB_PASSWORD=pass -WARREN_APP_SIGNING_KEY=change_me diff --git a/src/helm/warren/charts/app/templates/NOTES.txt b/src/helm/warren/charts/app/templates/NOTES.txt index 01a7d7b17..44c896d4b 100644 --- a/src/helm/warren/charts/app/templates/NOTES.txt +++ b/src/helm/warren/charts/app/templates/NOTES.txt @@ -1,14 +1,21 @@ -1. Get the application URL by running these commands: +CHART NAME: {{ .Chart.Name }} +CHART VERSION: {{ .Chart.Version }} +APP VERSION: {{ .Chart.AppVersion }} + +** Please be patient while the chart is being deployed ** + +1. Access your Warren app installation: {{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + Connect to one of the following hosts: + {{ if .Values.ingress.tls }} + https://{{ .Values.ingress.host }} + {{- else }} + http://{{ .Values.ingress.host }} {{- end }} -{{- end }} {{- else if contains "NodePort" .Values.service.type }} export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "app.fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT + echo "Warren APP URL: http://$NODE_IP:$NODE_PORT" {{- else if contains "LoadBalancer" .Values.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "app.fullname" . }}' diff --git a/src/helm/warren/charts/app/templates/_helpers.tpl b/src/helm/warren/charts/app/templates/_helpers.tpl index 1574d6e51..e73271dfa 100644 --- a/src/helm/warren/charts/app/templates/_helpers.tpl +++ b/src/helm/warren/charts/app/templates/_helpers.tpl @@ -48,8 +48,8 @@ Selector labels {{- define "app.selectorLabels" -}} app.kubernetes.io/name: {{ include "app.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} -app: warren-app -service: app +app.kubernetes.io/component: app +app.kubernetes.io/part-of: warren {{- end }} {{/* @@ -63,7 +63,7 @@ Environment variables - name: "WARREN_APP_SECRET_KEY" valueFrom: secretKeyRef: - name: warren-app-secrets + name: warren-app-secret-key key: WARREN_APP_SECRET_KEY - name: "WARREN_APP_ALLOWED_HOSTS" value: "{{ .Values.django.allowedHosts | join "," }}" @@ -74,7 +74,7 @@ Environment variables - name: "WARREN_APP_DB_PASSWORD" valueFrom: secretKeyRef: - name: warren-app-secrets + name: warren-app-db key: WARREN_APP_DB_PASSWORD - name: "WARREN_APP_DB_HOST" value: "{{ .Values.django.db.host }}" @@ -85,7 +85,7 @@ Environment variables - name: "WARREN_APP_SIGNING_KEY" valueFrom: secretKeyRef: - name: warren-app-secrets + name: warren-signing-key key: WARREN_APP_SIGNING_KEY - name: "WARREN_APP_ACCESS_TOKEN_LIFETIME" value: "{{ .Values.django.accessTokenLifetime }}" diff --git a/src/helm/warren/charts/app/templates/configmap.yaml b/src/helm/warren/charts/app/templates/configmap.yaml index 59be02fcb..5b4e08d8f 100644 --- a/src/helm/warren/charts/app/templates/configmap.yaml +++ b/src/helm/warren/charts/app/templates/configmap.yaml @@ -4,12 +4,6 @@ metadata: name: "{{ template "app.fullname" . }}-nginx" data: config: | - # nginx.conf - user nobody nogroup; - # 'user nobody nobody;' for systems with 'nobody' as a group instead - error_log /var/log/nginx/error.log warn; - pid /var/run/nginx.pid; - events { worker_connections 1024; # increase if you have lots of clients accept_mutex off; # set to 'on' if nginx worker_processes > 1 @@ -45,59 +39,10 @@ data: location /__status__ { stub_status; - allow 127.0.0.1; - deny all; access_log off; } } - types { - text/html html htm shtml; - text/css css; - text/xml xml rss; - image/gif gif; - image/jpeg jpeg jpg; - application/x-javascript js; - text/plain txt; - text/x-component htc; - text/mathml mml; - image/png png; - image/x-icon ico; - image/x-jng jng; - image/vnd.wap.wbmp wbmp; - application/java-archive jar war ear; - application/mac-binhex40 hqx; - application/pdf pdf; - application/x-cocoa cco; - application/x-java-archive-diff jardiff; - application/x-java-jnlp-file jnlp; - application/x-makeself run; - application/x-perl pl pm; - application/x-pilot prc pdb; - application/x-rar-compressed rar; - application/x-redhat-package-manager rpm; - application/x-sea sea; - application/x-shockwave-flash swf; - application/x-stuffit sit; - application/x-tcl tcl tk; - application/x-x509-ca-cert der pem crt; - application/x-xpinstall xpi; - application/zip zip; - application/octet-stream deb; - application/octet-stream bin exe dll; - application/octet-stream dmg; - application/octet-stream eot; - application/octet-stream iso img; - application/octet-stream msi msp msm; - audio/mpeg mp3; - audio/x-realaudio ra; - video/mpeg mpeg mpg; - video/quicktime mov; - video/x-flv flv; - video/x-msvideo avi; - video/x-ms-wmv wmv; - video/x-ms-asf asx asf; - video/x-mng mng; - } + include /etc/nginx/mime.types; } diff --git a/src/helm/warren/charts/app/templates/deployment.yaml b/src/helm/warren/charts/app/templates/deployment.yaml index b7c5c3f53..bd7435aee 100644 --- a/src/helm/warren/charts/app/templates/deployment.yaml +++ b/src/helm/warren/charts/app/templates/deployment.yaml @@ -90,7 +90,8 @@ spec: - name: {{ .Values.volumes.media.name }} mountPath: /usr/share/nginx/media - name: nginx - mountPath: /etc/nginx + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf readOnly: true livenessProbe: httpGet: diff --git a/src/helm/warren/charts/app/templates/ingress.yaml b/src/helm/warren/charts/app/templates/ingress.yaml index c6983da22..e15e46f80 100644 --- a/src/helm/warren/charts/app/templates/ingress.yaml +++ b/src/helm/warren/charts/app/templates/ingress.yaml @@ -2,13 +2,12 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ template "app.fullname" . }}-ingress + name: {{ template "app.fullname" . }} namespace: {{ .Release.Namespace | quote }} labels: {{- include "app.labels" . | nindent 4 }} {{- if .Values.commonLabels }} {{ toYaml .Values.commonLabels | nindent 4 }} {{- end }} - app.kubernetes.io/component: django annotations: {{- if .Values.commonAnnotations }} {{- toYaml .Values.commonAnnotations | nindent 4 }} @@ -18,11 +17,11 @@ metadata: {{- end }} spec: ingressClassName: {{ .Values.ingress.class_name }} - {{- if $.Values.ingress.tls.enable }} + {{- if $.Values.ingress.tls.enabled }} tls: - - hosts: - - {{ $.Values.ingress.host }} - secretName: {{ $.Values.ingress.tls.certificateSecretName }} + - hosts: + - {{ $.Values.ingress.host | quote }} + secretName: {{ $.Values.ingress.tls.certificateSecretName }} {{- end }} rules: - host: {{ .Values.ingress.host }} @@ -32,7 +31,7 @@ spec: pathType: Prefix backend: service: - name: {{ include "app.fullname" . }}-service + name: {{ include "app.fullname" . }} port: number: {{ .Values.nginx.port }} {{- end }} diff --git a/src/helm/warren/charts/app/templates/jobs.yaml b/src/helm/warren/charts/app/templates/jobs.yaml index 7ddb36e4e..4475f105b 100644 --- a/src/helm/warren/charts/app/templates/jobs.yaml +++ b/src/helm/warren/charts/app/templates/jobs.yaml @@ -19,12 +19,11 @@ spec: template: metadata: labels: {{- include "app.selectorLabels" $ | nindent 8 }} - app.kubernetes.io/component: django spec: {{- include "django.imagePullSecrets" $ | nindent 6 }} containers: - - name: django-{{ .name }} - image: {{ $.Values.image.repository }}:{{ $.Values.image.tag }} + - name: "{{ $.Chart.Name }}-{{ .name }}" + image: "{{ $.Values.image.repository }}:{{ $.Values.image.tag }}" imagePullPolicy: {{ $.Values.image.pullPolicy }} env: {{- include "app.envs" $ | nindent 12 }} diff --git a/src/helm/warren/charts/app/templates/service.yaml b/src/helm/warren/charts/app/templates/service.yaml index 01cf95873..10a7393e1 100644 --- a/src/helm/warren/charts/app/templates/service.yaml +++ b/src/helm/warren/charts/app/templates/service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "app.fullname" . }}-service + name: {{ include "app.fullname" . }} labels: {{- include "app.labels" . | nindent 4 }} spec: ports: diff --git a/src/helm/warren/charts/app/values.yaml b/src/helm/warren/charts/app/values.yaml index b2defda92..b45397649 100644 --- a/src/helm/warren/charts/app/values.yaml +++ b/src/helm/warren/charts/app/values.yaml @@ -24,14 +24,14 @@ ingress: host: "" annotations: {} tls: - enable: false + enabled: false certificateSecretName: warren-app-certificate persistence: enabled: true storageClass: "standard" accessModes: - - ReadWriteOnce + - ReadWriteMany size: 2Gi affinity: