Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ base_images:
name: cli-operator-sdk
namespace: ocp
tag: v1.31.0
tls-scanner-tool:
name: tls-scanner
namespace: tls-scanner
tag: tls-scanner-tool
ubi-min9:
name: ubi-minimal
namespace: ocp
Expand Down Expand Up @@ -106,6 +110,185 @@ tests:
cpu: 100m
memory: 200Mi
workflow: optional-operators-ci-operator-sdk-aws
- always_run: false
as: install-bundle-tls-scan
optional: true
steps:
cluster_profile: openshift-org-aws
dependencies:
OO_BUNDLE: operator-bundle
env:
COMPUTE_NODE_TYPE: m5.2xlarge
OO_INSTALL_NAMESPACE: oran-o2ims
SCAN_NAMESPACE: oran-o2ims
SCANNER_NAMESPACE: oran-o2ims
TLS_13_ENABLE_TLS_ADHERENCE: "true"
TLS_13_TLS_ADHERENCE_POLICY: StrictAllComponents
test:
- ref: optional-operators-operator-sdk
- as: wait-for-server-pods
cli: latest
commands: |
NAMESPACE=oran-o2ims
echo "Waiting for Inventory CR to be auto-created..."
for i in $(seq 1 60); do
if oc get inventory default -n "$NAMESPACE" &>/dev/null; then
echo "Inventory CR 'default' found."
break
fi
echo " attempt $i/60..."
sleep 5
done

echo ""
echo "Discovering services with TLS serving certs..."
TLS_SERVICES=$(oc get services -n "$NAMESPACE" \
-o jsonpath='{range .items[?(@.metadata.annotations.service\.beta\.openshift\.io/serving-cert-secret-name)]}{.metadata.name}{"\n"}{end}')

echo "TLS services found:"
echo "$TLS_SERVICES" | while read -r svc; do
[ -z "$svc" ] && continue
SECRET=$(oc get service "$svc" -n "$NAMESPACE" \
-o jsonpath='{.metadata.annotations.service\.beta\.openshift\.io/serving-cert-secret-name}')
echo " $svc -> secret: $SECRET"
done

echo ""
echo "Waiting for TLS service pods to be ready..."
echo "$TLS_SERVICES" | while read -r svc; do
[ -z "$svc" ] && continue
SELECTOR=$(oc get service "$svc" -n "$NAMESPACE" \
-o go-template='{{range $k,$v := .spec.selector}}{{$k}}={{$v}},{{end}}' | sed 's/,$//')
if [ -z "$SELECTOR" ]; then
echo " SKIP: $svc has no selector"
continue
fi
echo " $svc (selector: $SELECTOR)..."
if ! oc wait pods -l "$SELECTOR" -n "$NAMESPACE" \
--for=condition=Ready --timeout=5m; then
echo " WARNING: pods for $svc did not become ready within 5m"
echo " Pod status:"
oc get pods -l "$SELECTOR" -n "$NAMESPACE" --no-headers | sed 's/^/ /'
echo " Recent events:"
oc get events -n "$NAMESPACE" --field-selector reason!=Pulling,reason!=Pulled \
--sort-by='.lastTimestamp' 2>/dev/null | grep "$svc" | tail -5 | sed 's/^/ /' \
|| echo " (no events found)"
fi
done

echo ""
echo "Verifying TLS secrets from service-ca..."
echo "$TLS_SERVICES" | while read -r svc; do
[ -z "$svc" ] && continue
SECRET=$(oc get service "$svc" -n "$NAMESPACE" \
-o jsonpath='{.metadata.annotations.service\.beta\.openshift\.io/serving-cert-secret-name}')
if oc get secret "$SECRET" -n "$NAMESPACE" &>/dev/null; then
echo " $SECRET exists"
else
echo " WARNING: $SECRET not found"
fi
done

echo ""
echo "Final pod status in $NAMESPACE:"
oc get pods -n "$NAMESPACE"
from: cli
resources:
requests:
cpu: 100m
memory: 200Mi
- ref: tls-13
- ref: tls-scanner-run
workflow: ipi-aws
- as: install-bundle-tls-scan-periodic
cron: 0 3 * * 5
steps:
cluster_profile: openshift-org-aws
dependencies:
OO_BUNDLE: operator-bundle
env:
COMPUTE_NODE_TYPE: m5.2xlarge
OO_INSTALL_NAMESPACE: oran-o2ims
SCAN_NAMESPACE: oran-o2ims
SCANNER_NAMESPACE: oran-o2ims
TLS_13_ENABLE_TLS_ADHERENCE: "true"
TLS_13_TLS_ADHERENCE_POLICY: StrictAllComponents
test:
- ref: optional-operators-operator-sdk
- as: wait-for-server-pods
cli: latest
commands: |
NAMESPACE=oran-o2ims
echo "Waiting for Inventory CR to be auto-created..."
for i in $(seq 1 60); do
if oc get inventory default -n "$NAMESPACE" &>/dev/null; then
echo "Inventory CR 'default' found."
break
fi
echo " attempt $i/60..."
sleep 5
done

echo ""
echo "Discovering services with TLS serving certs..."
TLS_SERVICES=$(oc get services -n "$NAMESPACE" \
-o jsonpath='{range .items[?(@.metadata.annotations.service\.beta\.openshift\.io/serving-cert-secret-name)]}{.metadata.name}{"\n"}{end}')

echo "TLS services found:"
echo "$TLS_SERVICES" | while read -r svc; do
[ -z "$svc" ] && continue
SECRET=$(oc get service "$svc" -n "$NAMESPACE" \
-o jsonpath='{.metadata.annotations.service\.beta\.openshift\.io/serving-cert-secret-name}')
echo " $svc -> secret: $SECRET"
done

echo ""
echo "Waiting for TLS service pods to be ready..."
echo "$TLS_SERVICES" | while read -r svc; do
[ -z "$svc" ] && continue
SELECTOR=$(oc get service "$svc" -n "$NAMESPACE" \
-o go-template='{{range $k,$v := .spec.selector}}{{$k}}={{$v}},{{end}}' | sed 's/,$//')
if [ -z "$SELECTOR" ]; then
echo " SKIP: $svc has no selector"
continue
fi
echo " $svc (selector: $SELECTOR)..."
if ! oc wait pods -l "$SELECTOR" -n "$NAMESPACE" \
--for=condition=Ready --timeout=5m; then
echo " WARNING: pods for $svc did not become ready within 5m"
echo " Pod status:"
oc get pods -l "$SELECTOR" -n "$NAMESPACE" --no-headers | sed 's/^/ /'
echo " Recent events:"
oc get events -n "$NAMESPACE" --field-selector reason!=Pulling,reason!=Pulled \
--sort-by='.lastTimestamp' 2>/dev/null | grep "$svc" | tail -5 | sed 's/^/ /' \
|| echo " (no events found)"
fi
done

echo ""
echo "Verifying TLS secrets from service-ca..."
echo "$TLS_SERVICES" | while read -r svc; do
[ -z "$svc" ] && continue
SECRET=$(oc get service "$svc" -n "$NAMESPACE" \
-o jsonpath='{.metadata.annotations.service\.beta\.openshift\.io/serving-cert-secret-name}')
if oc get secret "$SECRET" -n "$NAMESPACE" &>/dev/null; then
echo " $SECRET exists"
else
echo " WARNING: $SECRET not found"
fi
done

echo ""
echo "Final pod status in $NAMESPACE:"
oc get pods -n "$NAMESPACE"
from: cli
resources:
requests:
cpu: 100m
memory: 200Mi
- ref: tls-13
- ref: tls-scanner-run
workflow: ipi-aws
- always_run: false
as: markdownlint
commands: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ base_images:
name: cli-operator-sdk
namespace: ocp
tag: v1.31.0
tls-scanner-tool:
name: tls-scanner
namespace: tls-scanner
tag: tls-scanner-tool
ubi-min9:
name: ubi-minimal
namespace: ocp
Expand Down Expand Up @@ -106,6 +110,185 @@ tests:
cpu: 100m
memory: 200Mi
workflow: optional-operators-ci-operator-sdk-aws
- always_run: false
as: install-bundle-tls-scan
optional: true
steps:
cluster_profile: openshift-org-aws
dependencies:
OO_BUNDLE: operator-bundle
env:
COMPUTE_NODE_TYPE: m5.2xlarge
OO_INSTALL_NAMESPACE: oran-o2ims
SCAN_NAMESPACE: oran-o2ims
SCANNER_NAMESPACE: oran-o2ims
TLS_13_ENABLE_TLS_ADHERENCE: "true"
TLS_13_TLS_ADHERENCE_POLICY: StrictAllComponents
test:
- ref: optional-operators-operator-sdk
- as: wait-for-server-pods
cli: latest
commands: |
NAMESPACE=oran-o2ims
echo "Waiting for Inventory CR to be auto-created..."
for i in $(seq 1 60); do
if oc get inventory default -n "$NAMESPACE" &>/dev/null; then
echo "Inventory CR 'default' found."
break
fi
echo " attempt $i/60..."
sleep 5
done

echo ""
echo "Discovering services with TLS serving certs..."
TLS_SERVICES=$(oc get services -n "$NAMESPACE" \
-o jsonpath='{range .items[?(@.metadata.annotations.service\.beta\.openshift\.io/serving-cert-secret-name)]}{.metadata.name}{"\n"}{end}')

echo "TLS services found:"
echo "$TLS_SERVICES" | while read -r svc; do
[ -z "$svc" ] && continue
SECRET=$(oc get service "$svc" -n "$NAMESPACE" \
-o jsonpath='{.metadata.annotations.service\.beta\.openshift\.io/serving-cert-secret-name}')
echo " $svc -> secret: $SECRET"
done

echo ""
echo "Waiting for TLS service pods to be ready..."
echo "$TLS_SERVICES" | while read -r svc; do
[ -z "$svc" ] && continue
SELECTOR=$(oc get service "$svc" -n "$NAMESPACE" \
-o go-template='{{range $k,$v := .spec.selector}}{{$k}}={{$v}},{{end}}' | sed 's/,$//')
if [ -z "$SELECTOR" ]; then
echo " SKIP: $svc has no selector"
continue
fi
echo " $svc (selector: $SELECTOR)..."
if ! oc wait pods -l "$SELECTOR" -n "$NAMESPACE" \
--for=condition=Ready --timeout=5m; then
echo " WARNING: pods for $svc did not become ready within 5m"
echo " Pod status:"
oc get pods -l "$SELECTOR" -n "$NAMESPACE" --no-headers | sed 's/^/ /'
echo " Recent events:"
oc get events -n "$NAMESPACE" --field-selector reason!=Pulling,reason!=Pulled \
--sort-by='.lastTimestamp' 2>/dev/null | grep "$svc" | tail -5 | sed 's/^/ /' \
|| echo " (no events found)"
fi
done

echo ""
echo "Verifying TLS secrets from service-ca..."
echo "$TLS_SERVICES" | while read -r svc; do
[ -z "$svc" ] && continue
SECRET=$(oc get service "$svc" -n "$NAMESPACE" \
-o jsonpath='{.metadata.annotations.service\.beta\.openshift\.io/serving-cert-secret-name}')
if oc get secret "$SECRET" -n "$NAMESPACE" &>/dev/null; then
echo " $SECRET exists"
else
echo " WARNING: $SECRET not found"
fi
done

echo ""
echo "Final pod status in $NAMESPACE:"
oc get pods -n "$NAMESPACE"
from: cli
resources:
requests:
cpu: 100m
memory: 200Mi
- ref: tls-13
- ref: tls-scanner-run
workflow: ipi-aws
- as: install-bundle-tls-scan-periodic
cron: 0 3 * * 1
steps:
cluster_profile: openshift-org-aws
dependencies:
OO_BUNDLE: operator-bundle
env:
COMPUTE_NODE_TYPE: m5.2xlarge
OO_INSTALL_NAMESPACE: oran-o2ims
SCAN_NAMESPACE: oran-o2ims
SCANNER_NAMESPACE: oran-o2ims
TLS_13_ENABLE_TLS_ADHERENCE: "true"
TLS_13_TLS_ADHERENCE_POLICY: StrictAllComponents
test:
- ref: optional-operators-operator-sdk
- as: wait-for-server-pods
cli: latest
commands: |
NAMESPACE=oran-o2ims
echo "Waiting for Inventory CR to be auto-created..."
for i in $(seq 1 60); do
if oc get inventory default -n "$NAMESPACE" &>/dev/null; then
echo "Inventory CR 'default' found."
break
fi
echo " attempt $i/60..."
sleep 5
done

echo ""
echo "Discovering services with TLS serving certs..."
TLS_SERVICES=$(oc get services -n "$NAMESPACE" \
-o jsonpath='{range .items[?(@.metadata.annotations.service\.beta\.openshift\.io/serving-cert-secret-name)]}{.metadata.name}{"\n"}{end}')

echo "TLS services found:"
echo "$TLS_SERVICES" | while read -r svc; do
[ -z "$svc" ] && continue
SECRET=$(oc get service "$svc" -n "$NAMESPACE" \
-o jsonpath='{.metadata.annotations.service\.beta\.openshift\.io/serving-cert-secret-name}')
echo " $svc -> secret: $SECRET"
done

echo ""
echo "Waiting for TLS service pods to be ready..."
echo "$TLS_SERVICES" | while read -r svc; do
[ -z "$svc" ] && continue
SELECTOR=$(oc get service "$svc" -n "$NAMESPACE" \
-o go-template='{{range $k,$v := .spec.selector}}{{$k}}={{$v}},{{end}}' | sed 's/,$//')
if [ -z "$SELECTOR" ]; then
echo " SKIP: $svc has no selector"
continue
fi
echo " $svc (selector: $SELECTOR)..."
if ! oc wait pods -l "$SELECTOR" -n "$NAMESPACE" \
--for=condition=Ready --timeout=5m; then
echo " WARNING: pods for $svc did not become ready within 5m"
echo " Pod status:"
oc get pods -l "$SELECTOR" -n "$NAMESPACE" --no-headers | sed 's/^/ /'
echo " Recent events:"
oc get events -n "$NAMESPACE" --field-selector reason!=Pulling,reason!=Pulled \
--sort-by='.lastTimestamp' 2>/dev/null | grep "$svc" | tail -5 | sed 's/^/ /' \
|| echo " (no events found)"
fi
done

echo ""
echo "Verifying TLS secrets from service-ca..."
echo "$TLS_SERVICES" | while read -r svc; do
[ -z "$svc" ] && continue
SECRET=$(oc get service "$svc" -n "$NAMESPACE" \
-o jsonpath='{.metadata.annotations.service\.beta\.openshift\.io/serving-cert-secret-name}')
if oc get secret "$SECRET" -n "$NAMESPACE" &>/dev/null; then
echo " $SECRET exists"
else
echo " WARNING: $SECRET not found"
fi
done

echo ""
echo "Final pod status in $NAMESPACE:"
oc get pods -n "$NAMESPACE"
from: cli
resources:
requests:
cpu: 100m
memory: 200Mi
- ref: tls-13
- ref: tls-scanner-run
workflow: ipi-aws
- always_run: false
as: markdownlint
commands: |
Expand Down
Loading