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

WIP : Add tkc cluster annotation on Supervisor PVC objects #3071

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chethanv28
Copy link
Collaborator

What this PR does / why we need it:
This PR adds an identifier on Supervisor PVCs to indicate, which TKC the volume belongs to. By adding this annotations, users can identify PVCs that are not associated with any TKC in the namespace but originally requested from TKC cluster. Therefore, this helps in cleaning up orphan PVCs in Supervisor

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Testing done:

[ ~ ]# kubectl describe pvc -A
Name:          test-pvc
Namespace:     test-gc-e2e-demo-ns
StorageClass:  gc-storage-profile
Status:        Bound
Volume:        pvc-6cab0c46-bdb4-46f0-bed0-c6b5c22b31ac
Annotations:
               csi.vsphere.tanzu-kubernetes-cluster-1: 81bd571b-5ba8-48ec-bd70-bc7a5f74653

Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      100Mi
Access Modes:  RWO
VolumeMode:    Filesystem
Used By:       <none>
Events:        <none>


Name:          test-pvc-1
Namespace:     test-gc-e2e-demo-ns
StorageClass:  gc-storage-profile
Status:        Bound
Volume:        pvc-81e98c65-335b-4a05-ac94-234ff4a6dabe
Annotations:
               csi.vsphere.tanzu-kubernetes-cluster-1: 81bd571b-5ba8-48ec-bd70-bc7a5f74653
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      100Mi
Access Modes:  RWO
VolumeMode:    Filesystem
Used By:       <none>
Events:        <none>
kubectl get pvc -n test-gc-e2e-demo-ns -o=jsonpath='{.items[?(@.metadata.annotations.csi\.vsphere\.tanzu-kubernetes-cluster-1-test1=="81bd571b-5ba8-48ec-bd70-bc7a5f74653")].metadata.name}'
test-pvc
test-pvc-1

Release note:

Add tkc cluster annotation on Supervisor PVC objects

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 27, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chethanv28

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

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 27, 2024
@chethanv28 chethanv28 force-pushed the topic/chethanv28/add-tkc-annotations branch 5 times, most recently from d971931 to 2a3670b Compare September 30, 2024 18:55
@chethanv28 chethanv28 force-pushed the topic/chethanv28/add-tkc-annotations branch from 2a3670b to 0b6d80b Compare September 30, 2024 19:01
@svcbot-qecnsdp
Copy link

Started GC block pre-checkin pipeline... Build Number: 1005

@svcbot-qecnsdp
Copy link

Build ID: 1005
GC build status: FAILURE 
Stage before exit: checkout 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants