-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fix etcd-metric-signer secret name in PKI verification step #82191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ declare -a SIGNERS=( | |
| "kube-control-plane-signer|kube-control-plane-signer|openshift-kube-apiserver-operator|tls.crt" | ||
| "aggregator-signer|aggregator-client-signer|openshift-kube-apiserver-operator|tls.crt" | ||
| "etcd-signer|etcd-signer|openshift-etcd|tls.crt" | ||
| "etcd-metrics-signer|etcd-metrics-signer|openshift-etcd|tls.crt" | ||
| "etcd-metrics-signer|etcd-metric-signer|openshift-etcd|tls.crt" | ||
| ) | ||
|
|
||
| # Map expected algorithm to openssl output strings | ||
|
|
@@ -50,6 +50,7 @@ for signer in "${SIGNERS[@]}"; do | |
| IFS='|' read -r description secret_name namespace cert_key <<< "${signer}" | ||
| total=$((total + 1)) | ||
| status="PASS" | ||
| fail_details="" | ||
|
|
||
| echo "--- Checking: ${description} (${namespace}/${secret_name}) ---" | tee -a "${ARTIFACT_LOG}" | ||
|
|
||
|
|
@@ -85,6 +86,7 @@ for signer in "${SIGNERS[@]}"; do | |
| actual_algo=$(echo "${cert_text}" | grep -F "Public Key Algorithm:" | head -1 | xargs) || true | ||
| echo " FAIL: Expected algorithm '${expected_algo_str}', got '${actual_algo}'" | tee -a "${ARTIFACT_LOG}" | ||
| status="FAIL" | ||
| fail_details="algo: expected ${expected_algo_str}, got ${actual_algo:-unknown}" | ||
| fi | ||
|
|
||
| # Check key parameter | ||
|
|
@@ -102,12 +104,17 @@ for signer in "${SIGNERS[@]}"; do | |
| fi | ||
| echo " FAIL: Expected '${expected_param_str}', got '${actual_param:-not found}'" | tee -a "${ARTIFACT_LOG}" | ||
| status="FAIL" | ||
| fail_details="${fail_details:+${fail_details}; }key: expected ${expected_param_str}, got ${actual_param:-unknown}" | ||
| fi | ||
|
|
||
| if [[ "${status}" == "FAIL" ]]; then | ||
| failures=$((failures + 1)) | ||
| fi | ||
| results+=("${status}|${description}|${namespace}/${secret_name}") | ||
| if [[ "${status}" == "PASS" ]]; then | ||
| results+=("${status}|${description}|${namespace}/${secret_name}") | ||
| else | ||
| results+=("${status}|${description}|${fail_details}") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should add ${namespace}/${secret_name} in case of failure too
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we're ok since it starts with |
||
| fi | ||
| done | ||
|
|
||
| # Verify PKI CR | ||
|
|
@@ -138,7 +145,11 @@ else | |
| if [[ "${pki_status}" == "FAIL" ]]; then | ||
| failures=$((failures + 1)) | ||
| fi | ||
| results+=("${pki_status}|PKI CR|mode=${mode:-unknown}") | ||
| if [[ "${pki_status}" == "PASS" ]]; then | ||
| results+=("${pki_status}|PKI CR|mode=${mode}") | ||
| else | ||
| results+=("${pki_status}|PKI CR|expected mode ${EXPECTED_PKI_MODE}, got ${mode:-not set}") | ||
| fi | ||
| fi | ||
|
|
||
| # Print summary table | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: the description still has the 's'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description should be okay since it doesn't affect the test, and technically it should be metrics-signer since it's plural.