Skip to content

FR: Kubernetes operator: proxy configuration mechanism #10709

Closed

Description

@irbekrm

What are you trying to do?

Currently users have no way how to configure ingress/egress proxies created via the Tailscale Kubernetes operator (i.e to provide a custom pod security context, topology spread constraints and other values that might be required to meet their security policies, work with their cluster topology etc.

For context see #9062

How should we solve this?

One way how to solve this would be to define a new ProxyClass custom resource that would allow users to specify proxy config (pod security context, labels, annotations etc for proxy deployments). Users could then refer to an instance of ProxyClass via a Service/Ingress annotation.

apiVersion: tailscale.io/v1alpha1
kind: ProxyClass
metadata:
  name: prod
spec:
  ...
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: tailscale-gateway
  annotations:
    tailscale.com/proxy-class: prod
...
spec:
...
  ingressClassName: tailscale

What is the impact of not solving this?

  • proxies are not usable in production environments with specific requirements for i.e security context, labels, annotations etc
  • we end up adding more and more annotations to accommodate configuration knobs which is not great from usability perspective (hard to discover)

Anything else?

Questions:

  • unstructured yaml only vs some predefined tested and validated fields + an option to also provide unstructured yaml?
  • validation for unstructured yaml? (i.e check that replicas are not set to more than 1)
  • precedence for fields that can currently be configured via env vars or annotations (i.e proxy image, env vars for containerboot pod)?
  • do we want to embed the whole upstream Pod spec? (if we make a custom resource this might become problematic as it will make the custom resource huge and if we have multiple CRD versions, we might run into issues
  • do we allow configuring proxy namespace? (this would change our deployment model)

Activity

  1. added
    L4 Most users
    P3 Can't get started
    T0 New feature
    fr
    on Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    L4 Most usersP3 Can't get startedT0 New featurefrkubernetes

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions