Skip to content

Conversation

@huangmingxia
Copy link
Contributor

This PR relaxes the Azure webhook validation to only require baseDomainResourceGroupName when manageDNS is enabled.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 3, 2025

@huangmingxia: This pull request references HIVE-2690 which is a valid jira issue.

In response to this:

This PR relaxes the Azure webhook validation to only require baseDomainResourceGroupName when manageDNS is enabled.

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 Dec 3, 2025
@openshift-ci openshift-ci bot requested review from dlom and suhanime December 3, 2025 08:11
@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.39%. Comparing base (6104f29) to head (821e897).
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
.../v1/clusterdeployment_validating_admission_hook.go 83.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2802      +/-   ##
==========================================
+ Coverage   50.35%   50.39%   +0.04%     
==========================================
  Files         279      279              
  Lines       34180    34190      +10     
==========================================
+ Hits        17210    17231      +21     
+ Misses      15617    15595      -22     
- Partials     1353     1364      +11     
Files with missing lines Coverage Δ
...s/hive/v1/clusterpool_validating_admission_hook.go 80.85% <100.00%> (ø)
.../v1/clusterdeployment_validating_admission_hook.go 84.73% <83.33%> (-2.18%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


allErrs = append(allErrs, validateClusterPlatform(specPath.Child("platform"), cd.Spec.Platform)...)

if cd.Spec.Platform.Azure != nil && cd.Spec.ManageDNS && cd.Spec.Platform.Azure.BaseDomainResourceGroupName == "" {
Copy link
Member

Choose a reason for hiding this comment

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

I'm curious why you moved this out of validateClusterPlatform?

Oh, is it because we don't currently have access to cd.Spec.ManageDNS there?

I guess the cleanest alternative is making validateClusterPlatform accept the cd instead of cd.Spec.Platform.

I can't decide whether it's worth doing that for the sake of keeping all more of the platform validation together in one spot.

This file isn't beautifully organized in the first place...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you :)
Yes, validateClusterPlatform does not have access to cd.Spec.ManageDNS, it only receives the platform fields.

I guess the cleanest alternative is making validateClusterPlatform accept the cd instead of cd.Spec.Platform.

That would certainly work, but at the time I was concerned it might change the function’s structure, so I didn’t go with that approach.

Copy link
Member

@2uasimojo 2uasimojo left a comment

Choose a reason for hiding this comment

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

/lgtm

I can't decide whether it's worth refactoring to try to keep more of the platform validation together. I'll leave it up to you. Unhold or re-push :)

/hold

@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 Dec 3, 2025
@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 3, 2025
@huangmingxia
Copy link
Contributor Author

@2uasimojo Thanks for your insight! I’m happy to try refactoring this part :)

…pName

Require baseDomainResourceGroupName only when manageDNS=true, not for private clusters
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Dec 8, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 8, 2025

@huangmingxia: all tests passed!

Full PR test history. Your PR dashboard.

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.

Copy link
Member

@2uasimojo 2uasimojo left a comment

Choose a reason for hiding this comment

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

Yup, that works!

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 8, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 8, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 2uasimojo, huangmingxia

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

The pull request process is described here

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

@huangmingxia
Copy link
Contributor Author

/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 Dec 8, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 6f78f6b into openshift:master Dec 8, 2025
22 checks passed
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. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants