Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k8s-operator/apis/v1alpha1: update DNSConfig CRD description #11971

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

irbekrm
Copy link
Contributor

@irbekrm irbekrm commented May 2, 2024

Update the DNSConfig CRD fields to better document how to use the CRD.

irbe@tailscale$ k explain dnsconfig
GROUP:      tailscale.com
KIND:       DNSConfig
VERSION:    v1alpha1

DESCRIPTION:
    DNSConfig can be deployed to cluster to make a subset of Tailscale MagicDNS
    names resolvable by cluster workloads. Use this if: A) you need to refer to
    tailnet services, exposed to cluster via Tailscale Kubernetes operator
    egress proxies by the MagicDNS names of those tailnet services (usually
    because the services run over HTTPS) B) you have exposed a cluster workload
    to the tailnet using Tailscale Ingress and you also want to refer to the
    workload from within the cluster over the Ingress's MagicDNS name (usually
    because you have some callback component that needs to use the same URL as
    that used by a non-cluster client on tailnet). When a DNSConfig is applied
    to a cluster, Tailscale Kubernetes operator will deploy a nameserver for
    ts.net DNS names and automatically populate it with records for any
    Tailscale egress or Ingress proxies deployed to that cluster. Currently you
    must manually update your cluster DNS configuration to add the IP address of
    the deployed nameserver as a ts.net stub nameserver. Instructions for how to
    do it:
    https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/#configuration-of-stub-domain-and-upstream-nameserver-using-coredns
    (for CoreDNS),
    https://cloud.google.com/kubernetes-engine/docs/how-to/kube-dns (for
    kube-dns). Tailscale Kubernetes operator will write the address of a Service
    fronting the nameserver to dsnconfig.status.nameserver.ip. DNSConfig is a
    singleton - you must not create more than one. NB: if you want cluster
    workloads to be able to refer to Tailscale Ingress using its MagicDNS name,
    you must also annotate the Ingress resource with
    tailscale.com/experimental-forward-cluster-traffic-via-ingress annotation to
    ensure that the proxy created for the Ingress listens on its Pod IP address.
    NB: IPv6 only clusters are currently not supported.
    
FIELDS:
  apiVersion    <string>
    APIVersion defines the versioned schema of this representation of an object.
    Servers should convert recognized schemas to the latest internal value, and
    may reject unrecognized values. More info:
    https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

  kind  <string>
    Kind is a string value representing the REST resource this object
    represents. Servers may infer this from the endpoint the client submits
    requests to. Cannot be updated. In CamelCase. More info:
    https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

  metadata      <ObjectMeta>
    Standard object's metadata. More info:
    https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

  spec  <Object> -required-
    Spec describes the desired DNS configuration. More info:
    https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

  status        <Object>
    Status describes the status of the DNSConfig. This is set and managed by the
    Tailscale operator.

Updates #11019

@irbekrm irbekrm requested a review from oxtoacart May 3, 2024 08:34
@irbekrm irbekrm marked this pull request as draft May 3, 2024 10:10
@irbekrm
Copy link
Contributor Author

irbekrm commented May 3, 2024

Converting to draft- this PR adds a description that claims that we default nameserver image and tag if not provided via DNSConfig - actually we are not doing that yet.

…NSConfig description

Also removes hardcoded image repo/tag from example DNSConfig resource
as the operator now knows how to default those.

Updates #11019

Signed-off-by: Irbe Krumina <irbe@tailscale.com>
@irbekrm irbekrm marked this pull request as ready for review May 17, 2024 19:39
@irbekrm
Copy link
Contributor Author

irbekrm commented May 17, 2024

Converting to draft- this PR adds a description that claims that we default nameserver image and tag if not provided via DNSConfig - actually we are not doing that yet.

Marking this as ready for review as the operator now knows how to default the nameserver repo and tag (implemented in #11991)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant