diff --git a/src/helm/warren/charts/api/templates/NOTES.txt b/src/helm/warren/charts/api/templates/NOTES.txt index 1bdec90bd..dec387166 100644 --- a/src/helm/warren/charts/api/templates/NOTES.txt +++ b/src/helm/warren/charts/api/templates/NOTES.txt @@ -1,6 +1,6 @@ 1. Get the application URL by running these commands: {{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} +{{- range $host := .Values.ingress.host }} {{- range .paths }} http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} {{- end }} diff --git a/src/helm/warren/charts/api/templates/_helpers.tpl b/src/helm/warren/charts/api/templates/_helpers.tpl index 4b4a657b0..bd32fccca 100644 --- a/src/helm/warren/charts/api/templates/_helpers.tpl +++ b/src/helm/warren/charts/api/templates/_helpers.tpl @@ -76,7 +76,7 @@ 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" diff --git a/src/helm/warren/charts/api/templates/deployment.yaml b/src/helm/warren/charts/api/templates/deployment.yaml index a13a579b9..d5f9720c2 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 }} diff --git a/src/helm/warren/charts/api/templates/ingress.yaml b/src/helm/warren/charts/api/templates/ingress.yaml index d0e72571d..da86640f6 100644 --- a/src/helm/warren/charts/api/templates/ingress.yaml +++ b/src/helm/warren/charts/api/templates/ingress.yaml @@ -7,7 +7,6 @@ metadata: {{- 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/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..e2b75fcb2 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,7 +87,7 @@ fastapi: host: "warren-postgresql" port: 5432 lrs: - hosts: "http://lrs-ralph:8080" + host: "http://lrs-ralph:8080" username: "admin" command: - "uvicorn" diff --git a/src/helm/warren/charts/app/templates/NOTES.txt b/src/helm/warren/charts/app/templates/NOTES.txt index 01a7d7b17..fb2347d01 100644 --- a/src/helm/warren/charts/app/templates/NOTES.txt +++ b/src/helm/warren/charts/app/templates/NOTES.txt @@ -1,6 +1,6 @@ 1. Get the application URL by running these commands: {{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} +{{- range $host := .Values.ingress.host }} {{- range .paths }} http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} {{- end }} diff --git a/src/helm/warren/charts/app/templates/configmap.yaml b/src/helm/warren/charts/app/templates/configmap.yaml index 59be02fcb..f55d24c0b 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,9 @@ 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; - } } diff --git a/src/helm/warren/charts/app/templates/ingress.yaml b/src/helm/warren/charts/app/templates/ingress.yaml index 6adaa573f..e15e46f80 100644 --- a/src/helm/warren/charts/app/templates/ingress.yaml +++ b/src/helm/warren/charts/app/templates/ingress.yaml @@ -8,7 +8,6 @@ metadata: {{- 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/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..bb631a18a 100644 --- a/src/helm/warren/charts/app/values.yaml +++ b/src/helm/warren/charts/app/values.yaml @@ -24,7 +24,7 @@ ingress: host: "" annotations: {} tls: - enable: false + enabled: false certificateSecretName: warren-app-certificate persistence: