Comment 0 for bug 1949103

Revision history for this message
Dominik Fleischmann (dominik.f) wrote :

There are several cases where juju is not labeling Kubernetes Resources that are created by a charm:

1. Resources that are deployed by workloads that are deployed from charms. For Example, the Jupyter Notebook Controller is deployed through charms will deploy Notebook Servers in different namespaces which will not contain juju labels.

#Bootstrapped on microk8s with storage DNS, ingress and metallb:10.64.140.43-10.64.140.49 enabled

# Deploy the kubeflow-lite bundle following these instructions: https://charmed-kubeflow.io/docs/install

# Create a Notebook Server like described in the "Creating a Kubeflow Notebook" section here: https://charmed-kubeflow.io/docs/kubeflow-basics

# Check labels of the "test" notebook server pod:
microk8s kubectl -n admin get pod/test-0 -o yaml

2. When creating resources through kubectl or istioctl. This is a pattern used in the istio sidecar charm. It does not happen when creating resources through a python library like lightkube. This can be reproduced the following way:

# Bootstrapped on microk8s with storage DNS and ingress enabled

juju deploy ch:istio-gateway istio-ingressgateway-operator --config=kind=ingress --trust
juju deploy istio-pilot --trust
juju relate istio-pilot istio-ingressgateway-operator

# Describing the istio-ingressgateway pod (not the one for pebble) it will not have any labels.
microk8s kubectl -n istio get pod/istio-ingressgateway -o yaml