-
Notifications
You must be signed in to change notification settings - Fork 690
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
Apply standard application labels to Contour deployments #1821
Comments
This adds standard application labels to the contour deployment file. It adds the label at file generation. To edit yaml yq is used (https://github.com/mikefarah/yq). Fixes projectcontour#1821 Signed-off-by: Tim Gretler gretler.tim@gmail.com
@tthebst I'd prefer to not take a dependency on yq. Maybe we can whack this with sed? |
@jpeach editing yaml's with CLI is painful. Especially because its labeling is inconsistent across My idea would be to add sth like this to the example files where appropriate.
This would make it very easy to do |
Yeh, in the absence of something like #2088 that's the best we can do I think. |
One thing to try is to set the version to |
@jpeach Thanks for the response. Also, do you think it makes sense to use all standard labels
Or only use a selection. For example only
|
I think that selection makes the most sense, "name" and "version" are the most useful, "part-of" could be a useful, but not so sure about it. |
I like the idea of having Editing the example YAMLs for this purpose is fine. I'd also echo @jpeach and say that it's probably better to set the version to |
I think
A second issue is that CRD and RBAC are generated so I can't edit the file. We would need a different solution for these files or skip them. |
If we had kustomize, we could make it work #2088 |
I think it's okay to skip them to start with and come back later to add the labels either by kustomize, or some other method. |
This adds the standard label app.kubernetes.io/name label to the resources in /examples/contour. Additionally it adds the standard labels app.kubernetes.io/part-of and app.kubernetes.io/version to the contour.yaml during generation. The logic for adding the labels is in hack/generate-deployment.sh and uses the kubernetes CLI. Fixes projectcontour#1821 Signed-off-by: Tim Gretler gretler.tim@gmail.com
New contour.yaml with kubernetes standard labels. Fixes projectcontour#1821 Signed-off-by: Tim Gretler gretler.tim@gmail.com
@jpeach @youngnick So I think the easiest way to label everything is |
@tthebst Does kubectl need a running cluster to label the objects? |
|
When you are looking at Contour deployments in a Kubernetes cluster, it's not always obvious which release you have. When we generate the deployment YAML, we could apply standard application labels such as
app.kubernetes.io/version
to make it more obvious.As a bonus, Octant appears to use these labels for some kind of object grouping.
The text was updated successfully, but these errors were encountered: