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

feat: Integrate Non-Admin Controller (NAC) with OADP #1370

Merged

Conversation

mateusoliveira43
Copy link
Contributor

@mateusoliveira43 mateusoliveira43 commented Mar 20, 2024

Why the changes were made

Add Non-Admin Controller (NAC) to OADP to start testing it. Fixes migtools/oadp-non-admin#19

How the changes were made

Studied how to "reverse engineered" this PR #1171

Then applied necessary changes to migtools/oadp-non-admin repo

Created command to update non admin controller Kubernetes objects

How to test the changes made

Read migtools/oadp-non-admin#16

To test update command, change anything in newly added files in config/ folder and run

git clone --depth=1 git@github.com:mateusoliveira43/oadp-non-admin -b fix/contribution-doc
NON_ADMIN_CONTROLLER_PATH=<path_to_git_clone> make update-non-admin-manifests

Changes should be reverted

Also, check if all necessary files from NAC were included here.

Run make deploy-olm and create DPA with new feature

...
spec:
  features:
    nonAdmin:
      enable: true
...

You should be able to:

  • deploy Non-Admin Controller (spec.features.nonAdmin.enable true)
  • undeploy Non-Admin Controller (spec.features.nonAdmin.enable false or unset)
  • use custom Non-Admin Controller image using environment variable and unsupported override
    To create custom image, run
    git clone --depth=1 git@github.com:mateusoliveira43/oadp-non-admin -b fix/contribution-doc
    IMG=ttl.sh/<unique_name_from_your_head>:1h make docker-build docker-push

@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 Mar 20, 2024
Copy link

openshift-ci bot commented Mar 20, 2024

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

@mateusoliveira43 mateusoliveira43 changed the title feat: Integrate Non-Admin Controller with OADP feat: Integrate Non-Admin Controller (NAC) with OADP Mar 20, 2024
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 20, 2024
@mateusoliveira43 mateusoliveira43 marked this pull request as ready for review March 27, 2024 21:25
@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 Mar 27, 2024
Makefile Outdated Show resolved Hide resolved
kaovilai
kaovilai previously approved these changes Apr 4, 2024
Copy link
Member

@kaovilai kaovilai left a comment

Choose a reason for hiding this comment

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

There are still unresolved "resolved" issues, but otherwise this lgtm.

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>

func (r *DPAReconciler) buildNonAdminDeployment(deploymentObject *appsv1.Deployment, dpa *oadpv1alpha1.DataProtectionApplication) error {
// TODO https://github.com/openshift/oadp-operator/pull/1316
nonAdminImage := r.getNonAdminImage(dpa)

Choose a reason for hiding this comment

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

Lets move this function call to ensureRequiredSpecs func and modify the ensureRequiredSpecs function to just accept the deploymentObject as the only parmeter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would need to make ensureRequiredSpecs a method of DPAReconciler, because today, get image function needs DPA

I believe is better to be like this

In the end, we only call buildNonAdminDeployment function, and after Sachin's PR that function will accept the deploymentObject as the only parmeter

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
@mpryc
Copy link
Contributor

mpryc commented Apr 15, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 15, 2024
@weshayutin
Copy link
Contributor

Let's get the details on the virt test, doesn't appear like a flake to me.

https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_oadp-operator/1370/pull-ci-openshift-oadp-operator-master-4.14-e2e-test-kubevirt-aws/1779863902008381440/artifacts/e2e-test-kubevirt-aws/e2e/build-log.txt

Please rerun ci/prow/4.14-e2e-test-kubevirt-aws

Azure tests can be overridden at this time.

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD e379366 and 2 for PR HEAD be0477a in total

- apiGroups:
- velero.io
resources:
- backups
Copy link
Member

Choose a reason for hiding this comment

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

Where are the roles for restore?

Copy link
Contributor

Choose a reason for hiding this comment

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

restore is not yet in.. just backup

Copy link
Contributor Author

Choose a reason for hiding this comment

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

waiting this one merge to unblock this work for migtools/oadp-non-admin#42

deployment *appsv1.Deployment
}

func createTestDeployment(namespace string) *appsv1.Deployment {
Copy link
Member

Choose a reason for hiding this comment

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

I would call this createTestDeploymentNeedingUpdate or something to signify that this deployment is not the final expected result.

@kaovilai
Copy link
Member

/retest

see if azure works.

Copy link

openshift-ci bot commented Apr 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kaovilai, mateusoliveira43, mpryc, sseago

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 [kaovilai,mateusoliveira43,mpryc,sseago]

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

@sseago
Copy link
Contributor

sseago commented Apr 16, 2024

/override ci/prow/4.13-e2e-test-azure

Copy link

openshift-ci bot commented Apr 16, 2024

@sseago: Overrode contexts on behalf of sseago: ci/prow/4.13-e2e-test-azure

In response to this:

/override ci/prow/4.13-e2e-test-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 kubernetes/test-infra repository.

Copy link

openshift-ci bot commented Apr 16, 2024

@mateusoliveira43: 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/test-infra repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit c3cbfd6 into openshift:master Apr 16, 2024
16 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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate Non-Admin Controller with OADP
7 participants