Skip to content

NO-JIRA: revert(api): remove APIServer Route CEL validation for Azure#8074

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
bryan-cox:fix-azure-kas-route
Mar 25, 2026
Merged

NO-JIRA: revert(api): remove APIServer Route CEL validation for Azure#8074
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
bryan-cox:fix-azure-kas-route

Conversation

@bryan-cox
Copy link
Member

@bryan-cox bryan-cox commented Mar 25, 2026

Summary

PR #8055 added a CEL XValidation rule requiring Azure HostedClusters to use Route publishing strategy for APIServer:

self.platform.type == "Azure" ? self.services.exists(s, s.service == "APIServer" && s.servicePublishingStrategy.type == "Route") : true

This breaks the e2e-azure-self-managed CI job because the management cluster HostedCluster is created via hypershift create cluster azure without --external-dns-domain, and GetIngressServicePublishingStrategyMapping defaults APIServer to LoadBalancer. The management cluster HostedCluster is rejected by the validation:

failed to apply object "clusters/68a4b4471b-mgmt": HostedCluster.hypershift.openshift.io "68a4b4471b-mgmt" is invalid:
  spec: Invalid value: "object": Azure platform requires APIServer to use Route service publishing strategy

This reverts only the APIServer Route rule. The existing OAuthServer, Konnectivity, and Ignition Route requirements are unaffected.

The APIServer Route requirement will be re-added in #7821 together with the CLI fix that ensures the Azure create command always sets APIServer to Route.

Test plan

  • e2e-azure-self-managed CI job passes
  • go build ./... passes
  • go test ./cmd/cluster/azure/... passes

Summary by CodeRabbit

  • Bug Fixes
    • Removed an overly restrictive validation requirement for Azure platform APIServer service publishing strategy configuration, allowing greater flexibility in configuration options while maintaining validation for other services.

Remove the CEL XValidation rule that requires Azure HostedClusters to
use Route publishing strategy for APIServer. This rule was added in
PR openshift#8055 but breaks the e2e-azure-self-managed CI job because the
management cluster HostedCluster is created without external DNS,
defaulting APIServer to LoadBalancer.

The OAuthServer, Konnectivity, and Ignition Route requirements are
unaffected — only the APIServer rule is removed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci-robot
Copy link

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 0380b44b-db23-450c-89dc-d83e80aa102b

📥 Commits

Reviewing files that changed from the base of the PR and between 77fb5d8 and 0fbf5e1.

⛔ Files ignored due to path filters (18)
  • api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/AAA_ungated.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/AutoNodeKarpenter.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ClusterUpdateAcceptRisks.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ClusterVersionOperatorConfiguration.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ExternalOIDC.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ExternalOIDCWithUIDAndExtraClaimMappings.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ExternalOIDCWithUpstreamParity.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/GCPPlatform.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/HCPEtcdBackup.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/HyperShiftOnlyDynamicResourceAllocation.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/ImageStreamImportMode.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/KMSEncryptionProvider.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/NetworkDiagnosticsConfig.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • api/hypershift/v1beta1/zz_generated.featuregated-crd-manifests/hostedclusters.hypershift.openshift.io/OpenStack.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • cmd/install/assets/hypershift-operator/zz_generated.crd-manifests/hostedclusters-Hypershift-CustomNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/**, !cmd/install/assets/**/*.yaml
  • cmd/install/assets/hypershift-operator/zz_generated.crd-manifests/hostedclusters-Hypershift-Default.crd.yaml is excluded by !**/zz_generated.crd-manifests/**, !cmd/install/assets/**/*.yaml
  • cmd/install/assets/hypershift-operator/zz_generated.crd-manifests/hostedclusters-Hypershift-TechPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/**, !cmd/install/assets/**/*.yaml
  • vendor/github.com/openshift/hypershift/api/hypershift/v1beta1/hostedcluster_types.go is excluded by !vendor/**, !**/vendor/**
📒 Files selected for processing (1)
  • api/hypershift/v1beta1/hostedcluster_types.go
💤 Files with no reviewable changes (1)
  • api/hypershift/v1beta1/hostedcluster_types.go

📝 Walkthrough

Walkthrough

A kubebuilder CEL XValidation rule was removed from the HostedClusterSpec in the hosted cluster types file. The removed rule enforced a constraint specific to the Azure platform, requiring that when a service entry for "APIServer" was defined, it must use servicePublishingStrategy.type == "Route". The validation rules for other Azure services (OAuthServer, Konnectivity, and Ignition) with the same Route publishing requirement remain in place, as do all other HostedClusterSpec validation rules.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci bot added area/api Indicates the PR includes changes for the API area/cli Indicates the PR includes changes for CLI and removed do-not-merge/needs-area labels Mar 25, 2026
@openshift-ci openshift-ci bot requested review from cblecker and muraee March 25, 2026 20:43
@sjenning
Copy link
Contributor

/lgtm
/approve
/verified bypass

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

@sjenning: The verified label has been added.

Details

In response to this:

/lgtm
/approve
/verified bypass

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 added the lgtm Indicates that a PR is ready to be merged. label Mar 25, 2026
@openshift-ci-robot
Copy link

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

@sjenning
Copy link
Contributor

/override ci/prow/e2e-aks
/override ci/prow/e2e-aws
/override ci/prow/e2e-aws-upgrade-hypershift-operator
/override ci/prow/e2e-azure-self-managed
/override ci/prow/e2e-kubevirt-aws-ovn-reduced
/override ci/prow/e2e-v2-aws

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 25, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox, sjenning

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 25, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 25, 2026

@sjenning: Overrode contexts on behalf of sjenning: ci/prow/e2e-aks, ci/prow/e2e-aws, ci/prow/e2e-aws-upgrade-hypershift-operator, ci/prow/e2e-azure-self-managed, ci/prow/e2e-kubevirt-aws-ovn-reduced, ci/prow/e2e-v2-aws

Details

In response to this:

/override ci/prow/e2e-aks
/override ci/prow/e2e-aws
/override ci/prow/e2e-aws-upgrade-hypershift-operator
/override ci/prow/e2e-azure-self-managed
/override ci/prow/e2e-kubevirt-aws-ovn-reduced
/override ci/prow/e2e-v2-aws

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.

@sjenning sjenning changed the title revert(api): remove APIServer Route CEL validation for Azure NO-JIRA: revert(api): remove APIServer Route CEL validation for Azure Mar 25, 2026
@openshift-ci-robot
Copy link

@bryan-cox: This pull request explicitly references no jira issue.

Details

In response to this:

Summary

PR #8055 added a CEL XValidation rule requiring Azure HostedClusters to use Route publishing strategy for APIServer:

self.platform.type == "Azure" ? self.services.exists(s, s.service == "APIServer" && s.servicePublishingStrategy.type == "Route") : true

This breaks the e2e-azure-self-managed CI job because the management cluster HostedCluster is created via hypershift create cluster azure without --external-dns-domain, and GetIngressServicePublishingStrategyMapping defaults APIServer to LoadBalancer. The management cluster HostedCluster is rejected by the validation:

failed to apply object "clusters/68a4b4471b-mgmt": HostedCluster.hypershift.openshift.io "68a4b4471b-mgmt" is invalid:
 spec: Invalid value: "object": Azure platform requires APIServer to use Route service publishing strategy

This reverts only the APIServer Route rule. The existing OAuthServer, Konnectivity, and Ignition Route requirements are unaffected.

The APIServer Route requirement will be re-added in #7821 together with the CLI fix that ensures the Azure create command always sets APIServer to Route.

Test plan

  • e2e-azure-self-managed CI job passes
  • go build ./... passes
  • go test ./cmd/cluster/azure/... passes

Summary by CodeRabbit

  • Bug Fixes
  • Removed an overly restrictive validation requirement for Azure platform APIServer service publishing strategy configuration, allowing greater flexibility in configuration options while maintaining validation for other services.

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-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 25, 2026
@openshift-merge-bot openshift-merge-bot bot merged commit 15f5b8d into openshift:main Mar 25, 2026
27 checks passed
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 25, 2026

@bryan-cox: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

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/api Indicates the PR includes changes for the API area/cli Indicates the PR includes changes for CLI 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.

3 participants