Skip to content

Commit

Permalink
added tests for requested secret lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
razvan committed Nov 29, 2024
1 parent c3f785d commit f41faff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/templates/kuttl/kerberos/20-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,11 @@ metadata:
status:
readyReplicas: 2
replicas: 2
---
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 600
commands:
- script: kubectl -n $NAMESPACE get sts/hdfs-namenode-default -o yaml | yq -e '.spec.template.spec.volumes.[] | select(.name == "tls" and .ephemeral.volumeClaimTemplate.metadata.annotations."secrets.stackable.tech/backend.autotls.cert.lifetime" == "7d")'
- script: kubectl -n $NAMESPACE get sts/hdfs-datanode-default -o yaml | yq -e '.spec.template.spec.volumes.[] | select(.name == "tls" and .ephemeral.volumeClaimTemplate.metadata.annotations."secrets.stackable.tech/backend.autotls.cert.lifetime" == "1d")'
- script: kubectl -n $NAMESPACE get sts/hdfs-journalnode-default -o yaml | yq -e '.spec.template.spec.volumes.[] | select(.name == "tls" and .ephemeral.volumeClaimTemplate.metadata.annotations."secrets.stackable.tech/backend.autotls.cert.lifetime" == "2d")'
3 changes: 3 additions & 0 deletions tests/templates/kuttl/kerberos/20-install-hdfs.txt.j2
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ spec:
replicas: 2
dataNodes:
config:
requestedSecretLifetime: 1d
logging:
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
roleGroups:
Expand All @@ -56,3 +57,5 @@ spec:
roleGroups:
default:
replicas: 3
config:
requestedSecretLifetime: 2d

0 comments on commit f41faff

Please sign in to comment.