Skip to content

Commit 9b5e31c

Browse files
test(tls): Add a test case for a subject DN with domain components
1 parent b071493 commit 9b5e31c

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

tests/templates/kuttl/tls/10_consumer.yaml.j2

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spec:
2222
CERT_NAME=tls.crt
2323
CA_NAME=ca.crt
2424
{% endif %}
25-
- |
25+
2626
set -euo pipefail
2727
ls -la /stackable/tls-3d
2828
ls -la /stackable/tls-42h
@@ -67,11 +67,18 @@ spec:
6767
assert_trusted_roots_contain "cert 4b"
6868
assert_trusted_roots_contain "cert 5"
6969
assert_trusted_roots_contain "cert 6"
70+
71+
echo Test subject DN with domain components
72+
73+
openssl x509 -in /stackable/tls-domain-components/tls.crt -subject -noout | \
74+
grep "subject=CN=generated certificate for pod, DC=tls-consumer-.*, DC=$NAMESPACE, DC=svc, DC=.*"
7075
volumeMounts:
7176
- mountPath: /stackable/tls-3d
7277
name: tls-3d
7378
- mountPath: /stackable/tls-42h
7479
name: tls-42h
80+
- mountPath: /stackable/tls-domain-components
81+
name: tls-domain-components
7582
volumes:
7683
- name: tls-3d
7784
ephemeral:
@@ -111,6 +118,21 @@ spec:
111118
resources:
112119
requests:
113120
storage: "1"
121+
- name: tls-domain-components
122+
ephemeral:
123+
volumeClaimTemplate:
124+
metadata:
125+
annotations:
126+
secrets.stackable.tech/class: tls-$NAMESPACE
127+
secrets.stackable.tech/scope: pod
128+
secrets.stackable.tech/backend.autotls.cert.domain-components-in-subject-dn: "true"
129+
spec:
130+
storageClassName: secrets.stackable.tech
131+
accessModes:
132+
- ReadWriteOnce
133+
resources:
134+
requests:
135+
storage: "1"
114136
securityContext:
115137
runAsUser: 1000
116138
runAsGroup: 1000

0 commit comments

Comments
 (0)