You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running e.g. microk8s enable ingress
13 resources will be added to the cluster. Trying to track down these resources is cumbersome, and would be a lot easier with label app.kubernetes.io/part-of, e.g.:
When using Flux and adding e.g. cloudnative-pg, some ingress resources need to be patched in order to expose Postgres. This is usually done with Kustomize. This is only possible (as far as I know) when having all YAML-files for e.g. ingress in the Flux infra-repo.
Can be solved like this in utils.sh, but this solution requires yq (I find jq below /snap/microk8s/current/user/bin/, but not yq).
# extract the part-of label value
local part_of_label=${manifest%%/*}
# insert label app.kubernetes.io/part-of for all resources
yq eval ".metadata.labels[\"app.kubernetes.io/part-of\"] = \"$part_of_label\"" -i "${tmp_manifest}"
Summary
When running e.g.
microk8s enable ingress
13 resources will be added to the cluster. Trying to track down these resources is cumbersome, and would be a lot easier with label
app.kubernetes.io/part-of
, e.g.:Why is this important?
When using Flux and adding e.g. cloudnative-pg, some ingress resources need to be patched in order to expose Postgres. This is usually done with Kustomize. This is only possible (as far as I know) when having all YAML-files for e.g. ingress in the Flux infra-repo.
Can be solved like this in
utils.sh
, but this solution requiresyq
(I findjq
below/snap/microk8s/current/user/bin/
, but notyq
).before this line
I tried to solve this using
sed
, but I couldn't figure out how to handle existing metadata/labels.The text was updated successfully, but these errors were encountered: