Skip to content

Commit 4543703

Browse files
authored
add section in e2e sample to test referenced configmaps and secrets (#611)
1 parent e2c8860 commit 4543703

File tree

2 files changed

+52
-14
lines changed

2 files changed

+52
-14
lines changed

e2e/apply/sample-segment.yaml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ spec:
2121
replicas: 2
2222
configurationResources:
2323
- configMapRef:
24-
name: e2e-deploy-sample-segment-{{{CDP_BUILD_VERSION}}}-config
24+
name: e2e-deploy-sample-segment-{{{CDP_BUILD_VERSION}}}-my-reference-config
25+
- secretRef:
26+
name: e2e-deploy-sample-segment-{{{CDP_BUILD_VERSION}}}-my-reference-secret
2527
autoscaler:
2628
minReplicas: 2
2729
maxReplicas: 2
@@ -53,21 +55,38 @@ spec:
5355
cpu: 1m
5456
memory: 100Mi
5557
volumeMounts:
56-
- name: my-config
57-
mountPath: /etc/my-config
58+
- name: my-reference-config
59+
mountPath: /etc/my-reference-config
60+
readOnly: true
61+
- name: my-reference-secret
62+
mountPath: /etc/my-reference-secret
5863
readOnly: true
5964
volumes:
60-
- name: my-config
65+
- name: my-reference-config
6166
configMap:
62-
name: e2e-deploy-sample-segment-{{{CDP_BUILD_VERSION}}}-config
67+
name: e2e-deploy-sample-segment-{{{CDP_BUILD_VERSION}}}-my-reference-config
68+
- name: my-reference-secret
69+
secret:
70+
secretName: e2e-deploy-sample-segment-{{{CDP_BUILD_VERSION}}}-my-reference-secret
6371

6472
---
6573

6674
apiVersion: v1
6775
kind: ConfigMap
6876
metadata:
69-
name: e2e-deploy-sample-segment-{{{CDP_BUILD_VERSION}}}-config
77+
name: e2e-deploy-sample-segment-{{{CDP_BUILD_VERSION}}}-my-reference-config
78+
labels:
79+
application: "e2e-deploy-sample-segment"
80+
data:
81+
something_is: configured_by_reference
82+
83+
---
84+
85+
apiVersion: v1
86+
kind: Secret
87+
metadata:
88+
name: e2e-deploy-sample-segment-{{{CDP_BUILD_VERSION}}}-my-reference-secret
7089
labels:
7190
application: "e2e-deploy-sample-segment"
7291
data:
73-
something_is: configured
92+
something_is: c2VjcmV0bHlfY29uZmlndXJlZF9ieV9yZWZlcmVuY2U=

e2e/apply/sample.yaml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ spec:
2020
replicas: 2
2121
configurationResources:
2222
- configMapRef:
23-
name: e2e-deploy-sample-{{{CDP_BUILD_VERSION}}}-config
23+
name: e2e-deploy-sample-{{{CDP_BUILD_VERSION}}}-my-reference-config
24+
- secretRef:
25+
name: e2e-deploy-sample-{{{CDP_BUILD_VERSION}}}-my-reference-secret
2426
autoscaler:
2527
minReplicas: 2
2628
maxReplicas: 2
@@ -52,21 +54,38 @@ spec:
5254
cpu: 1m
5355
memory: 100Mi
5456
volumeMounts:
55-
- name: my-config
56-
mountPath: /etc/my-config
57+
- name: my-reference-config
58+
mountPath: /etc/my-reference-config
59+
readOnly: true
60+
- name: my-reference-secret
61+
mountPath: /etc/my-reference-secret
5762
readOnly: true
5863
volumes:
59-
- name: my-config
64+
- name: my-reference-config
6065
configMap:
61-
name: e2e-deploy-sample-{{{CDP_BUILD_VERSION}}}-config
66+
name: e2e-deploy-sample-{{{CDP_BUILD_VERSION}}}-my-reference-config
67+
- name: my-reference-secret
68+
secret:
69+
secretName: e2e-deploy-sample-{{{CDP_BUILD_VERSION}}}-my-reference-secret
6270

6371
---
6472

6573
apiVersion: v1
6674
kind: ConfigMap
6775
metadata:
68-
name: e2e-deploy-sample-{{{CDP_BUILD_VERSION}}}-config
76+
name: e2e-deploy-sample-{{{CDP_BUILD_VERSION}}}-my-reference-config
77+
labels:
78+
application: "e2e-deploy-sample"
79+
data:
80+
something_is: configured_by_reference
81+
82+
---
83+
84+
apiVersion: v1
85+
kind: Secret
86+
metadata:
87+
name: e2e-deploy-sample-{{{CDP_BUILD_VERSION}}}-my-reference-secret
6988
labels:
7089
application: "e2e-deploy-sample"
7190
data:
72-
something_is: configured
91+
something_is: c2VjcmV0bHlfY29uZmlndXJlZF9ieV9yZWZlcmVuY2U=

0 commit comments

Comments
 (0)