Skip to content

Commit 15071a7

Browse files
authored
feat: add some missing metadata and enable annotations on browser service (#255)
1 parent ac8123d commit 15071a7

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

charts/eoapi/templates/services/browser/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ apiVersion: apps/v1
33
kind: Deployment
44
metadata:
55
name: browser-{{ .Release.Name }}
6+
labels:
7+
app: browser-{{ .Release.Name }}
8+
gitsha: {{ .Values.gitSha }}
69
spec:
710
replicas: {{.Values.browser.replicaCount}}
811
selector:

charts/eoapi/templates/services/browser/service.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ apiVersion: v1
33
kind: Service
44
metadata:
55
name: browser-{{ .Release.Name }}
6+
labels:
7+
app: browser-{{ .Release.Name }}
8+
{{- if .Values.browser.annotations }}
9+
annotations:
10+
{{- with .Values.browser.annotations }}
11+
{{- toYaml . | nindent 4 }}
12+
{{- end }}
13+
{{- end }}
614
spec:
715
selector:
816
app: browser-{{ .Release.Name }}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
suite: stac browser service tests
2+
templates:
3+
- templates/services/browser/deployment.yaml
4+
- templates/services/browser/service.yaml
5+
tests:
6+
- it: "stac browser deployment"
7+
set:
8+
raster.enabled: false
9+
stac.enabled: false
10+
vector.enabled: false
11+
multidim.enabled: false
12+
browser.enabled: true
13+
gitSha: "ABC123"
14+
template: templates/services/browser/deployment.yaml
15+
asserts:
16+
- isKind:
17+
of: Deployment
18+
- matchRegex:
19+
path: metadata.name
20+
pattern: ^browser-RELEASE-NAME$
21+
- matchRegex:
22+
path: metadata.labels.app
23+
pattern: ^browser-RELEASE-NAME$
24+
- equal:
25+
path: metadata.labels.gitsha
26+
value: "ABC123"
27+
- it: "stac browser service"
28+
set:
29+
raster.enabled: false
30+
stac.enabled: false
31+
vector.enabled: false
32+
multidim.enabled: false
33+
browser.enabled: true
34+
browser.annotations:
35+
annotation1: hello
36+
annotation2: world
37+
gitSha: "ABC123"
38+
template: templates/services/browser/service.yaml
39+
asserts:
40+
- isKind:
41+
of: Service
42+
- matchRegex:
43+
path: metadata.name
44+
pattern: ^browser-RELEASE-NAME$
45+
- matchRegex:
46+
path: metadata.labels.app
47+
pattern: ^browser-RELEASE-NAME$
48+
- equal:
49+
path: metadata.annotations.annotation1
50+
value: hello
51+
- equal:
52+
path: metadata.annotations.annotation2
53+
value: world

0 commit comments

Comments
 (0)