Skip to content

Commit 576e4f2

Browse files
Merge branch 'main' into 65_create_main_endpoint
2 parents 6aaca84 + 4b0a2e2 commit 576e4f2

File tree

3 files changed

+52
-18
lines changed

3 files changed

+52
-18
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ use_stub_offsets: bool = config_server.best_effort_get_feature_flag("use_stub_of
3535

3636
## Testing and deployment
3737

38-
There is a convenient script in `./deployment/build_and_push_.sh`, which takes
38+
39+
There is a convenient script in `./deployment/build_and_push.sh`, which takes
3940
a `--dev` option to push containers with `-dev` appended to their names and a `--no-push` option for local
4041
development. This ensures that environment variables for dev or prod builds are included in the built container. To push to
4142
the registry you must have identified to gcloud by having loaded a kubernetes module and running `gcloud auth login.`
@@ -44,7 +45,7 @@ To deploy a live version, you can run the above script with no arguments and the
4445
argus, in the `daq-config-server` namespace, run `kubectl rollout restart deployment`. If it is not
4546
currently deployed it you can deploy it with `helm install daq-config ./helmchart`.
4647

47-
To test locally, you can build with `./deployment/build_and_push_all.sh --dev --no-push` and then
48+
To test locally, you can build with `./deployment/build_and_push.sh --dev --no-push` and then
4849
run the container `daq-config-server-dev` (with the command `daq-config-server --dev`), `daq-config-server-db-dev`,
4950
and `daq-config-server-gui-dev`, all with the `--net host` option.
5051

helmchart/templates/ingress.yaml

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,43 @@
1-
{{- if .Values.ingress.create -}}
1+
{{- if .Values.ingress.enabled -}}
22
apiVersion: networking.k8s.io/v1
33
kind: Ingress
44
metadata:
55
name: {{ include "helmchart.fullname" . }}
6+
labels:
7+
{{- include "helmchart.labels" . | nindent 4 }}
8+
{{- with .Values.ingress.annotations }}
9+
annotations:
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
612
spec:
7-
ingressClassName: nginx
13+
{{- with .Values.ingress.className }}
14+
ingressClassName: {{ . }}
15+
{{- end }}
16+
{{- if .Values.ingress.tls }}
817
tls:
9-
- hosts:
10-
- {{ required "A valid hostname must be provided" .Values.ingress.host }}
18+
{{- range .Values.ingress.tls }}
19+
- hosts:
20+
{{- range .hosts }}
21+
- {{ . | quote }}
22+
{{- end }}
23+
secretName: {{ .secretName }}
24+
{{- end }}
25+
{{- end }}
1126
rules:
12-
- host: {{ required "A valid hostname must be provided" .Values.ingress.host }}
13-
http:
14-
paths:
15-
- path: /
16-
pathType: Prefix
17-
backend:
18-
service:
19-
name: {{ include "helmchart.fullname" . }}
20-
port:
21-
number: {{ .Values.service.port }}
22-
{{- end }}
27+
{{- range .Values.ingress.hosts }}
28+
- host: {{ .host | quote }}
29+
http:
30+
paths:
31+
{{- range .paths }}
32+
- path: {{ .path }}
33+
{{- with .pathType }}
34+
pathType: {{ . }}
35+
{{- end }}
36+
backend:
37+
service:
38+
name: {{ include "helmchart.fullname" $ }}
39+
port:
40+
number: {{ $.Values.service.port }}
41+
{{- end }}
42+
{{- end }}
43+
{{- end }}

helmchart/values.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,19 @@ service:
5757
# This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/
5858
ingress:
5959
enabled: false
60-
# host: foo.diamond.ac.uk (assumes port = service.port)
60+
className: "nginx"
61+
annotations: {}
62+
# kubernetes.io/ingress.class: nginx
63+
# kubernetes.io/tls-acme: "true"
64+
hosts:
65+
- host: chart-example.local
66+
paths:
67+
- path: /
68+
pathType: Prefix
69+
tls: []
70+
# - secretName: chart-example-tls
71+
# hosts:
72+
# - chart-example.local
6173

6274

6375
resources: {}

0 commit comments

Comments
 (0)