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-639: Pass custom CA configuration to restic replication source. #198
Conversation
@mrnold: This pull request references OADP-639 which is a valid jira issue. 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 kubernetes/test-infra repository. |
Hi @mrnold. Thanks for your PR. I'm waiting for a migtools member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test |
Signed-off-by: Matthew Arnold <marnold@redhat.com>
Signed-off-by: Matthew Arnold <marnold@redhat.com>
Signed-off-by: Matthew Arnold <marnold@redhat.com>
Signed-off-by: Matthew Arnold <marnold@redhat.com>
This should be ready for review now, along with openshift/oadp-operator#918. |
@@ -347,6 +347,9 @@ func (r *VolumeSnapshotRestoreReconciler) configureRepDestResticVolOptions(vsr * | |||
} | |||
} | |||
|
|||
repDestResticVolOptions.CustomCA.Key = "RESTIC_CUSTOM_CA" | |||
repDestResticVolOptions.CustomCA.SecretName = resticSecretName |
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.
Perhaps we shouldn't be setting this if customca isn't defined.
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.
Yes, I did more testing and volsync does not work when the secret doesn't actually have this set. I will make this open the secret and check first.
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.
Okay, that's working better now.
Signed-off-by: Matthew Arnold <marnold@redhat.com>
@@ -120,6 +120,13 @@ func (r *VolumeSnapshotRestoreReconciler) buildReplicationDestination(replicatio | |||
replicationDestination.Spec = replicationDestinationSpec | |||
} | |||
|
|||
// include custom CA if specified | |||
resticCustomCA := resticSecret.Data[ResticCustomCA] | |||
if len(resticCustomCA) > 0 { |
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.
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.
The existing tests weren't really set up to check this sort of thing, so I tried adding a field to the test input struct to hold a validation function. I didn't see an easier way to do it.
@@ -138,6 +138,13 @@ func (r *VolumeSnapshotBackupReconciler) buildReplicationSource(replicationSourc | |||
replicationSource.Spec = replicationSourceSpec | |||
} | |||
|
|||
// pass along a custom CA if specified | |||
resticCustomCA := resticSecret.Data[ResticCustomCA] | |||
if len(resticCustomCA) > 0 { |
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.
Signed-off-by: Matthew Arnold <marnold@redhat.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eemcmullan, mrnold, shubham-pampattiwar 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 |
…igtools#198) Signed-off-by: Matthew Arnold <marnold@redhat.com>
…source. (#203) Signed-off-by: Matthew Arnold <marnold@redhat.com>
For Add restic custom CA fields from the secret generated in openshift/oadp-operator#918.
Draft pull request to make sure this is the right way to do this, still needs changes for plugin and replication destination.