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

Change kyverno-policy-operator and exception-recommender namespaces on legacy #178

Merged
merged 2 commits into from
Oct 27, 2023

Conversation

fhielpos
Copy link
Member

This PR changes the default namespace from security-bundle to policy-exceptions for kyverno-policy-operator and exception-recommender apps.

@fhielpos fhielpos requested a review from a team as a code owner October 12, 2023 23:33
@fhielpos fhielpos self-assigned this Oct 12, 2023
@fhielpos
Copy link
Member Author

This is only needed until we release exception-recommender changing the defaults:

userConfig:
  exceptionRecommender:
    configMap:
      values:
        recommender:
          createNamespace: false

@stone-z
Copy link
Contributor

stone-z commented Oct 13, 2023

I agree with the namespace change, but tell me more about not creating it. It's just for the one use case we discussed already right? What about creating a policyexception for that use case and keeping the namespace creation? Or what's the plan for all the other clusters?

@fhielpos
Copy link
Member Author

We don't want the app to create the namespace because it will already be created by the bundle. If exception-recommender tries to create it through its chart it will fail to install since the namespace will already exist.

Namespace creation is a feature from exception-recommender that is meant to be used only when you are creating the Drafts in another namespace. In this case they will both live together.

@stone-z
Copy link
Contributor

stone-z commented Oct 13, 2023

Where is it created by the bundle?

@fhielpos
Copy link
Member Author

I mean that since the installation namespace will be policy-exceptions, the namespace will be created when the app is being installed.

Not by the bundle itself but by the helm client as part of the chart install.

@stone-z
Copy link
Contributor

stone-z commented Oct 17, 2023

Ok got it, and IIUC this behavior (to create the namespaces or not) is configured at the app-operator level, but the helm client will still be using chart-operator's service account. So if/when KPO and ExRec move into other namespaces we'll have to handle creating policy-exceptions somehow else

stone-z
stone-z previously approved these changes Oct 17, 2023
Copy link
Contributor

@stone-z stone-z left a comment

Choose a reason for hiding this comment

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

Typo, but LGTM

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Zach Stone <[email protected]>
@fhielpos fhielpos merged commit 8b3ee82 into legacy Oct 27, 2023
2 checks passed
@fhielpos fhielpos deleted the change-namespace-legacy branch October 27, 2023 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants