Skip to content

Commit d96eb92

Browse files
committed
Customise Helm chart values to deploy on CJE cluster
1 parent 585c835 commit d96eb92

2 files changed

Lines changed: 37 additions & 4 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{{- if .Values.ingress.enabled -}}
2+
{{- $serviceName := include "fullname" . -}}
3+
{{- $servicePort := .Values.service.externalPort -}}
4+
apiVersion: extensions/v1beta1
5+
kind: Ingress
6+
metadata:
7+
name: {{ template "fullname" . }}
8+
labels:
9+
app: {{ template "name" . }}
10+
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
11+
release: {{ .Release.Name }}
12+
heritage: {{ .Release.Service }}
13+
annotations:
14+
{{- range $key, $value := .Values.ingress.annotations }}
15+
{{ $key }}: {{ $value | quote }}
16+
{{- end }}
17+
spec:
18+
rules:
19+
{{- range $host := .Values.ingress.hosts }}
20+
- host: {{ $host }}
21+
http:
22+
paths:
23+
- path: /
24+
backend:
25+
serviceName: {{ $serviceName }}
26+
servicePort: {{ $servicePort }}
27+
{{- end -}}
28+
{{- if .Values.ingress.tls }}
29+
tls:
30+
{{ toYaml .Values.ingress.tls | indent 4 }}
31+
{{- end -}}
32+
{{- end -}}

charts/wordsmith-api/values.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ service:
1111
type: ClusterIP
1212
externalPort: 80
1313
internalPort: 8080
14-
annotations:
15-
fabric8.io/expose: "true"
16-
fabric8.io/ingress.annotations: "kubernetes.io/ingress.class: nginx"
1714
resources:
1815
limits:
1916
cpu: 500m
@@ -31,4 +28,8 @@ readinessProbe:
3128
periodSeconds: 10
3229
successThreshold: 1
3330
timeoutSeconds: 1
34-
terminationGracePeriodSeconds: 10
31+
terminationGracePeriodSeconds: 10
32+
ingress:
33+
hosts:
34+
- api.wordsmith.beescloud.com
35+
annotations:

0 commit comments

Comments
 (0)