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 }}
Repository navigation
FR: K8s Operator: add tailscale.com & custom labels to pod template spec #10854
I'd like to have predictable labels on the spawned Tailscale StatefulSet pods, for use with network policies and other label-matching operations.
How should we solve this?
Supporting both of the below solutions would be ideal, but just one for now is also fine.
Propagating the current tailscale.com StatefulSet labels to the pod template spec so spawned pods also get the labels. This is useful for having network policies that allow traffic based on a specific app, e.g. network policy to allow ingress traffic to Minecraft pods.
I am forced to allow all the Tailscale pods to access all pods that are exposed via Tailscale, e.g. my Minecraft Tailscale pod can access my ingress-nginx pods.
I'd like to make my network policies more specific, to only allow an app's Tailscale pod to access only said app pod and no other pods.
@irbekrm that would help with custom labels indeed, what about propagating the labels currently set on the StatefulSet controller resource onto the pod template spec in the StatefulSet resource itself?
I'd be happy to let the mentioned ProxyClass CRD issue track the pod custom labels FR and change this issue to only track the FR for label propagation from StatefulSet resource to pods.
We are planning to eventually add more customization options to ProxyClass.
Feedback on whether it fits your workflow + what other fields you might need to configure (and why) is very welcome.
Activity
irbekrm commentedon Jan 15, 2024
Thanks @JJGadgets .
We are planning to implement a proxy configuration mechanism #10709 - that will also allow you to configure custom labels.
JJGadgets commentedon Jan 15, 2024
@irbekrm that would help with custom labels indeed, what about propagating the labels currently set on the StatefulSet controller resource onto the pod template spec in the StatefulSet resource itself?
I'd be happy to let the mentioned ProxyClass CRD issue track the pod custom labels FR and change this issue to only track the FR for label propagation from StatefulSet resource to pods.
irbekrm commentedon Jan 15, 2024
Sounds good- I don't see a reason to not do that especially given that it helps with configuring network policies.
cmd/k8s-operator: sync StatefulSet labels to their Pods
cmd/k8s-operator: sync StatefulSet labels to their Pods
cmd/k8s-operator: sync StatefulSet labels to their Pods (#10861)
irbekrm commentedon Jan 16, 2024
#10861 added syncing of Statefulset labels to Pods.
unstable-v1.57.90tailscale/k8s-operatorimage tag/1.57.90Helm chart from tailscale dev Helm repository contains this change.cmd/k8s-operator: sync StatefulSet labels to their Pods (tailscale#10861
irbekrm commentedon Feb 23, 2024
Custom user-defined labels and other customization can now (
v1.60) be applied via aProxyClasscustom resource https://tailscale.com/kb/1236/kubernetes-operator#cluster-resource-customization-using-proxyclass-custom-resource.We are planning to eventually add more customization options to
ProxyClass.Feedback on whether it fits your workflow + what other fields you might need to configure (and why) is very welcome.
irbekrm commentedon Apr 5, 2024
Closing as this has been implemented (see above comment)
cmd/k8s-operator: sync StatefulSet labels to their Pods (tailscale#10861