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

Bug 2267885: Add hub recovery labels for backing up secrets #194

Merged

Conversation

vbnrh
Copy link
Member

@vbnrh vbnrh commented Mar 6, 2024

These commits add label changes to the generated source secret as well as the ones present on the hub to make them a candidate for ACM backup and restore (https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.6/html-single/backup_and_restore)

This is done as a fix to hub recovery issue where secrets are not generated due when both the active hub and primary cluster being co-situated on the same site or zone. This causes the VRC to not be created on the remaining managed clusters and failover fails.

Copy link
Contributor

openshift-ci bot commented Mar 6, 2024

@vbnrh: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

Add hub recovery labels for backing up secrets

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.

@openshift-ci openshift-ci bot added the approved label Mar 6, 2024
@vbnrh vbnrh changed the title Add hub recovery labels for backing up secrets Bug 2267885: Add hub recovery labels for backing up secrets Mar 6, 2024
Copy link
Contributor

openshift-ci bot commented Mar 6, 2024

@vbnrh: This pull request references Bugzilla bug 2267885, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (ODF 4.15.0) matches configured target release for branch (ODF 4.15.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @keesturam

In response to this:

Bug 2267885: Add hub recovery labels for backing up secrets

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
Contributor

openshift-ci bot commented Mar 6, 2024

@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: keesturam.

Note that only red-hat-storage members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@vbnrh: This pull request references Bugzilla bug 2267885, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (ODF 4.15.0) matches configured target release for branch (ODF 4.15.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @keesturam

In response to this:

Bug 2267885: Add hub recovery labels for backing up secrets

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.

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.

@@ -97,6 +100,7 @@ func generateBlueSecretForExternal(rookCephMon *corev1.Secret, labelType utils.S
Namespace: managedClusterName,
Labels: map[string]string{
utils.SecretLabelTypeKey: string(labelType),
HubRecoveryLabel: "",
Copy link
Contributor

@GowthamShanmugam GowthamShanmugam Mar 6, 2024

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

The value for the resource is not necessary

Backup secrets and ConfigMaps with one of the following labels: cluster.open-cluster-management.io/type, hive.openshift.io/secret-type, cluster.open-cluster-management.io/backup.

MirrorPeer has it as earlier documentations indicated the value to be a generic resource

Copy link
Member Author

Choose a reason for hiding this comment

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

logger := log.FromContext(ctx, "controller", "MirrorPeerSecret")
logger.Info("Adding backup labels to the secret")
_, err := controllerutil.CreateOrUpdate(ctx, rc, &peerSecret, func() error {
peerSecret.ObjectMeta.Labels[utils.HubRecoveryLabel] = ""
Copy link
Contributor

Choose a reason for hiding this comment

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

@vbnrh vbnrh force-pushed the bz-2267885-backport branch 2 times, most recently from 3cce4f3 to f8fe0ef Compare March 6, 2024 12:35
vbnrh added 2 commits March 6, 2024 18:33
This commit adds label changes for source secrets (blue) and s3 secrets
for hub recovery

Signed-off-by: vbadrina <[email protected]>
Adds label changes to managedcluster agent where they will
add hub recovery label by default onto any source secret

Signed-off-by: vbadrina <[email protected]>
@vbnrh vbnrh force-pushed the bz-2267885-backport branch from f8fe0ef to 069ed23 Compare March 6, 2024 13:05
Copy link
Contributor

openshift-ci bot commented Mar 6, 2024

@GowthamShanmugam: changing LGTM is restricted to collaborators

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.

Copy link
Contributor

openshift-ci bot commented Mar 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: GowthamShanmugam, vbnrh

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

@GowthamShanmugam
Copy link
Contributor

/LGTM

Copy link
Contributor

openshift-ci bot commented Mar 6, 2024

@GowthamShanmugam: changing LGTM is restricted to collaborators

In response to this:

/LGTM

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.

@openshift-merge-bot openshift-merge-bot bot merged commit 046d749 into red-hat-storage:release-4.15 Mar 6, 2024
11 checks passed
Copy link
Contributor

openshift-ci bot commented Mar 6, 2024

@vbnrh: All pull requests linked via external trackers have merged:

Bugzilla bug 2267885 has been moved to the MODIFIED state.

In response to this:

Bug 2267885: Add hub recovery labels for backing up secrets

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.

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.

4 participants