feat: stabilize tailscale observability exposure with declarative proxy class
All checks were successful
Deploy Cluster / Terraform (push) Successful in 54s
Deploy Cluster / Ansible (push) Successful in 22m19s

This commit is contained in:
2026-03-04 01:37:00 +00:00
parent 28eaa36ec4
commit 1c39274df7
9 changed files with 148 additions and 59 deletions

View File

@@ -8,6 +8,8 @@ tailscale_oauth_client_secret: ""
tailscale_operator_default_tags:
- "tag:k8s"
tailscale_proxyclass_name: "infra-stable"
tailscale_operator_required: false
tailscale_operator_node_selector:

View File

@@ -157,3 +157,15 @@
{{ tailscale_rollout.stdout | default('') }}
{{ tailscale_deploy.stdout | default('') }}
when: tailscale_rollout.rc != 0
- name: Write Tailscale default ProxyClass manifest
template:
src: proxyclass.yaml.j2
dest: /tmp/tailscale-proxyclass.yaml
mode: "0644"
when: tailscale_operator_ready | default(false) | bool
- name: Apply Tailscale default ProxyClass
command: kubectl apply -f /tmp/tailscale-proxyclass.yaml
changed_when: true
when: tailscale_operator_ready | default(false) | bool

View File

@@ -21,3 +21,4 @@ installCRDs: true
proxyConfig:
defaultTags: "{{ tailscale_operator_default_tags | join(',') }}"
defaultProxyClass: "{{ tailscale_proxyclass_name }}"

View File

@@ -0,0 +1,17 @@
apiVersion: tailscale.com/v1alpha1
kind: ProxyClass
metadata:
name: {{ tailscale_proxyclass_name }}
spec:
statefulSet:
pod:
nodeSelector:
{% for key, value in tailscale_operator_node_selector.items() %}
{{ key }}: "{{ value }}"
{% endfor %}
tolerations:
{% for tol in tailscale_operator_tolerations %}
- key: "{{ tol.key }}"
operator: "{{ tol.operator }}"
effect: "{{ tol.effect }}"
{% endfor %}