-
Notifications
You must be signed in to change notification settings - Fork 178
Expand file tree
/
Copy pathoperator_test.yaml
More file actions
166 lines (165 loc) · 4.21 KB
/
operator_test.yaml
File metadata and controls
166 lines (165 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# SPDX-FileCopyrightText: the secureCodeBox authors
#
# SPDX-License-Identifier: Apache-2.0
suite: Full Snapshot
templates:
- NOTES.txt
- rbac/*.yaml
- manager/*.yaml
- minio/*.yaml
tests:
- it: matches the snapshot
chart:
version: 0.0.0
appVersion: 0.0.0
set:
imagePullSecrets: [{name: foo}]
customCACertificate.existingCertificate: foo
serviceaccount: {create: true, annotations: {foo: bar}, name: foo}
podSecurityContext: {fsGroup: 1234}
minio:
enabled: true
auth:
rootUser: testuser
rootPassword: testpassword
asserts:
- matchSnapshot: {}
- it: properly-renders-the-service-monitor-when-enabled
chart:
version: 0.0.0
appVersion: 0.0.0
set:
imagePullSecrets: [{name: foo}]
customCACertificate.existingCertificate: foo
serviceaccount: {create: true, annotations: {foo: bar}, name: foo}
podSecurityContext: {fsGroup: 1234}
metrics:
serviceMonitor:
enabled: true
minio:
enabled: true
auth:
rootUser: testuser
rootPassword: testpassword
asserts:
- matchSnapshot: {}
- it: renders minio resources when minio is enabled
templates:
- minio/secret.yaml
- minio/service.yaml
- minio/statefulset.yaml
chart:
version: 0.0.0
appVersion: 0.0.0
set:
minio:
enabled: true
auth:
rootUser: testuser
rootPassword: testpassword
asserts:
- hasDocuments:
count: 1
- it: does not render minio resources when minio is disabled
templates:
- minio/secret.yaml
- minio/service.yaml
- minio/statefulset.yaml
chart:
version: 0.0.0
appVersion: 0.0.0
set:
minio:
enabled: false
asserts:
- hasDocuments:
count: 0
- it: configures manager deployment for minio
templates:
- manager/manager.yaml
chart:
version: 0.0.0
appVersion: 0.0.0
set:
minio:
enabled: true
asserts:
- equal:
path: spec.template.spec.containers[0].env[?(@.name=="S3_USE_SSL")].value
value: "false"
- equal:
path: spec.template.spec.containers[0].env[?(@.name=="S3_ENDPOINT")].value
value: "RELEASE-NAME-minio.NAMESPACE.svc.cluster.local"
- it: configures manager deployment for external s3
templates:
- manager/manager.yaml
chart:
version: 0.0.0
appVersion: 0.0.0
set:
minio:
enabled: false
s3:
enabled: true
endpoint: "s3.amazonaws.com"
bucket: "my-bucket"
tls:
enabled: true
asserts:
- equal:
path: spec.template.spec.containers[0].env[?(@.name=="S3_USE_SSL")].value
value: "true"
- equal:
path: spec.template.spec.containers[0].env[?(@.name=="S3_ENDPOINT")].value
value: "s3.amazonaws.com"
- equal:
path: spec.template.spec.containers[0].env[?(@.name=="S3_BUCKET")].value
value: "my-bucket"
- it: renders minio secret with custom credentials
templates:
- minio/secret.yaml
chart:
version: 0.0.0
appVersion: 0.0.0
set:
minio:
enabled: true
auth:
rootUser: customuser
rootPassword: custompassword
asserts:
- equal:
path: data.root-user
value: Y3VzdG9tdXNlcg==
- equal:
path: data.root-password
value: Y3VzdG9tcGFzc3dvcmQ=
- it: omits storageClassName when not specified to use default
templates:
- minio/statefulset.yaml
chart:
version: 0.0.0
appVersion: 0.0.0
set:
minio:
enabled: true
persistence:
storageClass: ""
asserts:
- notExists:
path: spec.volumeClaimTemplates[0].spec.storageClassName
- it: includes storageClassName when specified
templates:
- minio/statefulset.yaml
chart:
version: 0.0.0
appVersion: 0.0.0
set:
minio:
enabled: true
persistence:
storageClass: "fast-ssd"
asserts:
- equal:
path: spec.volumeClaimTemplates[0].spec.storageClassName
value: "fast-ssd"