Skip to content

Commit 09ed090

Browse files
committed
Merge ctlplane-tls-cert-rotation tests into ctlplane-tls-custom-issuers
Consolidate these two TLS-related kuttl tests into a single comprehensive test suite that covers: - TLS ingress-only to full pod-level TLS transitions - Custom and default certificate issuer switching - Certificate rotation triggered by secret deletion - Custom certificate duration configuration - Certificate fingerprint verification before/after rotation Key changes: - Remove ctlplane-tls-cert-rotation test suite (merged into custom-issuers) - Renumber test steps (00-16) for proper sequencing - Add certificate fingerprint comparison to rotation assertions - Replace symlink with actual assert file for custom issuer deployment - Increase timeout for certificate issuer assertions (60s → 900s) - Improve error messages with namespace context This reduces test execution time by eliminating redundant OpenStack deployments while maintaining full TLS functionality coverage. Co-authored-by: Claude Assistant assistant@cursor.sh
1 parent b7b08af commit 09ed090

37 files changed

+386
-65
lines changed

test/kuttl/common/osp_check_noapi_service_certs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ for service in "${!services_secrets[@]}"; do
5656
pod_cert=$(oc rsh -n "$NAMESPACE" openstackclient openssl s_client -connect "$cluster_ip:$port" -servername "$cluster_ip" </dev/null 2>/dev/null | sed -ne '/-----BEGIN CERTIFICATE-----/,/-----END CERTIFICATE-----/p')
5757

5858
if [[ -z "$pod_cert" ]]; then
59-
echo "Error retrieving certificate from $service at $cluster_ip:$port."
59+
echo "Error retrieving certificate from $service at $cluster_ip:$port in namespace $NAMESPACE."
6060
continue
6161
fi
6262

test/kuttl/tests/ctlplane-tls-cert-rotation/02-assert-endpoint-proto.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

test/kuttl/tests/ctlplane-tls-cert-rotation/02-get-endpoints-certs.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

test/kuttl/tests/ctlplane-tls-cert-rotation/03-change-cert-duration.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

test/kuttl/tests/ctlplane-tls-custom-issuers/05-cleanup.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

test/kuttl/tests/ctlplane-tls-custom-issuers/06-assert-deploy-openstack.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/kuttl/tests/ctlplane-tls-custom-issuers/10-rotate-service-certs.yaml

Lines changed: 0 additions & 7 deletions
This file was deleted.

test/kuttl/tests/ctlplane-tls-custom-issuers/11-errors-cleanup.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/kuttl/tests/ctlplane-tls-cert-rotation/00-assert-deploy-openstack.yaml renamed to test/kuttl/tests/ctlplane-tls/00-assert-deploy-openstack-tls-ingress-only.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,11 @@ commands:
300300
echo "Waiting for OpenStack control plane to be ready..."
301301
oc wait openstackcontrolplane -n $NAMESPACE --for=condition=Ready --timeout=400s -l core.openstack.org/openstackcontrolplane
302302
- script: |
303-
echo "Fail if internal https endpoints are registered"
303+
echo "Fail if internal https endpoints are registered (ingress-only mode)"
304304
oc exec -i openstackclient -n $NAMESPACE -- bash -c "openstack endpoint list --interface internal -f value -c URL" | grep 'https:' && exit 1
305305
exit 0
306306
- script: |
307-
echo "check ovn sb internalDbAddress use tcp"
307+
echo "check ovn sb internalDbAddress use tcp (not ssl)"
308308
oc get -n $NAMESPACE OVNDBCluster ovndbcluster-sb -o jsonpath={.status.internalDbAddress} | grep -q tcp
309309
- script: |
310310
echo "check ovn sb DB connection use tcp"

test/kuttl/tests/ctlplane-tls-cert-rotation/00-deploy-openstack-tls-ingress-only.yaml renamed to test/kuttl/tests/ctlplane-tls/00-deploy-openstack-tls-ingress-only.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Deploy with TLS ingress-only (podLevel.enabled: false)
2+
# This tests the transition from ingress-only TLS to full TLS
13
apiVersion: kuttl.dev/v1beta1
24
kind: TestStep
35
commands:

0 commit comments

Comments
 (0)