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
{{ message }}
This repository was archived by the owner on Apr 17, 2025. It is now read-only.
Hi,
As with all other Kubernetes resources, I was expecting to see defined labels on the created subnamespaces too.
Take following manifest for example:
apiVersion: hnc.x-k8s.io/v1alpha2
kind: SubnamespaceAnchor
metadata:
name: app3
namespace: hnc-child1
labels: # these are the labels on the anchor itself, not the child namespace
name: app3
env: hnc-child1
You should use this:
apiVersion: hnc.x-k8s.io/v1alpha2
kind: SubnamespaceAnchor
metadata:
name: app3
namespace: hnc-child1
spec:
labels: # these are the labels that will be created on the child namespace, not the anchor
name: app3
env: hnc-child1
That is: the anchor spec defines which labels should appear on the newly created namespace. The anchor can have its own labels and annotations, which are separate from those that appear on the subnamespace. This is the same as the template in a Deployment (i.e. here). Does that make sense?
Hi,
As with all other Kubernetes resources, I was expecting to see defined labels on the created subnamespaces too.
Take following manifest for example:
Checking the created namespace:
kubectl describe ns app3
It shows me this:
The label is missing.
Labels are an important component in controlling access and managing resources.
Would it be possible to add handling these?
The text was updated successfully, but these errors were encountered: