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

Integrated Cloudnative-pg into OLM package #1532

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

dannyzaken
Copy link
Member

Explain the changes

  1. Added Cloudnativ-pg resources in noobaa CSV

    • Added cnpg deployment and permissions to CSV InstallStrategy
    • Added cnpg CRDs to noobaa owned CRD list
  2. olm.go code cleanup

  3. Refactored cnpg.go

    • Simplified CnpgResources struct by holding one instance for each resource (besides CRDs) instead of holding it in a slice.
    • Filter out canned cluster roles that are unnecessary for noobaa.
    • limited the scope of the operator to a single namespace
      • Reduced unnecessary cnpg operator permissions. Moved most of the cluster rules to a namespace-scoped role
      • Configured WATCH_NAMESPACE for the operator so it will not watch the entire cluster.
    • Added cluster role for non-OLM deployments to allow modifying the admissions webhooks (required by the cnpg operator).

Issues: Fixed #xxx / Gap #xxx

Testing Instructions:

  • Doc added/updated
  • Tests added

1. Added Cloudnativ-pg resources in noobaa CSV
   - Added cnpg deployment and permissions to CSV InstallStrategy
   - Added cnpg CRDs to noobaa owned CRD list

2. olm.go code cleanup

3. Refactored cnpg.go
   - Simplified CnpgResources struct by holding one instance for each resource (besides CRDs) instead of holding it in a slice.
   - Filter out canned cluster roles that are unnecessary for noobaa.
   - limited the scope of the operator to a single namespace
      - Reduced unnecessary cnpg operator permissions. Moved most of the cluster rules to a namespace scoped role
      - Configured WATCH_NAMESPACE for the operator so it will not watch the entire cluster.
   - Added cluster role for non-OLM deployments to allow modifying the admissions webhooks (required by cnpg operator).

Signed-off-by: Danny Zaken <[email protected]>
Copy link
Contributor

@jackyalbo jackyalbo left a comment

Choose a reason for hiding this comment

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

LGTM

@dannyzaken dannyzaken merged commit 85b7819 into noobaa:master Feb 19, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants