Skip to content

CNTRLPLANE-1364: feat: enable global pull secret for AWS - #6736

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
jparrill:CNTRLPLANE-1364v2
Sep 11, 2025
Merged

CNTRLPLANE-1364: feat: enable global pull secret for AWS#6736
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
jparrill:CNTRLPLANE-1364v2

Conversation

@jparrill

@jparrill jparrill commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

  • Enable global pull secret for ROSA HCP.
  • Enabled E2E for AWS plaform

Which issue(s) this PR fixes:

Summary by CodeRabbit

  • New Features

    • Enabled global pull secret management on AWS platforms, matching existing support on Azure.
  • Tests

    • Expanded end-to-end coverage to validate global pull secret behavior on AWS and Azure; test gating updated so these checks run on AWS/Azure for newer releases.

@openshift-ci

openshift-ci Bot commented Sep 2, 2025

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

@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 Sep 2, 2025
@coderabbitai

coderabbitai Bot commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@jparrill

jparrill commented Sep 2, 2025

Copy link
Copy Markdown
Contributor Author

/test unit

@jparrill

jparrill commented Sep 2, 2025

Copy link
Copy Markdown
Contributor Author

/test verify

@openshift-ci openshift-ci Bot added area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/testing Indicates the PR includes changes for e2e testing labels Sep 2, 2025
@openshift-ci

openshift-ci Bot commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jparrill

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/needs-area labels Sep 2, 2025
@jparrill jparrill changed the title feat: enable global pull secret for AWS CNTRLPLANE-1364: feat: enable global pull secret for AWS Sep 2, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 2, 2025
@openshift-ci-robot

openshift-ci-robot commented Sep 2, 2025

Copy link
Copy Markdown

@jparrill: This pull request references CNTRLPLANE-1364 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 either version "4.21." or "openshift-4.21.", but it targets "openshift-4.20" instead.

Details

In response to this:

What this PR does / why we need it

  • Enable global pull secret for ROSA HCP.
  • Enabled E2E for AWS plaform

Which issue(s) this PR fixes:

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.

@jparrill

jparrill commented Sep 2, 2025

Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot

openshift-ci-robot commented Sep 2, 2025

Copy link
Copy Markdown

@jparrill: This pull request references CNTRLPLANE-1364 which is a valid jira issue.

Details

In response to this:

/jira refresh

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.

@enxebre

enxebre commented Sep 2, 2025

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 2, 2025
@jparrill

jparrill commented Sep 2, 2025

Copy link
Copy Markdown
Contributor Author

/test e2e-aws

@jparrill

jparrill commented Sep 2, 2025

Copy link
Copy Markdown
Contributor Author

/test e2e-aks

@cwbotbot

cwbotbot commented Sep 2, 2025

Copy link
Copy Markdown

Test Results

e2e-aws

Failed Tests

Total failed tests: 21

  • TestAutoscaling
  • TestAutoscaling/ValidateHostedCluster
  • TestCreateCluster
  • TestCreateCluster/ValidateHostedCluster
  • TestCreateClusterCustomConfig

... and 16 more failed tests

e2e-aks

Failed Tests

Total failed tests: 13

  • TestAutoscaling
  • TestAutoscaling/ValidateHostedCluster
  • TestAzureScheduler
  • TestAzureScheduler/ValidateHostedCluster
  • TestCreateCluster

... and 8 more failed tests

@jparrill
jparrill marked this pull request as ready for review September 2, 2025 12:49
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 2, 2025
@openshift-ci
openshift-ci Bot requested review from enxebre and sjenning September 2, 2025 12:50
@openshift-ci-robot

openshift-ci-robot commented Sep 2, 2025

Copy link
Copy Markdown

@jparrill: This pull request references CNTRLPLANE-1364 which is a valid jira issue.

Details

In response to this:

What this PR does / why we need it

  • Enable global pull secret for ROSA HCP.
  • Enabled E2E for AWS plaform

Which issue(s) this PR fixes:

Summary by CodeRabbit

  • New Features
  • Enabled global pull secret management on AWS platforms, matching existing support on Azure.
  • Tests
  • Expanded end-to-end coverage to validate global pull secret behavior on AWS in addition to Azure.

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.

Actionable comments posted: 0

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

1718-1720: Broadened gate is correct; make skip message more informative and precise.

Pass/fail behavior is fine. Use Skipf to include the actual platform and avoid “ARO” as a platform name; prefer “Azure (ARO) or AWS”.

-		if entryHostedCluster.Spec.Platform.Type != hyperv1.AzurePlatform && entryHostedCluster.Spec.Platform.Type != hyperv1.AWSPlatform {
-			t.Skip("test only supported on platform ARO or AWS")
-		}
+		if pt := entryHostedCluster.Spec.Platform.Type; pt != hyperv1.AzurePlatform && pt != hyperv1.AWSPlatform {
+			t.Skipf("test only supported on Azure (ARO) or AWS; got %s", pt)
+		}
control-plane-operator/hostedclusterconfigoperator/cmd.go (1)

285-287: Registering globalps on AWS looks good; prefer type-safe switch over string comparisons.

This keeps behavior but avoids stringly-typed checks and reads cleaner.

-	if o.platformType == string(hyperv1.AzurePlatform) || o.platformType == string(hyperv1.AWSPlatform) {
-		controllersToRun[globalps.ControllerName] = globalps.Setup
-	}
+	switch hyperv1.PlatformType(o.platformType) {
+	case hyperv1.AzurePlatform, hyperv1.AWSPlatform:
+		controllersToRun[globalps.ControllerName] = globalps.Setup
+	}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6bbea9f and d053d79.

📒 Files selected for processing (2)
  • control-plane-operator/hostedclusterconfigoperator/cmd.go (1 hunks)
  • test/e2e/util/util.go (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/!(*.pb).go

📄 CodeRabbit inference engine (.cursor/rules/100-go-mistakes.mdc)

**/!(*.pb).go: Avoid variable shadowing
Do not over-nest control flow (e.g., nested if or for blocks)
Avoid init() functions unless absolutely necessary
Keep functions small and focused
Prefer composition over inheritance (via embedding)
Use the functional options pattern for constructors where flexibility is needed
Avoid defining interfaces until you need them
Do not return interfaces from constructors or public APIs
Define interfaces on the consumer side, not the producer side
Keep interfaces small and focused (generally 1–2 methods)
Avoid embedding pointer types unless necessary
Don’t overuse getters/setters — prefer public fields when it makes sense
Use value receivers when the method doesn't mutate state or require pointer semantics
Do not use util, common, or similarly vague package names
Avoid package name collisions by using clear, unique names
Do not expose unnecessary symbols (keep exported API minimal)
Distinguish between nil and empty slices
Avoid memory leaks from slicing large arrays
Always check the capacity when copying or appending slices
Preallocate slice capacity when size is known ahead of time
Always initialize maps before use
Check existence with the two-value assignment (val, ok := m[key])
Be aware that ranging over a map is in random order
Always check errors — don’t ignore them
Wrap errors with context when rethrowing
Avoid panics except in truly unrecoverable cases
Use errors.Is and errors.As for error comparison in Go 1.20+
Always defer cancel() when using context.WithCancel
Do not leak goroutines — ensure they exit cleanly
Avoid data races — use mutexes or channels appropriately
Never close a channel from the receiving side
Keep imports grouped and ordered: stdlib, external, internal
Avoid magic numbers — use named constants
Prefer explicit over implicit — especially in exported APIs
Only use generics when they simplify code or add real flexibility
Avoid over-engineering with type parameters
Be cautious with constraint complexity — keep...

Files:

  • control-plane-operator/hostedclusterconfigoperator/cmd.go
  • test/e2e/util/util.go
**/*.go

📄 CodeRabbit inference engine (.cursor/rules/code-formatting.mdc)

Use make lint-fix after writing Go code to automatically fix most linting issues

Follow the rules defined in @100-go-mistakes.mdc for Go code

Files:

  • control-plane-operator/hostedclusterconfigoperator/cmd.go
  • test/e2e/util/util.go
🧠 Learnings (3)
📚 Learning: 2025-08-29T18:49:17.570Z
Learnt from: CR
PR: openshift/hypershift#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T18:49:17.570Z
Learning: Applies to {hypershift-operator,control-plane-operator}/controllers/** : Place platform-specific implementations within their respective controller subdirectories to keep platform logic isolated

Applied to files:

  • control-plane-operator/hostedclusterconfigoperator/cmd.go
📚 Learning: 2025-08-29T18:49:17.570Z
Learnt from: CR
PR: openshift/hypershift#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T18:49:17.570Z
Learning: Applies to hypershift-operator/controllers/**/*.go : Place operator controller implementations under hypershift-operator/controllers/

Applied to files:

  • control-plane-operator/hostedclusterconfigoperator/cmd.go
📚 Learning: 2025-08-29T18:49:17.570Z
Learnt from: CR
PR: openshift/hypershift#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T18:49:17.570Z
Learning: Applies to control-plane-operator/controllers/**/*.go : Place control-plane controller implementations under control-plane-operator/controllers/

Applied to files:

  • control-plane-operator/hostedclusterconfigoperator/cmd.go
🧬 Code graph analysis (2)
control-plane-operator/hostedclusterconfigoperator/cmd.go (2)
api/hypershift/v1beta1/hostedcluster_types.go (2)
  • AzurePlatform (1155-1155)
  • AWSPlatform (1140-1140)
vendor/github.com/openshift/hypershift/api/hypershift/v1beta1/hostedcluster_types.go (2)
  • AzurePlatform (1155-1155)
  • AWSPlatform (1140-1140)
test/e2e/util/util.go (1)
api/hypershift/v1beta1/hostedcluster_types.go (2)
  • AzurePlatform (1155-1155)
  • AWSPlatform (1140-1140)

@jparrill

jparrill commented Sep 3, 2025

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 8, 2025
@bryan-cox

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 8, 2025
@jparrill

jparrill commented Sep 8, 2025

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-4-20

@jparrill

jparrill commented Sep 8, 2025

Copy link
Copy Markdown
Contributor Author

Hey @gaol do you mind verify this?

@gaol

gaol commented Sep 9, 2025

Copy link
Copy Markdown
Contributor

I have done the pre-merge testing using my own CPO image with this pr, and it looks good to me.

The test also passed in the draft auto test ci: openshift/release#68899

@gaol

gaol commented Sep 9, 2025

Copy link
Copy Markdown
Contributor

/verified by @gaol

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Sep 9, 2025
@openshift-ci-robot

Copy link
Copy Markdown

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

Details

In response to this:

/verified by @gaol

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.

@jparrill

jparrill commented Sep 9, 2025

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-upgrade-hypershift-operator

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 55ffa93 and 2 for PR HEAD ef923d9 in total

2 similar comments
@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 55ffa93 and 2 for PR HEAD ef923d9 in total

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 55ffa93 and 2 for PR HEAD ef923d9 in total

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 9a020d5 and 1 for PR HEAD ef923d9 in total

@gaol

gaol commented Sep 10, 2025

Copy link
Copy Markdown
Contributor

/retest

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 9a020d5 and 2 for PR HEAD ef923d9 in total

@gaol

gaol commented Sep 10, 2025

Copy link
Copy Markdown
Contributor

failures of ci/prow/e2e-aws-4-19 is expected, it needs back port to make it pass.

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 9a020d5 and 2 for PR HEAD ef923d9 in total

@jparrill

Copy link
Copy Markdown
Contributor Author

/retest

@jparrill

Copy link
Copy Markdown
Contributor Author

failures of ci/prow/e2e-aws-4-19 is expected, it needs back port to make it pass.

Yeah, that's weird, right now the condition to execute this is explicitly set in the code:

  • ARO platform
  • AWS only on 4.21 release

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 9a020d5 and 2 for PR HEAD ef923d9 in total

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD fb5e013 and 1 for PR HEAD ef923d9 in total

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD fb5e013 and 2 for PR HEAD ef923d9 in total

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 3622c14 and 1 for PR HEAD ef923d9 in total

@openshift-ci

openshift-ci Bot commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

@jparrill: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-4-19 d053d79 link true /test e2e-aws-4-19

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.

@jparrill

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-4-20

@openshift-merge-bot
openshift-merge-bot Bot merged commit 08963fc into openshift:main Sep 11, 2025
20 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. area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release 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.

6 participants