Skip to content

Comments

add replicaset permission to apps group#114

Merged
frostyfan109 merged 5 commits intodevelopfrom
fix/replicaset-perm
Apr 9, 2025
Merged

add replicaset permission to apps group#114
frostyfan109 merged 5 commits intodevelopfrom
fix/replicaset-perm

Conversation

@frostyfan109
Copy link
Contributor

@frostyfan109 frostyfan109 commented Apr 4, 2025

When tearing down a deployment, tycho attempts to wildcard delete all the following resources who have a tycho-guid=<deployment_sid> label attached: deployment, replicaset, pod, persistentvolumeclaim. Pods and deployments already have deletecollection permission under the appstore service account role. However, neither replica sets nor PVCs have a deletecollection permission.

Even when there are no replicasets/PVCs with the associated tycho-guid label, Tycho does a collection delete against the label for each resource, which requires the permission. Since the role lacks delete permission for both of these, it generates a lot of error logs during app termination even if there weren't any resources to delete anyways.

At the very least, we can mitigate the error logs for replicasets here, no harm done. However, I'd like input regarding whether or not we want to allow deletion of PVCs. I'd heavily lean towards no. If so, we should probably comment out the PVC collection delete in tycho (networkpolicy was also commented out at some point) instead of continuing to attempt the delete without permission.

@joshua-seals
Copy link
Collaborator

I trust your judgment on this and agree, I hate lots of logs and it's better to make the pvc deletion at present a manual process

Copy link
Collaborator

@joshua-seals joshua-seals left a comment

Choose a reason for hiding this comment

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

Pending update to the appVersion I approve this

@frostyfan109 frostyfan109 merged commit 37d1b9f into develop Apr 9, 2025
@frostyfan109 frostyfan109 deleted the fix/replicaset-perm branch April 9, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants