-
Notifications
You must be signed in to change notification settings - Fork 75
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
OADP-5158: Do not allow restic config use in OADP 1.5+; Deprecate restic for file system backups #1235
OADP-5158: Do not allow restic config use in OADP 1.5+; Deprecate restic for file system backups #1235
Conversation
1587d2c
to
7f9b1e9
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@mateusoliveira43: This pull request references OADP-5158 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.19.0" version, but no target version was set. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
This comment was marked as resolved.
This comment was marked as resolved.
@mateusoliveira43: This pull request references OADP-5158 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.19.0" version, but no target version was set. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
6c5473d
to
cbd019d
Compare
// restic is for backwards compatibility and is replaced by the nodeAgent | ||
// restic will be removed in the future | ||
// +kubebuilder:deprecatedversion:warning=1.3 | ||
// (do not use warning) restic field is for backwards compatibility and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/field/spec
at both places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sold on this. Changing to spec would not pass sense that restic is an CR instead of part of DPA spec?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷 I like field. alternatively spec field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or better yet..
// (do not use warning) restic field is for backwards compatibility and | |
// (do not use warning) restic config is for backwards compatibility and |
// check for VSM/Volsync DataMover (OADP 1.2 or below) syntax | ||
if r.dpa.Spec.Features != nil && r.dpa.Spec.Features.DataMover != nil { | ||
return false, errors.New("Delete vsm from spec.configuration.velero.defaultPlugins and dataMover object from spec.features. Use Velero Built-in Data Mover instead") | ||
} | ||
|
||
// check for ResticConfig (OADP 1.4 or below) syntax | ||
if r.dpa.Spec.Configuration.Restic != nil { | ||
return false, errors.New("Delete restic object from spec.configuration, use spec.configuration.nodeAgent instead") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/object/spec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sold on this. Changing to spec would not pass sense that restic is an CR instead of part of DPA spec?
@@ -16,6 +17,8 @@ import ( | |||
"github.com/openshift/oadp-operator/pkg/credentials" | |||
) | |||
|
|||
var wasRestic bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we explicitly set this as false ? (I think default is false but still)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do, it would fail https://revive.run/r#var-declaration linter that was recently merged https://github.com/vmware-tanzu/velero/pull/8636/files#diff-9917ddc9f1c3304218f7269265b746d997c5c0615478177b5fceecd33ef47cb5
specifically because we are declaring "zeroLiteral"
var zeroLiteral = map[string]bool{
"false": true, // bool
// runes
`'\x00'`: true,
`'\000'`: true,
// strings
`""`: true,
"``": true,
// numerics
"0": true,
"0.": true,
"0.0": true,
"0i": true,
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im ok with it either way.
Signed-off-by: Mateus Oliveira <[email protected]>
Signed-off-by: Mateus Oliveira <[email protected]>
cbd019d
to
1839dbc
Compare
@mateusoliveira43: This pull request references OADP-5158 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.19.0" version, but no target version was set. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
Signed-off-by: Mateus Oliveira <[email protected]>
toying around adding and removing the config.restic.enabled true/false and clearing the whole thing.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mateusoliveira43, weshayutin 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 |
@mateusoliveira43: The following tests failed, say
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-sigs/prow repository. I understand the commands that are listed here. |
Description
This PR removes logic of using old restic field (it should use nodeAgent field instead) from 1.5+ code. But it does not remove old restic field from DPA (which should only be removed when DPA version is updated), for a safe upgrade and better user experience for the users.
Also, log a Deprecation Warning when using restic in NodeAgent config.
How to test
OADP 1.5
run
make deploy-olm
and test thatspec.configuration.restic
) is presentspec.configuration.nodeAgent.uploaderType
is set torestic
Simulate a upgrade
Simulate a upgrade from OADP 1.4 to 1.5 (this PR branch), by
make catalog-test-upgrade
More info
Update should finish successfully and DPA should: