Open landism opened 2 years ago
At the moment, certain resources fall into uncategorized
label even though they are related (just not by Kubernetes labels)
Our usage case:
We have a KeyCloak helm chart deployed with name: {{ .Release.Name }}-keycloak
.
We expect that the Tilt resource for keycloak (i.e. my-release-keycloak
) would contain all Kubernetes objects with the same name, but only few get categorized for keycloak and the rest end up in uncategorized
.
# 1 Tilt Resource Containing all Kubernetes Resources
# with name "my-helm-release-keycloak"
[my-helm-release-keycloak]
my-helm-release-keycloak-headless:service
my-helm-release-keycloak:service
my-helm-release-keycloak:statefulset
my-helm-release-keycloak:serviceaccount
my-helm-release-keycloak-env-vars:configmap
my-helm-release-keycloak:secret
my-helm-release-keycloak-tls-passwords:secret
my-helm-release-keycloak:poddisruptionbudget
my-helm-release-keycloak:networkpolicy
my-helm-release-keycloak:horizontalpodautoscaler
my-helm-release-keycloak:certificate
my-helm-release-keycloak:destinationrule
my-helm-release-keycloak:virtualservice
[uncategorized]
...
# No keycloak resources
# 1 Tilt Resource Containing some Kubernetes Resources
# with name my-helm-release-keycloak linked via label selectors
[my-helm-release-keycloak]
my-helm-release-keycloak-headless:service
my-helm-release-keycloak:service
my-helm-release-keycloak:statefulset
# All other Kubernetes Resources lumped into uncategorized
[uncategorized]
my-helm-release-keycloak:serviceaccount
my-helm-release-keycloak-env-vars:configmap
my-helm-release-keycloak:secret
my-helm-release-keycloak-tls-passwords:secret
my-helm-release-keycloak:poddisruptionbudget
my-helm-release-keycloak:networkpolicy
my-helm-release-keycloak:horizontalpodautoscaler
my-helm-release-keycloak:certificate
my-helm-release-keycloak:destinationrule
my-helm-release-keycloak:virtualservice
...
This gets messy very fast when using multiple Helm Charts. Most Kubernetes resources just end up in uncategorized
. It is defeating the purpose of nice resource labelling.
Describe the Feature You Want
A way to put the "uncategorized" resource into a group e.g.,
k8s_resource('uncategorized', labels=['mygroup'])
(which might also allow other configuration on the uncategorized resource, e.g. trigger_mode)Current Behavior
The best alternative is to make a new resource and pull all uncategorized objects into it, e.g.:
k8s_resource(new_name='other', labels=['mygroup'], objects=['secrets:Service:default', 'servantes-stuff:Secret:default'])
Why Do You Want This?