Skip to content

Commit

Permalink
fixup! 🔧(helm) rework chart based on jenny helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
wilbrdt committed May 22, 2024
1 parent aa28caa commit 4f4f0e9
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 77 deletions.
2 changes: 1 addition & 1 deletion src/helm/warren/charts/api/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion src/helm/warren/charts/api/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/helm/warren/charts/api/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
Expand Down
7 changes: 3 additions & 4 deletions src/helm/warren/charts/api/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -31,7 +30,7 @@ spec:
pathType: Prefix
backend:
service:
name: {{ include "api.fullname" . }}-service
name: {{ include "api.fullname" . }}
port:
number: {{ .Values.service.port }}
{{- end }}
2 changes: 1 addition & 1 deletion src/helm/warren/charts/api/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions src/helm/warren/charts/api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ingress:
host: ""
annotations: {}
tls:
enable: false
enabled: false
certificateSecretName: warren-api-certificate

affinity:
Expand Down Expand Up @@ -76,6 +76,7 @@ volumeMounts:
# API configuration
fastapi:
fullname: "api"
port: 8100
allowedHosts:
- "*"
signingAlgorithm: "HS256"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/helm/warren/charts/app/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down
56 changes: 0 additions & 56 deletions src/helm/warren/charts/app/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
}
11 changes: 5 additions & 6 deletions src/helm/warren/charts/app/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -32,7 +31,7 @@ spec:
pathType: Prefix
backend:
service:
name: {{ include "app.fullname" . }}-service
name: {{ include "app.fullname" . }}
port:
number: {{ .Values.nginx.port }}
{{- end }}
2 changes: 1 addition & 1 deletion src/helm/warren/charts/app/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/helm/warren/charts/app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ingress:
host: ""
annotations: {}
tls:
enable: false
enabled: false
certificateSecretName: warren-app-certificate

persistence:
Expand Down

0 comments on commit 4f4f0e9

Please sign in to comment.