k8s-deploy icon indicating copy to clipboard operation
k8s-deploy copied to clipboard

Feature Request: Switch to disable all annotations / labeling

Open vitaly-pavluk opened this issue 3 years ago • 4 comments

Feature request

As a DevOps engineer working on the CI/CD GH workflow, I want to disable all annotations and labeling that K8s-Deploy GH action does, so they will not pollute K8s namespaces, deployments, pods, etc. Now K8s-Deploy allows only disabling the namespace annotation but there is no way to disable pod labeling that does not work correctly.

Reason for turning off auto-annotations - I have a team-wide strategy for them so the GH action just pollutes K9s resources with labels and annotations that are not useful for my K8s resources. NOTE: There is a bug in K8s-Deploy GH action that does not properly sanitize the workflow name before using it as in the POD/Service/Deployment label. E.g. my GitHub workflow name is "Build & Deploy Web Api" when K8s-Deploy calls kubectl to label all resources listed in the file it uses the following command kubectl label -f /tmp/baked-template-12345.yaml workflowFriendlyName=Build_&_Deploy_Web_Api so the label Build_&_Deploy_Web_Api contains invalid symbol & that is not allowed by K8s Kubenetes - Label Syntax and character set

vitaly-pavluk avatar Sep 22 '22 17:09 vitaly-pavluk

Will look into it. Thanks!

OliverMKing avatar Sep 28 '22 18:09 OliverMKing

@vitaly-pavluk what version of this action are you running? v4.4 should remove the &.

OliverMKing avatar Oct 03 '22 17:10 OliverMKing

@OliverMKing I've used version azure/[email protected] per the first example I've seen on the GH Basic deployment (without any deployment strategy)
If version 3.1 is not supported or has flaws so the examples should be updated accordingly to avoid confusion

vitaly-pavluk avatar Oct 04 '22 09:10 vitaly-pavluk

This issue is idle because it has been open for 14 days with no activity.

github-actions[bot] avatar Oct 18 '22 12:10 github-actions[bot]

Is it enough for the team to fix the issue?

vitaly-pavluk avatar Oct 21 '22 14:10 vitaly-pavluk

@vitaly-pavluk Have you tried v4 or v4.4? Those contain the fix.

The docs need to be updated to show v4 as the example.

OliverMKing avatar Oct 21 '22 18:10 OliverMKing

@OliverMKing No, I didn't try 4th version but changed the name of the workflow so it does not have unsupported chars. I explicitly mentioned v3 of the GH action as those that has an issue. If 3rd version is not supported anymore, please just close this issue and update docs to use only v4.4. Thank you.

vitaly-pavluk avatar Oct 24 '22 09:10 vitaly-pavluk

This issue is idle because it has been open for 14 days with no activity.

github-actions[bot] avatar Nov 07 '22 12:11 github-actions[bot]

I have fixed the docs :).

OliverMKing avatar Dec 06 '22 14:12 OliverMKing