Skip to content

CNTRLPLANE-2910: feat(cpo): add Azure workload identity webhook as KAS sidecar - #7867

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
csrwng:azure-web-identity-webhook
Mar 17, 2026
Merged

CNTRLPLANE-2910: feat(cpo): add Azure workload identity webhook as KAS sidecar#7867
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
csrwng:azure-web-identity-webhook

Conversation

@csrwng

@csrwng csrwng commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Deploy the Azure workload identity webhook as a sidecar container in the KAS deployment for Azure platform clusters, mirroring the existing AWS pod identity webhook pattern. This enables customer workloads to authenticate to Azure services via annotated ServiceAccounts.

Changes:

  • Add serving certificate PKI reconciliation for the webhook
  • Add webhook sidecar container to KAS deployment (port 9443, health 9440)
  • Add kubeconfig generation for the webhook service account
  • Register webhook kubeconfig manifest adapter in KAS component
  • Create guest cluster RBAC (ClusterRole/ClusterRoleBinding) and MutatingWebhookConfiguration via HCCO
  • Add unit tests for all new functions
  • Add end to end verification

Summary by CodeRabbit

  • New Features

    • Azure Workload Identity Webhook: mutating webhook, RBAC, and kube-apiserver integration to inject projected token volumes and AZURE_FEDERATED_TOKEN_FILE on Azure platforms.
    • Added serving-certificate and kubeconfig secrets, webhook container, volumes, and deployment wiring for Azure workload identity.
  • Tests

    • Unit tests for certificate, kubeconfig reconciliation, and webhook wiring.
    • E2E utility and cluster test step to validate pod mutation behavior and idempotency.

@openshift-ci-robot

Copy link
Copy Markdown

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 5, 2026
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 5, 2026
@openshift-ci-robot

openshift-ci-robot commented Mar 5, 2026

Copy link
Copy Markdown

@csrwng: This pull request references CNTRLPLANE-2910 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Deploy the Azure workload identity webhook as a sidecar container in the KAS deployment for Azure platform clusters, mirroring the existing AWS pod identity webhook pattern. This enables customer workloads to authenticate to Azure services via annotated ServiceAccounts.

Changes:

  • Add serving certificate PKI reconciliation for the webhook
  • Add webhook sidecar container to KAS deployment (port 9443, health 9440)
  • Add kubeconfig generation for the webhook service account
  • Register webhook kubeconfig manifest adapter in KAS component
  • Create guest cluster RBAC (ClusterRole/ClusterRoleBinding) and MutatingWebhookConfiguration via HCCO
  • Add unit tests for all new functions
  • Add end to end verification

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci

openshift-ci Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (1)
  • do-not-merge/work-in-progress

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cc8fcfe7-9afa-47ee-a625-4d298cbc5f2c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds Azure Workload Identity Webhook support: serving certificate and kubeconfig secrets, kube-apiserver webhook container and volumes, RBAC and MutatingWebhookConfiguration reconciliation, unit and e2e tests, and test/asset fixtures.

Changes

Cohort / File(s) Summary
PKI (new)
control-plane-operator/controllers/hostedcontrolplane/pki/azure_workload_identity_webhook.go, .../pki/azure_workload_identity_webhook_test.go
Adds ReconcileAzureWorkloadIdentityWebhookServingCert and tests verifying tls.crt/tls.key, IP SAN (127.0.0.1), CN, and idempotency.
PKI helpers & kubeconfig
control-plane-operator/controllers/hostedcontrolplane/pki/kas.go, .../pki/kas_test.go
Introduces ReconcileServiceAccountKubeconfigWithURL and tests to verify kubeconfig uses provided server URL.
Manifests (secrets)
control-plane-operator/controllers/hostedcontrolplane/manifests/pki.go, .../manifests/azure.go
Adds factory helpers for azure-workload-identity-webhook-serving-cert and azure-workload-identity-webhook-kubeconfig secrets.
HCP controller PKI flow
control-plane-operator/controllers/hostedcontrolplane/hostedcontrolplane_controller.go
Azure PKI reconciliation now creates/updates the azure workload-identity webhook serving-cert via pki.ReconcileAzureWorkloadIdentityWebhookServingCert.
KAS v2 integration
control-plane-operator/controllers/hostedcontrolplane/v2/kas/component.go, .../deployment.go, .../kubeconfig.go, v2/assets/kube-apiserver/azure-workload-identity-webhook-kubeconfig.yaml
Registers kubeconfig manifest, adds azure-workload-identity-webhook container, volumes for serving cert and kubeconfig, and kubeconfig adaptation/reconciliation logic for Azure.
KAS v2 tests & fixtures
control-plane-operator/controllers/hostedcontrolplane/v2/kas/azure_workload_identity_webhook_test.go, controllers/hostedcontrolplane/testdata/kube-apiserver/..._azure_workload_identity_webhook_kubeconfig_secret.yaml, ..._kube_apiserver_deployment.yaml
Adds tests and fixture for webhook container, probes, env, mounts, and secret/volume wiring; updates deployment manifest to include webhook container and volumes.
Cluster config operator manifests
control-plane-operator/hostedclusterconfigoperator/controllers/resources/manifests/azure_workload_identity_webhook.go
Adds factory functions for MutatingWebhookConfiguration, ClusterRole, and ClusterRoleBinding for Azure workload-identity webhook.
Cluster config operator reconciliation
control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources.go
Adds reconcileAzureIdentityWebhook to upsert ClusterRole, ClusterRoleBinding, and MutatingWebhookConfiguration and integrates it into Azure reconciliation path.
Cluster config operator tests
control-plane-operator/hostedclusterconfigoperator/controllers/resources/azure_workload_identity_webhook_test.go
Unit tests verify creation and idempotency of ClusterRole, ClusterRoleBinding, and MutatingWebhookConfiguration including clientConfig CABundle, object selector, and rules.
E2E test & util
test/e2e/create_cluster_test.go, test/e2e/util/azure.go
Adds e2e step and utility EnsureAzureWorkloadIdentityWebhookMutation which creates namespace/SA/pod and polls for projected token volume and AZURE_FEDERATED_TOKEN_FILE env injection.
Test assets/fixtures
control-plane-operator/controllers/hostedcontrolplane/testdata/..., control-plane-operator/controllers/hostedcontrolplane/v2/assets/...
Adds static kubeconfig secret asset and test fixtures; updates deployment annotations and pod spec to expose webhook secrets and volumes.

Sequence Diagram(s)

sequenceDiagram
    participant Guest as Guest Test / PodCreator
    participant KAS as kube-apiserver
    participant Webhook as azure-workload-identity-webhook
    participant CA as Control Plane PKI
    Guest->>KAS: Create Pod annotated for Azure workload identity
    KAS->>Webhook: AdmissionRequest (mutating)
    Webhook->>CA: Use serving cert + kubeconfig to validate/sign or verify tokens
    Webhook-->>KAS: AdmissionResponse (inject projected token volume + AZURE_FEDERATED_TOKEN_FILE env)
    KAS-->>Guest: Pod created with projected token volume and env var
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 3.13% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Structure And Quality ⚠️ Warning E2E test utility creates cluster-scoped resources without cleanup mechanism, and unit tests lack meaningful failure messages in assertions. Wrap resource creation in cleanup function (e.g., defer Delete) or accept cleanup callback, and add descriptive failure messages to all assertions.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: adding Azure workload identity webhook as a KAS sidecar container, which is the primary feature across all modified files.
Stable And Deterministic Test Names ✅ Passed No Ginkgo test structures found in added test files; all use standard Go testing with t.Run() and static test names.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci

openshift-ci Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: csrwng

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release approved Indicates a PR has been approved by an approver from all required OWNERS files. area/platform/azure PR/issue for Azure (AzurePlatform) platform area/testing Indicates the PR includes changes for e2e testing and removed do-not-merge/needs-area labels Mar 5, 2026
@csrwng

csrwng commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

/test verify
/test unit
/test e2e-aks

@openshift-ci-robot

openshift-ci-robot commented Mar 5, 2026

Copy link
Copy Markdown

@csrwng: This pull request references CNTRLPLANE-2910 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Deploy the Azure workload identity webhook as a sidecar container in the KAS deployment for Azure platform clusters, mirroring the existing AWS pod identity webhook pattern. This enables customer workloads to authenticate to Azure services via annotated ServiceAccounts.

Changes:

  • Add serving certificate PKI reconciliation for the webhook
  • Add webhook sidecar container to KAS deployment (port 9443, health 9440)
  • Add kubeconfig generation for the webhook service account
  • Register webhook kubeconfig manifest adapter in KAS component
  • Create guest cluster RBAC (ClusterRole/ClusterRoleBinding) and MutatingWebhookConfiguration via HCCO
  • Add unit tests for all new functions
  • Add end to end verification

Summary by CodeRabbit

  • New Features

  • Added Azure Workload Identity Webhook support to automatically inject Azure federated token configuration into pods on Azure platforms.

  • Webhook now mutates qualifying pods to include projected token volumes and Azure token environment variables for seamless workload identity integration.

  • Tests

  • Added comprehensive test coverage for webhook serving certificate generation, kubeconfig reconciliation, and pod mutation validation.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@bryan-cox

Copy link
Copy Markdown
Member

/test e2e-azure-self-managed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (5)
test/e2e/util/azure.go (1)

23-58: Add cleanup for test namespace resources

The test creates a unique namespace but never deletes it. Add t.Cleanup to avoid leaked resources and quota pressure in long-running e2e lanes.

🧹 Suggested cleanup hook
 	nsName := fmt.Sprintf("azure-wi-e2e-%d", time.Now().UnixNano())
 	testNamespace := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: nsName}}
 	g.Expect(guestClient.Create(ctx, testNamespace)).To(Succeed(), "failed to create test namespace")
+	t.Cleanup(func() {
+		_ = guestClient.Delete(context.Background(), testNamespace)
+	})
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/util/azure.go` around lines 23 - 58, The test creates a unique
namespace (nsName/testNamespace) and resources with guestClient.Create but never
cleans them up; add a t.Cleanup hook that deletes the created namespace to
prevent leaked resources and quota pressure. After successfully creating
testNamespace (and before returning), call t.Cleanup with a function that calls
guestClient.Delete(ctx, testNamespace) (handle NotFound/ignore errors) so the
namespace (and its contained Pod/ServiceAccount) is removed when the test
finishes; reference the existing nsName/testNamespace and guestClient.Create
symbols when adding the cleanup.
control-plane-operator/controllers/hostedcontrolplane/v2/kas/kubeconfig.go (1)

165-205: Extract shared webhook kubeconfig adaptation logic

AWS and Azure webhook kubeconfig adapters now duplicate the same fetch/build flow. Consolidating into one helper will reduce maintenance drift.

♻️ Suggested refactor
 func adaptAWSPodIdentityWebhookKubeconfigSecret(cpContext component.WorkloadContext, secret *corev1.Secret) error {
-	csrSigner := manifests.CSRSignerCASecret(cpContext.HCP.Namespace)
-	if err := cpContext.Client.Get(cpContext, client.ObjectKeyFromObject(csrSigner), csrSigner); err != nil {
-		return fmt.Errorf("failed to get cluster-signer-ca secret: %v", err)
-	}
-	rootCA := manifests.RootCASecret(cpContext.HCP.Namespace)
-	if err := cpContext.Client.Get(cpContext, client.ObjectKeyFromObject(rootCA), rootCA); err != nil {
-		return fmt.Errorf("failed to get root ca cert secret: %w", err)
-	}
-	rootCACM := &corev1.ConfigMap{
-		Data: map[string]string{
-			certs.CASignerCertMapKey: string(rootCA.Data[certs.CASignerCertMapKey]),
-		},
-	}
-
-	if !cpContext.SkipCertificateSigning {
-		return pki.ReconcileServiceAccountKubeconfig(secret, csrSigner, rootCACM, cpContext.HCP, "openshift-authentication", "aws-pod-identity-webhook")
-	}
-	return nil
+	return adaptWorkloadIdentityWebhookKubeconfigSecret(cpContext, secret, "aws-pod-identity-webhook")
 }
 
 func adaptAzureWorkloadIdentityWebhookKubeconfigSecret(cpContext component.WorkloadContext, secret *corev1.Secret) error {
+	return adaptWorkloadIdentityWebhookKubeconfigSecret(cpContext, secret, "azure-workload-identity-webhook")
+}
+
+func adaptWorkloadIdentityWebhookKubeconfigSecret(cpContext component.WorkloadContext, secret *corev1.Secret, serviceAccountName string) error {
 	csrSigner := manifests.CSRSignerCASecret(cpContext.HCP.Namespace)
 	if err := cpContext.Client.Get(cpContext, client.ObjectKeyFromObject(csrSigner), csrSigner); err != nil {
 		return fmt.Errorf("failed to get cluster-signer-ca secret: %v", err)
@@
 
 	if !cpContext.SkipCertificateSigning {
-		return pki.ReconcileServiceAccountKubeconfig(secret, csrSigner, rootCACM, cpContext.HCP, "openshift-authentication", "azure-workload-identity-webhook")
+		return pki.ReconcileServiceAccountKubeconfig(secret, csrSigner, rootCACM, cpContext.HCP, "openshift-authentication", serviceAccountName)
 	}
 	return nil
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@control-plane-operator/controllers/hostedcontrolplane/v2/kas/kubeconfig.go`
around lines 165 - 205, Both adaptAWSPodIdentityWebhookKubeconfigSecret and
adaptAzureWorkloadIdentityWebhookKubeconfigSecret duplicate the same
fetch/build/return flow; extract that shared logic into a helper (e.g.,
reconcileWebhookKubeconfig(secret *corev1.Secret, cpContext
component.WorkloadContext, serviceAccountName string) error) that: retrieves
csrSigner via manifests.CSRSignerCASecret(cpContext.HCP.Namespace), retrieves
rootCA via manifests.RootCASecret(cpContext.HCP.Namespace), builds rootCACM
using certs.CASignerCertMapKey from rootCA.Data, checks
cpContext.SkipCertificateSigning and, if false, calls
pki.ReconcileServiceAccountKubeconfig(secret, csrSigner, rootCACM,
cpContext.HCP, "openshift-authentication", serviceAccountName) and returns its
error; then simplify adaptAWSPodIdentityWebhookKubeconfigSecret and
adaptAzureWorkloadIdentityWebhookKubeconfigSecret to call this helper with
serviceAccountName "aws-pod-identity-webhook" and
"azure-workload-identity-webhook" respectively, preserving existing error
semantics (wrap/return errors as before).
control-plane-operator/controllers/hostedcontrolplane/v2/kas/azure_workload_identity_webhook_test.go (1)

39-45: Consider extracting a shared helper for container lookup in tests.

The repeated for loop to find azure-workload-identity-webhook can be centralized to reduce duplication and test drift.

Also applies to: 78-84, 113-119, 165-170

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@control-plane-operator/controllers/hostedcontrolplane/v2/kas/azure_workload_identity_webhook_test.go`
around lines 39 - 45, Several tests repeat the same for-loop to locate a
container named "azure-workload-identity-webhook" from podSpec.Containers;
extract a small shared helper (e.g., findContainerByName(containers
[]corev1.Container, name string) *corev1.Container or
findContainerInPodSpec(podSpec corev1.PodSpec, name string) *corev1.Container)
and replace each loop (the instances that set webhookContainer by iterating
podSpec.Containers) to call this helper; ensure the helper returns nil when not
found and update assertions in the tests to use its result (currently assigned
to webhookContainer) so all occurrences (the loops currently used in the test
file) are centralized.
control-plane-operator/controllers/hostedcontrolplane/pki/azure_workload_identity_webhook_test.go (1)

117-125: Strengthen idempotency assertion by checking tls.key too.

The current check validates only tls.crt. Adding a tls.key equality assertion would make this idempotency test more complete.

✅ Suggested test enhancement
 		firstCert := make([]byte, len(secret.Data[corev1.TLSCertKey]))
 		copy(firstCert, secret.Data[corev1.TLSCertKey])
+		firstKey := make([]byte, len(secret.Data[corev1.TLSPrivateKeyKey]))
+		copy(firstKey, secret.Data[corev1.TLSPrivateKeyKey])
@@
 		if string(firstCert) != string(secret.Data[corev1.TLSCertKey]) {
 			t.Error("expected idempotent reconciliation to produce the same certificate")
 		}
+		if string(firstKey) != string(secret.Data[corev1.TLSPrivateKeyKey]) {
+			t.Error("expected idempotent reconciliation to preserve the same private key")
+		}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@control-plane-operator/controllers/hostedcontrolplane/pki/azure_workload_identity_webhook_test.go`
around lines 117 - 125, The test currently captures and compares only the
certificate bytes (firstCert from secret.Data[corev1.TLSCertKey]) for
idempotency; extend the assertion to also capture the private key bytes (e.g.,
make a second slice like firstKey from secret.Data[corev1.TLSPrivateKeyKey])
before calling ReconcileAzureWorkloadIdentityWebhookServingCert and then after
the second reconcile assert that both string(firstCert) ==
string(secret.Data[corev1.TLSCertKey]) and string(firstKey) ==
string(secret.Data[corev1.TLSPrivateKeyKey]) so the test verifies both tls.crt
and tls.key are unchanged by an idempotent reconcile.
control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources.go (1)

2183-2253: Consider extracting shared identity-webhook reconciliation scaffolding.

This function is structurally very close to reconcileAWSIdentityWebhook (Line 2120-2181). A small shared helper for RBAC + webhook upsert patterns would reduce drift risk between cloud providers.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources.go`
around lines 2183 - 2253, reconcileAzureIdentityWebhook duplicates the RBAC +
webhook upsert logic in reconcileAWSIdentityWebhook; extract a shared helper
(e.g., reconcileIdentityWebhook) that accepts the provider-specific manifest
objects or providers (clusterRole, clusterRoleBinding, webhook) plus small
params (serviceAccount name/namespace, webhook.Name/URL, label key/value, and
r.rootCA) and performs the CreateOrUpdate steps using r.CreateOrUpdate; then
replace the body of reconcileAzureIdentityWebhook and
reconcileAWSIdentityWebhook to build their provider-specific manifests
(manifests.AzureWorkloadIdentityWebhookClusterRole(),
manifests.AzureWorkloadIdentityWebhookClusterRoleBinding(),
manifests.AzureWorkloadIdentityWebhook()) and call reconcileIdentityWebhook(ctx,
r, clusterRole, clusterRoleBinding, webhook, "azure-workload-identity-webhook",
"openshift-authentication", "pod-identity-webhook.azure.mutate.io",
"azure.workload.identity/use", "true", r.rootCA) (and analogous args for AWS).
Ensure the helper returns []error and reuses the same unique symbols
CreateOrUpdate, ClusterRole, ClusterRoleBinding, and Webhook mutation logic so
both reconcileAzureIdentityWebhook and reconcileAWSIdentityWebhook delegate to
it.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@control-plane-operator/controllers/hostedcontrolplane/v2/kas/deployment.go`:
- Around line 342-343: The code dereferences hcp.Spec.Platform.Azure when
building environment vars (AZURE_TENANT_ID/AZURE_ENVIRONMENT) which can panic if
Platform or Azure is nil; update the code in deployment.go where the env vars
are added (the block that uses hcp.Spec.Platform.Azure.TenantID and
hcp.Spec.Platform.Azure.Cloud) to first check that hcp.Spec.Platform and
hcp.Spec.Platform.Azure are non-nil, and if they are nil return a controlled
reconciliation error (or wrap with fmt.Errorf) instead of proceeding; ensure
subsequent use of TenantID and Cloud only happens after these nil checks so no
direct dereference can panic.

In `@test/e2e/util/azure.go`:
- Around line 88-99: The current hasProjectedTokenVolume function returns true
for any projected serviceAccountToken (including the default kube-api-access),
so update hasProjectedTokenVolume to ignore the cluster-default projected volume
by skipping volumes whose Name equals "kube-api-access" (i.e., inside the loop
check volume.Name != "kube-api-access" before inspecting Projected.Sources) and
only return true for non-default projected serviceAccountToken sources; keep the
function signature and overall loop structure unchanged.

---

Nitpick comments:
In
`@control-plane-operator/controllers/hostedcontrolplane/pki/azure_workload_identity_webhook_test.go`:
- Around line 117-125: The test currently captures and compares only the
certificate bytes (firstCert from secret.Data[corev1.TLSCertKey]) for
idempotency; extend the assertion to also capture the private key bytes (e.g.,
make a second slice like firstKey from secret.Data[corev1.TLSPrivateKeyKey])
before calling ReconcileAzureWorkloadIdentityWebhookServingCert and then after
the second reconcile assert that both string(firstCert) ==
string(secret.Data[corev1.TLSCertKey]) and string(firstKey) ==
string(secret.Data[corev1.TLSPrivateKeyKey]) so the test verifies both tls.crt
and tls.key are unchanged by an idempotent reconcile.

In
`@control-plane-operator/controllers/hostedcontrolplane/v2/kas/azure_workload_identity_webhook_test.go`:
- Around line 39-45: Several tests repeat the same for-loop to locate a
container named "azure-workload-identity-webhook" from podSpec.Containers;
extract a small shared helper (e.g., findContainerByName(containers
[]corev1.Container, name string) *corev1.Container or
findContainerInPodSpec(podSpec corev1.PodSpec, name string) *corev1.Container)
and replace each loop (the instances that set webhookContainer by iterating
podSpec.Containers) to call this helper; ensure the helper returns nil when not
found and update assertions in the tests to use its result (currently assigned
to webhookContainer) so all occurrences (the loops currently used in the test
file) are centralized.

In `@control-plane-operator/controllers/hostedcontrolplane/v2/kas/kubeconfig.go`:
- Around line 165-205: Both adaptAWSPodIdentityWebhookKubeconfigSecret and
adaptAzureWorkloadIdentityWebhookKubeconfigSecret duplicate the same
fetch/build/return flow; extract that shared logic into a helper (e.g.,
reconcileWebhookKubeconfig(secret *corev1.Secret, cpContext
component.WorkloadContext, serviceAccountName string) error) that: retrieves
csrSigner via manifests.CSRSignerCASecret(cpContext.HCP.Namespace), retrieves
rootCA via manifests.RootCASecret(cpContext.HCP.Namespace), builds rootCACM
using certs.CASignerCertMapKey from rootCA.Data, checks
cpContext.SkipCertificateSigning and, if false, calls
pki.ReconcileServiceAccountKubeconfig(secret, csrSigner, rootCACM,
cpContext.HCP, "openshift-authentication", serviceAccountName) and returns its
error; then simplify adaptAWSPodIdentityWebhookKubeconfigSecret and
adaptAzureWorkloadIdentityWebhookKubeconfigSecret to call this helper with
serviceAccountName "aws-pod-identity-webhook" and
"azure-workload-identity-webhook" respectively, preserving existing error
semantics (wrap/return errors as before).

In
`@control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources.go`:
- Around line 2183-2253: reconcileAzureIdentityWebhook duplicates the RBAC +
webhook upsert logic in reconcileAWSIdentityWebhook; extract a shared helper
(e.g., reconcileIdentityWebhook) that accepts the provider-specific manifest
objects or providers (clusterRole, clusterRoleBinding, webhook) plus small
params (serviceAccount name/namespace, webhook.Name/URL, label key/value, and
r.rootCA) and performs the CreateOrUpdate steps using r.CreateOrUpdate; then
replace the body of reconcileAzureIdentityWebhook and
reconcileAWSIdentityWebhook to build their provider-specific manifests
(manifests.AzureWorkloadIdentityWebhookClusterRole(),
manifests.AzureWorkloadIdentityWebhookClusterRoleBinding(),
manifests.AzureWorkloadIdentityWebhook()) and call reconcileIdentityWebhook(ctx,
r, clusterRole, clusterRoleBinding, webhook, "azure-workload-identity-webhook",
"openshift-authentication", "pod-identity-webhook.azure.mutate.io",
"azure.workload.identity/use", "true", r.rootCA) (and analogous args for AWS).
Ensure the helper returns []error and reuses the same unique symbols
CreateOrUpdate, ClusterRole, ClusterRoleBinding, and Webhook mutation logic so
both reconcileAzureIdentityWebhook and reconcileAWSIdentityWebhook delegate to
it.

In `@test/e2e/util/azure.go`:
- Around line 23-58: The test creates a unique namespace (nsName/testNamespace)
and resources with guestClient.Create but never cleans them up; add a t.Cleanup
hook that deletes the created namespace to prevent leaked resources and quota
pressure. After successfully creating testNamespace (and before returning), call
t.Cleanup with a function that calls guestClient.Delete(ctx, testNamespace)
(handle NotFound/ignore errors) so the namespace (and its contained
Pod/ServiceAccount) is removed when the test finishes; reference the existing
nsName/testNamespace and guestClient.Create symbols when adding the cleanup.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 32264c83-0bee-4da9-a268-03c38baee639

📥 Commits

Reviewing files that changed from the base of the PR and between 687e33e and 9f22206.

📒 Files selected for processing (18)
  • control-plane-operator/controllers/hostedcontrolplane/hostedcontrolplane_controller.go
  • control-plane-operator/controllers/hostedcontrolplane/manifests/azure.go
  • control-plane-operator/controllers/hostedcontrolplane/manifests/pki.go
  • control-plane-operator/controllers/hostedcontrolplane/pki/azure_workload_identity_webhook.go
  • control-plane-operator/controllers/hostedcontrolplane/pki/azure_workload_identity_webhook_test.go
  • control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/AROSwift/zz_fixture_TestControlPlaneComponents_azure_workload_identity_webhook_kubeconfig_secret.yaml
  • control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/AROSwift/zz_fixture_TestControlPlaneComponents_kube_apiserver_controlplanecomponent.yaml
  • control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/AROSwift/zz_fixture_TestControlPlaneComponents_kube_apiserver_deployment.yaml
  • control-plane-operator/controllers/hostedcontrolplane/v2/assets/kube-apiserver/azure-workload-identity-webhook-kubeconfig.yaml
  • control-plane-operator/controllers/hostedcontrolplane/v2/kas/azure_workload_identity_webhook_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/kas/component.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/kas/deployment.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/kas/kubeconfig.go
  • control-plane-operator/hostedclusterconfigoperator/controllers/resources/azure_workload_identity_webhook_test.go
  • control-plane-operator/hostedclusterconfigoperator/controllers/resources/manifests/azure_workload_identity_webhook.go
  • control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources.go
  • test/e2e/create_cluster_test.go
  • test/e2e/util/azure.go

Comment thread test/e2e/util/azure.go
@cwbotbot

cwbotbot commented Mar 5, 2026

Copy link
Copy Markdown

Test Results

e2e-aws

e2e-aks

Failed Tests

Total failed tests: 6

  • TestCreateCluster
  • TestCreateCluster/Main
  • TestCreateCluster/Main/EnsureGlobalPullSecret
  • TestCreateCluster/Main/EnsureGlobalPullSecret/Check_if_the_config.json_is_correct_in_all_of_the_nodes
  • TestCreateClusterCustomConfig

... and 1 more failed tests

@csrwng
csrwng force-pushed the azure-web-identity-webhook branch from 9f22206 to 79cd3e1 Compare March 5, 2026 22:21
@openshift-ci-robot

openshift-ci-robot commented Mar 5, 2026

Copy link
Copy Markdown

@csrwng: This pull request references CNTRLPLANE-2910 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Deploy the Azure workload identity webhook as a sidecar container in the KAS deployment for Azure platform clusters, mirroring the existing AWS pod identity webhook pattern. This enables customer workloads to authenticate to Azure services via annotated ServiceAccounts.

Changes:

  • Add serving certificate PKI reconciliation for the webhook
  • Add webhook sidecar container to KAS deployment (port 9443, health 9440)
  • Add kubeconfig generation for the webhook service account
  • Register webhook kubeconfig manifest adapter in KAS component
  • Create guest cluster RBAC (ClusterRole/ClusterRoleBinding) and MutatingWebhookConfiguration via HCCO
  • Add unit tests for all new functions
  • Add end to end verification

Summary by CodeRabbit

  • New Features

  • Azure Workload Identity Webhook support: mutating webhook, RBAC, and kube-apiserver integration to inject projected token volumes and Azure token env vars on Azure platforms.

  • Added serving certificate and kubeconfig secrets for the webhook.

  • Tests

  • Unit and integration tests for serving certificate generation, kubeconfig reconciliation, webhook wiring.

  • E2E test utility and cluster test step to validate pod mutation behavior.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
control-plane-operator/controllers/hostedcontrolplane/v2/kas/azure_workload_identity_webhook_test.go (1)

38-45: Consider extracting repeated container lookup into a helper.

The same container lookup loop pattern appears in all four test validators. Extracting this to a helper function would reduce duplication and improve maintainability.

♻️ Suggested helper extraction
func findContainer(podSpec *corev1.PodSpec, name string) *corev1.Container {
	for i := range podSpec.Containers {
		if podSpec.Containers[i].Name == name {
			return &podSpec.Containers[i]
		}
	}
	return nil
}

Then use it in validators:

-var webhookContainer *corev1.Container
-for i := range podSpec.Containers {
-	if podSpec.Containers[i].Name == "azure-workload-identity-webhook" {
-		webhookContainer = &podSpec.Containers[i]
-		break
-	}
-}
+webhookContainer := findContainer(podSpec, "azure-workload-identity-webhook")

Also applies to: 76-83, 111-118, 163-169

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@control-plane-operator/controllers/hostedcontrolplane/v2/kas/azure_workload_identity_webhook_test.go`
around lines 38 - 45, Extract the repeated container lookup into a small helper
like findContainer(podSpec *corev1.PodSpec, name string) *corev1.Container and
replace the duplicate loops inside each validatePod closure (the validators
around azure-workload-identity-webhook at the occurrences shown) with calls to
findContainer; ensure the helper returns nil when not found and update tests to
assert non-nil before using the returned *corev1.Container to keep behavior
identical.
test/e2e/util/azure.go (1)

19-86: Consider adding cleanup for test resources.

The test creates a namespace, ServiceAccount, and Pod but does not clean them up after the test completes. While namespaces with unique names won't collide, they will accumulate over multiple test runs.

♻️ Suggested cleanup using t.Cleanup
 func EnsureAzureWorkloadIdentityWebhookMutation(t *testing.T, ctx context.Context, guestClient crclient.Client) {
 	t.Helper()
 	g := NewWithT(t)

 	nsName := fmt.Sprintf("azure-wi-e2e-%d", time.Now().UnixNano())
 	testNamespace := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: nsName}}
 	g.Expect(guestClient.Create(ctx, testNamespace)).To(Succeed(), "failed to create test namespace")
+	t.Cleanup(func() {
+		if err := guestClient.Delete(context.Background(), testNamespace); err != nil {
+			t.Logf("failed to cleanup test namespace %s: %v", nsName, err)
+		}
+	})
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/util/azure.go` around lines 19 - 86, The test
EnsureAzureWorkloadIdentityWebhookMutation creates Kubernetes resources
(Namespace, ServiceAccount, Pod) but never deletes them; add cleanup by
registering t.Cleanup callbacks immediately after creating each resource to
delete them via guestClient.Delete (handle and ignore NotFound errors) or delete
the Namespace which will cascade; reference the created objects testNamespace,
serviceAccount, and pod and call guestClient.Delete(ctx, testNamespace) /
guestClient.Delete(ctx, serviceAccount) / guestClient.Delete(ctx, pod) inside
t.Cleanup closures so resources are removed after the test completes.
control-plane-operator/controllers/hostedcontrolplane/pki/azure_workload_identity_webhook_test.go (1)

15-86: Consider simplifying single-case table-driven test.

The table-driven test structure with only one test case adds unnecessary complexity. Consider converting to a simple test function or adding additional test cases (e.g., error scenarios, different CA configurations).

♻️ Simplified version
 func TestReconcileAzureWorkloadIdentityWebhookServingCert(t *testing.T) {
-	testCases := []struct {
-		name string
-	}{
-		{
-			name: "When reconciling the serving cert it should generate a valid TLS certificate for 127.0.0.1",
-		},
-	}
-
-	for _, tc := range testCases {
-		t.Run(tc.name, func(t *testing.T) {
+	t.Run("When reconciling the serving cert it should generate a valid TLS certificate for 127.0.0.1", func(t *testing.T) {
 			namespace := "test-namespace"
 			// ... rest of test body unchanged ...
-		})
-	}
+	})
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@control-plane-operator/controllers/hostedcontrolplane/pki/azure_workload_identity_webhook_test.go`
around lines 15 - 86, The test
TestReconcileAzureWorkloadIdentityWebhookServingCert currently uses a
single-entry table-driven pattern which is unnecessary; simplify by removing the
testCases slice and the t.Run loop and move the test body directly into the
TestReconcileAzureWorkloadIdentityWebhookServingCert function so it executes
inline, keeping the existing setup and assertions that call
reconcileSelfSignedCA and ReconcileAzureWorkloadIdentityWebhookServingCert and
validate secret.Data and the parsed cert; alternatively if you want to keep
table-driven style, add more cases (e.g., CA error, missing CA, different SANs)
referencing the same functions instead of a single-case loop.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@control-plane-operator/controllers/hostedcontrolplane/pki/azure_workload_identity_webhook_test.go`:
- Around line 15-86: The test
TestReconcileAzureWorkloadIdentityWebhookServingCert currently uses a
single-entry table-driven pattern which is unnecessary; simplify by removing the
testCases slice and the t.Run loop and move the test body directly into the
TestReconcileAzureWorkloadIdentityWebhookServingCert function so it executes
inline, keeping the existing setup and assertions that call
reconcileSelfSignedCA and ReconcileAzureWorkloadIdentityWebhookServingCert and
validate secret.Data and the parsed cert; alternatively if you want to keep
table-driven style, add more cases (e.g., CA error, missing CA, different SANs)
referencing the same functions instead of a single-case loop.

In
`@control-plane-operator/controllers/hostedcontrolplane/v2/kas/azure_workload_identity_webhook_test.go`:
- Around line 38-45: Extract the repeated container lookup into a small helper
like findContainer(podSpec *corev1.PodSpec, name string) *corev1.Container and
replace the duplicate loops inside each validatePod closure (the validators
around azure-workload-identity-webhook at the occurrences shown) with calls to
findContainer; ensure the helper returns nil when not found and update tests to
assert non-nil before using the returned *corev1.Container to keep behavior
identical.

In `@test/e2e/util/azure.go`:
- Around line 19-86: The test EnsureAzureWorkloadIdentityWebhookMutation creates
Kubernetes resources (Namespace, ServiceAccount, Pod) but never deletes them;
add cleanup by registering t.Cleanup callbacks immediately after creating each
resource to delete them via guestClient.Delete (handle and ignore NotFound
errors) or delete the Namespace which will cascade; reference the created
objects testNamespace, serviceAccount, and pod and call guestClient.Delete(ctx,
testNamespace) / guestClient.Delete(ctx, serviceAccount) /
guestClient.Delete(ctx, pod) inside t.Cleanup closures so resources are removed
after the test completes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b8d6d2c2-0186-4bfe-a812-572c5cedeceb

📥 Commits

Reviewing files that changed from the base of the PR and between 9f22206 and 79cd3e1.

📒 Files selected for processing (18)
  • control-plane-operator/controllers/hostedcontrolplane/hostedcontrolplane_controller.go
  • control-plane-operator/controllers/hostedcontrolplane/manifests/azure.go
  • control-plane-operator/controllers/hostedcontrolplane/manifests/pki.go
  • control-plane-operator/controllers/hostedcontrolplane/pki/azure_workload_identity_webhook.go
  • control-plane-operator/controllers/hostedcontrolplane/pki/azure_workload_identity_webhook_test.go
  • control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/AROSwift/zz_fixture_TestControlPlaneComponents_azure_workload_identity_webhook_kubeconfig_secret.yaml
  • control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/AROSwift/zz_fixture_TestControlPlaneComponents_kube_apiserver_controlplanecomponent.yaml
  • control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/AROSwift/zz_fixture_TestControlPlaneComponents_kube_apiserver_deployment.yaml
  • control-plane-operator/controllers/hostedcontrolplane/v2/assets/kube-apiserver/azure-workload-identity-webhook-kubeconfig.yaml
  • control-plane-operator/controllers/hostedcontrolplane/v2/kas/azure_workload_identity_webhook_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/kas/component.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/kas/deployment.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/kas/kubeconfig.go
  • control-plane-operator/hostedclusterconfigoperator/controllers/resources/azure_workload_identity_webhook_test.go
  • control-plane-operator/hostedclusterconfigoperator/controllers/resources/manifests/azure_workload_identity_webhook.go
  • control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources.go
  • test/e2e/create_cluster_test.go
  • test/e2e/util/azure.go
✅ Files skipped from review due to trivial changes (1)
  • control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/AROSwift/zz_fixture_TestControlPlaneComponents_azure_workload_identity_webhook_kubeconfig_secret.yaml
🚧 Files skipped from review as they are similar to previous changes (6)
  • control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/AROSwift/zz_fixture_TestControlPlaneComponents_kube_apiserver_controlplanecomponent.yaml
  • test/e2e/create_cluster_test.go
  • control-plane-operator/controllers/hostedcontrolplane/manifests/pki.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/kas/kubeconfig.go
  • control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/AROSwift/zz_fixture_TestControlPlaneComponents_kube_apiserver_deployment.yaml
  • control-plane-operator/controllers/hostedcontrolplane/pki/azure_workload_identity_webhook.go

@csrwng

csrwng commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-azure-self-managed

Comment thread control-plane-operator/controllers/hostedcontrolplane/v2/kas/kubeconfig.go Outdated
@enxebre

enxebre commented Mar 6, 2026

Copy link
Copy Markdown
Member

dropped some minor comments
/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Mar 6, 2026
@openshift-ci-robot

Copy link
Copy Markdown

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks-4-21
/test e2e-aws-4-21
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 8, 2026
@xiuwang

xiuwang commented Mar 13, 2026

Copy link
Copy Markdown

/retest-required

2 similar comments
@muraee

muraee commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

/retest-required

@muraee

muraee commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

/retest-required

Comment thread test/e2e/util/azure.go Outdated
)

func EnsureAzureWorkloadIdentityWebhookMutation(t *testing.T, ctx context.Context, guestClient crclient.Client) {
t.Helper()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to start a new subtest for this with t.Run() and gate to run only for 4.22 AtLeast(4.22)

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 259cead and 2 for PR HEAD aef7f18 in total

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD dd74079 and 1 for PR HEAD aef7f18 in total

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 2172048 and 0 for PR HEAD aef7f18 in total

@openshift-ci-robot

Copy link
Copy Markdown

/hold

Revision aef7f18 was retested 3 times: holding

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 13, 2026
@xiuwang

xiuwang commented Mar 16, 2026

Copy link
Copy Markdown

/retest

Wrap EnsureAzureWorkloadIdentityWebhookMutation in a t.Run subtest
with AtLeast(Version422) so the test is skipped on older versions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Mar 16, 2026
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 16, 2026
@muraee

muraee commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

/lgtm

1 similar comment
@enxebre

enxebre commented Mar 16, 2026

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Mar 16, 2026
@openshift-ci-robot

Copy link
Copy Markdown

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks-4-21
/test e2e-aws-4-21
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws

@celebdor

Copy link
Copy Markdown
Collaborator

/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 16, 2026
@bryan-cox

Copy link
Copy Markdown
Member

/test e2e-aws-4-21

1 similar comment
@bryan-cox

Copy link
Copy Markdown
Member

/test e2e-aws-4-21

@xiuwang

xiuwang commented Mar 17, 2026

Copy link
Copy Markdown

/verified by @xiuwang

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 17, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@xiuwang: This PR has been marked as verified by @xiuwang.

Details

In response to this:

/verified by @xiuwang

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 213554f into openshift:main Mar 17, 2026
24 of 25 checks passed
@openshift-cherrypick-robot

Copy link
Copy Markdown

@celebdor: #7867 failed to apply on top of branch "release-4.21":

Applying: feat(cpo): add Azure workload identity webhook as KAS sidecar
Using index info to reconstruct a base tree...
M	control-plane-operator/controllers/hostedcontrolplane/hostedcontrolplane_controller.go
M	control-plane-operator/controllers/hostedcontrolplane/manifests/pki.go
M	control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/AROSwift/zz_fixture_TestControlPlaneComponents_kube_apiserver_deployment.yaml
M	control-plane-operator/controllers/hostedcontrolplane/v2/kas/deployment.go
M	control-plane-operator/controllers/hostedcontrolplane/v2/kas/kubeconfig.go
M	control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources.go
M	test/e2e/create_cluster_test.go
Falling back to patching base and 3-way merge...
Auto-merging test/e2e/create_cluster_test.go
Auto-merging control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources.go
Auto-merging control-plane-operator/controllers/hostedcontrolplane/v2/kas/kubeconfig.go
Auto-merging control-plane-operator/controllers/hostedcontrolplane/v2/kas/deployment.go
Auto-merging control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/AROSwift/zz_fixture_TestControlPlaneComponents_kube_apiserver_deployment.yaml
CONFLICT (content): Merge conflict in control-plane-operator/controllers/hostedcontrolplane/testdata/kube-apiserver/AROSwift/zz_fixture_TestControlPlaneComponents_kube_apiserver_deployment.yaml
Auto-merging control-plane-operator/controllers/hostedcontrolplane/manifests/pki.go
Auto-merging control-plane-operator/controllers/hostedcontrolplane/hostedcontrolplane_controller.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 feat(cpo): add Azure workload identity webhook as KAS sidecar

Details

In response to this:

/cherry-pick release-4.21 release-4.20

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

celebdor added a commit to celebdor/hypershift that referenced this pull request Jun 15, 2026
…4.20

The Azure workload identity webhook was originally implemented for
4.22 (PR openshift#7867) but was subsequently backported to 4.20 (PR openshift#7998)
and 4.21 (PR openshift#7997). Update the e2e test version gate from Version422
to Version420 so the test runs against all supported versions.

Refs: CNTRLPLANE-3093, CNTRLPLANE-3096

Signed-off-by: Antoni Segura Puimedon <antoni@redhat.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/platform/azure PR/issue for Azure (AzurePlatform) platform area/testing Indicates the PR includes changes for e2e testing jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants