Skip to content

Commit f77d327

Browse files
committed
refactor: update ingress templates to use variable indexing
- Refactored frontend and general ingress templates to utilize variable indexing because helm does not allow dashes.
1 parent 24c508a commit f77d327

File tree

5 files changed

+24
-22
lines changed

5 files changed

+24
-22
lines changed

helm/Chart.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: amazee-ai
22
description: A Helm Chart for amazee.ai with independent frontend and backend services
3-
version: 0.0.9
3+
version: 0.0.10
44
apiVersion: v2
5-
appVersion: "0.0.9"
5+
appVersion: "0.0.10"
66
keywords:
77
- amazee.ai
88
- frontend
@@ -15,10 +15,10 @@ dependencies:
1515
repository: https://charts.bitnami.com/bitnami
1616
condition: postgresql.enabled
1717
- name: backend
18-
version: 0.0.9
18+
version: 0.0.10
1919
condition: backend.enabled
2020
dependsOn:
2121
- postgresql
2222
- name: frontend
23-
version: 0.0.9
23+
version: 0.0.10
2424
condition: frontend.enabled

helm/charts/backend/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: backend
22
description: Backend API service for amazee.ai
3-
version: 0.0.9
3+
version: 0.0.10
44
apiVersion: v2
5-
appVersion: "0.0.9"
5+
appVersion: "0.0.10"
66
keywords:
77
- api
88
- fastapi

helm/charts/frontend/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: frontend
22
description: Frontend web application for amazee.ai
3-
version: 0.0.9
3+
version: 0.0.10
44
apiVersion: v2
5-
appVersion: "0.0.9"
5+
appVersion: "0.0.10"
66
keywords:
77
- frontend
88
- nextjs

helm/templates/frontend-ingress.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
{{- if .Values.amazee-ai.frontendIngress.enabled -}}
1+
{{- $amazeeAi := index .Values "amazee-ai" -}}
2+
{{- if $amazeeAi.frontendIngress.enabled -}}
23
apiVersion: networking.k8s.io/v1
34
kind: Ingress
45
metadata:
56
name: {{ include "amazee-ai.fullname" . }}-frontend
67
namespace: {{ .Release.Namespace }}
78
labels:
89
{{- include "amazee-ai.labels" . | nindent 4 }}
9-
{{- with .Values.amazee-ai.frontendIngress.annotations }}
10+
{{- with $amazeeAi.frontendIngress.annotations }}
1011
annotations:
1112
{{- toYaml . | nindent 4 }}
1213
{{- end }}
1314
spec:
14-
{{- if .Values.amazee-ai.frontendIngress.className }}
15-
ingressClassName: {{ .Values.amazee-ai.frontendIngress.className }}
15+
{{- if $amazeeAi.frontendIngress.className }}
16+
ingressClassName: {{ $amazeeAi.frontendIngress.className }}
1617
{{- end }}
17-
{{- if .Values.amazee-ai.frontendIngress.tls }}
18+
{{- if $amazeeAi.frontendIngress.tls }}
1819
tls:
19-
{{- range .Values.amazee-ai.frontendIngress.tls }}
20+
{{- range $amazeeAi.frontendIngress.tls }}
2021
- hosts:
2122
{{- range .hosts }}
2223
- {{ . | quote }}
@@ -25,7 +26,7 @@ spec:
2526
{{- end }}
2627
{{- end }}
2728
rules:
28-
{{- range .Values.amazee-ai.frontendIngress.hosts }}
29+
{{- range $amazeeAi.frontendIngress.hosts }}
2930
- host: {{ .host | quote }}
3031
http:
3132
paths:

helm/templates/ingress.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
{{- if .Values.amazee-ai.ingress.enabled -}}
1+
{{- $amazeeAi := index .Values "amazee-ai" -}}
2+
{{- if $amazeeAi.ingress.enabled -}}
23
apiVersion: networking.k8s.io/v1
34
kind: Ingress
45
metadata:
56
name: {{ include "amazee-ai.fullname" . }}-backend
67
namespace: {{ .Release.Namespace }}
78
labels:
89
{{- include "amazee-ai.labels" . | nindent 4 }}
9-
{{- with .Values.amazee-ai.ingress.annotations }}
10+
{{- with $amazeeAi.ingress.annotations }}
1011
annotations:
1112
{{- toYaml . | nindent 4 }}
1213
{{- end }}
1314
spec:
14-
{{- if .Values.amazee-ai.ingress.className }}
15-
ingressClassName: {{ .Values.amazee-ai.ingress.className }}
15+
{{- if $amazeeAi.ingress.className }}
16+
ingressClassName: {{ $amazeeAi.ingress.className }}
1617
{{- end }}
17-
{{- if .Values.amazee-ai.ingress.tls }}
18+
{{- if $amazeeAi.ingress.tls }}
1819
tls:
19-
{{- range .Values.amazee-ai.ingress.tls }}
20+
{{- range $amazeeAi.ingress.tls }}
2021
- hosts:
2122
{{- range .hosts }}
2223
- {{ . | quote }}
@@ -25,7 +26,7 @@ spec:
2526
{{- end }}
2627
{{- end }}
2728
rules:
28-
{{- range .Values.amazee-ai.ingress.hosts }}
29+
{{- range $amazeeAi.ingress.hosts }}
2930
- host: {{ .host | quote }}
3031
http:
3132
paths:

0 commit comments

Comments
 (0)