openshift / openshift-velero-plugin

General Velero plugin for backup and restore of openshift workloads.
Apache License 2.0
47 stars 37 forks source link

Check UID before using secret as dest dockercfg secret #180

Closed kaovilai closed 1 year ago

kaovilai commented 1 year ago

Fixes #179 Fixes https://github.com/openshift/oadp-operator/issues/925

In restored namespace when restoring everything from a backup with IncludedNamespaces filter only can have more than one secret with the prefixes <svcAccountName>-dockercfg- and plugin sometimes picked up the one that is not authorized to ImagePull from internal image registry.

Each time a namespace is restored, it can bring over with them old dockercfg secrets with with UIDs belonging to old SAs.

kaovilai commented 1 year ago

fixing tests

openshift-ci[bot] commented 1 year ago

@kaovilai: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
kaovilai commented 1 year ago

/cherry-pick oadp-1.1

openshift-cherrypick-robot commented 1 year ago

@kaovilai: once the present PR merges, I will cherry-pick it on top of oadp-1.1 in a new PR and assign it to you.

In response to [this](https://github.com/openshift/openshift-velero-plugin/pull/180#issuecomment-1476599074): >/cherry-pick oadp-1.1 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
openshift-ci[bot] commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eemcmullan, kaovilai, 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](https://github.com/openshift/openshift-velero-plugin/blob/master/OWNERS)~~ [eemcmullan,kaovilai,sseago] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
openshift-cherrypick-robot commented 1 year ago

@kaovilai: new pull request created: #181

In response to [this](https://github.com/openshift/openshift-velero-plugin/pull/180#issuecomment-1476599074): >/cherry-pick oadp-1.1 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.