Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set OperatorPolicy default namespace option #130

Conversation

JustinKuli
Copy link
Member

This sets the command-line flag added by the companion PR open-cluster-management-io/config-policy-controller#204

This only sets that flag when the managed cluster is using OpenShift v4. It should be noted that this flag is not currently configurable by the user (it is not for example exposed through an annotation).

Refs:

This sets the command-line flag added by the companion PR
open-cluster-management-io/config-policy-controller#204

This only sets that flag when the managed cluster is using OpenShift v4.
It should be noted that this flag is *not* currently configurable by the
user (it is not for example exposed through an annotation).

Refs:
 - https://issues.redhat.com/browse/ACM-9896

Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
@JustinKuli JustinKuli force-pushed the 9896-oppol-defaulting-namespace branch from ac67b97 to 25fb1aa Compare February 16, 2024 15:35
@JustinKuli
Copy link
Member Author

Shouldn't be merged until open-cluster-management-io/config-policy-controller#204 is done.

@JustinKuli JustinKuli marked this pull request as ready for review February 20, 2024 18:11
@JustinKuli
Copy link
Member Author

I couldn't come up with a good way to test whether this supplies the correct value on OpenShift in a test here, but if anyone things it's necessary (or has any ideas to make it easy), I can work on it more.

@@ -111,6 +111,11 @@ func getValues(cluster *clusterv1.ManagedCluster,
// Disable OperatorPolicy if the cluster is not on OpenShift version 4.y
userValues.OperatorPolicy["disabled"] = cluster.Labels["openshiftVersion-major"] != "4"

// Set the default namespace for OperatorPolicy for OpenShift 4
if cluster.Labels["openshiftVersion-major"] == "4" {
userValues.OperatorPolicy["default-namespace"] = "openshift-operators"
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious If openshift 5.xx is released in the future, should we edit this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, exactly

Copy link

openshift-ci bot commented Feb 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JustinKuli, yiraeChristineKim

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:
  • OWNERS [JustinKuli,yiraeChristineKim]

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

@openshift-merge-bot openshift-merge-bot bot merged commit 010070d into open-cluster-management-io:main Feb 20, 2024
7 checks passed
@JustinKuli JustinKuli deleted the 9896-oppol-defaulting-namespace branch February 29, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants