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

fix: Enforce NonAdminBackup spec field values #110

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mateusoliveira43
Copy link
Contributor

@mateusoliveira43 mateusoliveira43 commented Nov 7, 2024

Why the changes were made

Resolves #33

Related to: #37

Blocked by: openshift/oadp-operator#1584

This PR adds fetching of OADP's DPA during NAC set up, adding DPA spec.nonAdmin.enforceBackupSpec to NonAdminBackupReconciler and adds validation for NonAdminBackup spec respecting enforcement.

Note: admin user can not enforce falsy values.

How to test the changes made

Read design.

Follow install-from-source testing documentation, pointing this branch and my OADP fork branch fix/enforce-non-admin-bckup-spec-field-values

Copy link

openshift-ci bot commented Nov 7, 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

Copy link

openshift-ci bot commented Nov 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mateusoliveira43

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:

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 the approved label Nov 7, 2024
go.mod Outdated
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

replace github.com/vmware-tanzu/velero => github.com/openshift/velero v0.10.2-0.20240919150610-92244630d90b

replace github.com/openshift/oadp-operator => github.com/mateusoliveira43/oadp-operator v0.0.0-20241108184219-7913bfce1719
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO remove this prior to merge

docs/design/admin_control_over_spec.md Outdated Show resolved Hide resolved
docs/design/admin_control_over_spec.md Outdated Show resolved Hide resolved
docs/design/admin_control_over_spec.md Outdated Show resolved Hide resolved
docs/design/admin_control_over_spec.md Show resolved Hide resolved
docs/design/admin_control_over_spec.md Show resolved Hide resolved
docs/design/admin_control_over_spec.md Show resolved Hide resolved
@mateusoliveira43 mateusoliveira43 force-pushed the fix/enforce-backup-spec-field-values branch from c4c3074 to 306351b Compare November 14, 2024 11:41
setupLog.Error(err, "unable to create Kubernetes client")
os.Exit(1)
}
// TODO we could pass DPA name as env var and do a get call directly. Better?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO

name: "IncludedNamespaces",
},
{
// should not be enforced?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO

run make manifests

Signed-off-by: Mateus Oliveira <[email protected]>
@mateusoliveira43 mateusoliveira43 marked this pull request as ready for review November 14, 2024 11:52
@openshift-ci openshift-ci bot requested review from mpryc and mrnold November 14, 2024 11:52
@mateusoliveira43
Copy link
Contributor Author

/hold Blocked by openshift/oadp-operator#1584

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.

3 participants