2023-12-14 13:51:59 +00:00
|
|
|
apiVersion: apiextensions.k8s.io/v1
|
|
|
|
kind: CustomResourceDefinition
|
|
|
|
metadata:
|
|
|
|
annotations:
|
2024-06-18 18:01:40 +00:00
|
|
|
controller-gen.kubebuilder.io/version: v0.15.1-0.20240618033008-7824932b0cab
|
2023-12-14 13:51:59 +00:00
|
|
|
name: connectors.tailscale.com
|
|
|
|
spec:
|
|
|
|
group: tailscale.com
|
|
|
|
names:
|
|
|
|
kind: Connector
|
|
|
|
listKind: ConnectorList
|
|
|
|
plural: connectors
|
|
|
|
shortNames:
|
|
|
|
- cn
|
|
|
|
singular: connector
|
|
|
|
scope: Cluster
|
|
|
|
versions:
|
|
|
|
- additionalPrinterColumns:
|
2024-01-09 14:13:22 +00:00
|
|
|
- description: CIDR ranges exposed to tailnet by a subnet router defined via this Connector instance.
|
|
|
|
jsonPath: .status.subnetRoutes
|
2023-12-14 13:51:59 +00:00
|
|
|
name: SubnetRoutes
|
|
|
|
type: string
|
2024-01-09 14:13:22 +00:00
|
|
|
- description: Whether this Connector instance defines an exit node.
|
|
|
|
jsonPath: .status.isExitNode
|
|
|
|
name: IsExitNode
|
|
|
|
type: string
|
2024-11-11 11:43:54 +00:00
|
|
|
- description: Whether this Connector instance is an app connector.
|
|
|
|
jsonPath: .status.isAppConnector
|
|
|
|
name: IsAppConnector
|
|
|
|
type: string
|
2024-01-09 14:13:22 +00:00
|
|
|
- description: Status of the deployed Connector resources.
|
2023-12-14 13:51:59 +00:00
|
|
|
jsonPath: .status.conditions[?(@.type == "ConnectorReady")].reason
|
|
|
|
name: Status
|
|
|
|
type: string
|
|
|
|
name: v1alpha1
|
|
|
|
schema:
|
|
|
|
openAPIV3Schema:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
|
|
|
Connector defines a Tailscale node that will be deployed in the cluster. The
|
|
|
|
node can be configured to act as a Tailscale subnet router and/or a Tailscale
|
|
|
|
exit node.
|
|
|
|
Connector is a cluster-scoped resource.
|
|
|
|
More info:
|
2024-09-25 21:15:42 +00:00
|
|
|
https://tailscale.com/kb/1441/kubernetes-operator-connector
|
2023-12-14 13:51:59 +00:00
|
|
|
type: object
|
|
|
|
required:
|
|
|
|
- spec
|
|
|
|
properties:
|
|
|
|
apiVersion:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
|
|
|
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
|
2023-12-14 13:51:59 +00:00
|
|
|
type: string
|
|
|
|
kind:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
|
|
|
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
|
2023-12-14 13:51:59 +00:00
|
|
|
type: string
|
|
|
|
metadata:
|
|
|
|
type: object
|
|
|
|
spec:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
|
|
|
ConnectorSpec describes the desired Tailscale component.
|
|
|
|
More info:
|
|
|
|
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
2023-12-14 13:51:59 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
2024-11-11 11:43:54 +00:00
|
|
|
appConnector:
|
|
|
|
description: |-
|
|
|
|
AppConnector defines whether the Connector device should act as a Tailscale app connector. A Connector that is
|
|
|
|
configured as an app connector cannot be a subnet router or an exit node. If this field is unset, the
|
|
|
|
Connector does not act as an app connector.
|
|
|
|
Note that you will need to manually configure the permissions and the domains for the app connector via the
|
|
|
|
Admin panel.
|
|
|
|
Note also that the main tested and supported use case of this config option is to deploy an app connector on
|
|
|
|
Kubernetes to access SaaS applications available on the public internet. Using the app connector to expose
|
|
|
|
cluster workloads or other internal workloads to tailnet might work, but this is not a use case that we have
|
|
|
|
tested or optimised for.
|
|
|
|
If you are using the app connector to access SaaS applications because you need a predictable egress IP that
|
|
|
|
can be whitelisted, it is also your responsibility to ensure that cluster traffic from the connector flows
|
|
|
|
via that predictable IP, for example by enforcing that cluster egress traffic is routed via an egress NAT
|
|
|
|
device with a static IP address.
|
|
|
|
https://tailscale.com/kb/1281/app-connectors
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
routes:
|
|
|
|
description: |-
|
|
|
|
Routes are optional preconfigured routes for the domains routed via the app connector.
|
|
|
|
If not set, routes for the domains will be discovered dynamically.
|
|
|
|
If set, the app connector will immediately be able to route traffic using the preconfigured routes, but may
|
|
|
|
also dynamically discover other routes.
|
|
|
|
https://tailscale.com/kb/1332/apps-best-practices#preconfiguration
|
|
|
|
type: array
|
|
|
|
minItems: 1
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
format: cidr
|
2024-01-09 14:13:22 +00:00
|
|
|
exitNode:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
2024-11-11 11:43:54 +00:00
|
|
|
ExitNode defines whether the Connector device should act as a Tailscale exit node. Defaults to false.
|
|
|
|
This field is mutually exclusive with the appConnector field.
|
2024-06-18 18:01:40 +00:00
|
|
|
https://tailscale.com/kb/1103/exit-nodes
|
2024-01-09 14:13:22 +00:00
|
|
|
type: boolean
|
|
|
|
hostname:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
|
|
|
Hostname is the tailnet hostname that should be assigned to the
|
|
|
|
Connector node. If unset, hostname defaults to <connector
|
|
|
|
name>-connector. Hostname can contain lower case letters, numbers and
|
|
|
|
dashes, it must not start or end with a dash and must be between 2
|
|
|
|
and 63 characters long.
|
2024-01-09 14:13:22 +00:00
|
|
|
type: string
|
|
|
|
pattern: ^[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$
|
2024-02-13 05:27:54 +00:00
|
|
|
proxyClass:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
|
|
|
ProxyClass is the name of the ProxyClass custom resource that
|
|
|
|
contains configuration options that should be applied to the
|
|
|
|
resources created for this Connector. If unset, the operator will
|
|
|
|
create resources with the default configuration.
|
2024-02-13 05:27:54 +00:00
|
|
|
type: string
|
2023-12-14 13:51:59 +00:00
|
|
|
subnetRouter:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
2024-11-11 11:43:54 +00:00
|
|
|
SubnetRouter defines subnet routes that the Connector device should
|
|
|
|
expose to tailnet as a Tailscale subnet router.
|
2024-06-18 18:01:40 +00:00
|
|
|
https://tailscale.com/kb/1019/subnets/
|
2024-11-11 11:43:54 +00:00
|
|
|
If this field is unset, the device does not get configured as a Tailscale subnet router.
|
|
|
|
This field is mutually exclusive with the appConnector field.
|
2023-12-14 13:51:59 +00:00
|
|
|
type: object
|
|
|
|
required:
|
2024-01-09 14:13:22 +00:00
|
|
|
- advertiseRoutes
|
2023-12-14 13:51:59 +00:00
|
|
|
properties:
|
2024-01-09 14:13:22 +00:00
|
|
|
advertiseRoutes:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
|
|
|
AdvertiseRoutes refer to CIDRs that the subnet router should make
|
|
|
|
available. Route values must be strings that represent a valid IPv4
|
|
|
|
or IPv6 CIDR range. Values can be Tailscale 4via6 subnet routes.
|
|
|
|
https://tailscale.com/kb/1201/4via6-subnets/
|
2023-12-14 13:51:59 +00:00
|
|
|
type: array
|
2024-01-09 14:13:22 +00:00
|
|
|
minItems: 1
|
2023-12-14 13:51:59 +00:00
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
format: cidr
|
2024-01-09 14:13:22 +00:00
|
|
|
tags:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
|
|
|
Tags that the Tailscale node will be tagged with.
|
|
|
|
Defaults to [tag:k8s].
|
|
|
|
To autoapprove the subnet routes or exit node defined by a Connector,
|
|
|
|
you can configure Tailscale ACLs to give these tags the necessary
|
|
|
|
permissions.
|
2024-09-25 21:15:42 +00:00
|
|
|
See https://tailscale.com/kb/1337/acl-syntax#autoapprovers.
|
2024-06-18 18:01:40 +00:00
|
|
|
If you specify custom tags here, you must also make the operator an owner of these tags.
|
|
|
|
See https://tailscale.com/kb/1236/kubernetes-operator/#setting-up-the-kubernetes-operator.
|
|
|
|
Tags cannot be changed once a Connector node has been created.
|
|
|
|
Tag values must be in form ^tag:[a-zA-Z][a-zA-Z0-9-]*$.
|
2024-01-09 14:13:22 +00:00
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: string
|
|
|
|
pattern: ^tag:[a-zA-Z][a-zA-Z0-9-]*$
|
|
|
|
x-kubernetes-validations:
|
2024-11-11 11:43:54 +00:00
|
|
|
- rule: has(self.subnetRouter) || (has(self.exitNode) && self.exitNode == true) || has(self.appConnector)
|
|
|
|
message: A Connector needs to have at least one of exit node, subnet router or app connector configured.
|
|
|
|
- rule: '!((has(self.subnetRouter) || (has(self.exitNode) && self.exitNode == true)) && has(self.appConnector))'
|
|
|
|
message: The appConnector field is mutually exclusive with exitNode and subnetRouter fields.
|
2023-12-14 13:51:59 +00:00
|
|
|
status:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
|
|
|
ConnectorStatus describes the status of the Connector. This is set
|
|
|
|
and managed by the Tailscale operator.
|
2023-12-14 13:51:59 +00:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
conditions:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
|
|
|
List of status conditions to indicate the status of the Connector.
|
|
|
|
Known condition types are `ConnectorReady`.
|
2023-12-14 13:51:59 +00:00
|
|
|
type: array
|
|
|
|
items:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: Condition contains details for one aspect of the current state of this API Resource.
|
2023-12-14 13:51:59 +00:00
|
|
|
type: object
|
|
|
|
required:
|
2024-06-18 18:01:40 +00:00
|
|
|
- lastTransitionTime
|
|
|
|
- message
|
|
|
|
- reason
|
2023-12-14 13:51:59 +00:00
|
|
|
- status
|
|
|
|
- type
|
|
|
|
properties:
|
|
|
|
lastTransitionTime:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
|
|
|
lastTransitionTime is the last time the condition transitioned from one status to another.
|
|
|
|
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
2023-12-14 13:51:59 +00:00
|
|
|
type: string
|
|
|
|
format: date-time
|
|
|
|
message:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
|
|
|
message is a human readable message indicating details about the transition.
|
|
|
|
This may be an empty string.
|
2023-12-14 13:51:59 +00:00
|
|
|
type: string
|
2024-06-18 18:01:40 +00:00
|
|
|
maxLength: 32768
|
2023-12-14 13:51:59 +00:00
|
|
|
observedGeneration:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
|
|
|
observedGeneration represents the .metadata.generation that the condition was set based upon.
|
|
|
|
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
|
|
|
with respect to the current state of the instance.
|
2023-12-14 13:51:59 +00:00
|
|
|
type: integer
|
|
|
|
format: int64
|
2024-06-18 18:01:40 +00:00
|
|
|
minimum: 0
|
2023-12-14 13:51:59 +00:00
|
|
|
reason:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
|
|
|
reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
|
|
|
Producers of specific condition types may define expected values and meanings for this field,
|
|
|
|
and whether the values are considered a guaranteed API.
|
|
|
|
The value should be a CamelCase string.
|
|
|
|
This field may not be empty.
|
2023-12-14 13:51:59 +00:00
|
|
|
type: string
|
2024-06-18 18:01:40 +00:00
|
|
|
maxLength: 1024
|
|
|
|
minLength: 1
|
|
|
|
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
2023-12-14 13:51:59 +00:00
|
|
|
status:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: status of the condition, one of True, False, Unknown.
|
2023-12-14 13:51:59 +00:00
|
|
|
type: string
|
2024-06-18 18:01:40 +00:00
|
|
|
enum:
|
|
|
|
- "True"
|
|
|
|
- "False"
|
|
|
|
- Unknown
|
2023-12-14 13:51:59 +00:00
|
|
|
type:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: type of condition in CamelCase or in foo.example.com/CamelCase.
|
2023-12-14 13:51:59 +00:00
|
|
|
type: string
|
2024-06-18 18:01:40 +00:00
|
|
|
maxLength: 316
|
|
|
|
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
2023-12-14 13:51:59 +00:00
|
|
|
x-kubernetes-list-map-keys:
|
|
|
|
- type
|
|
|
|
x-kubernetes-list-type: map
|
2024-06-07 16:22:19 +00:00
|
|
|
hostname:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
|
|
|
Hostname is the fully qualified domain name of the Connector node.
|
|
|
|
If MagicDNS is enabled in your tailnet, it is the MagicDNS name of the
|
|
|
|
node.
|
2024-06-07 16:22:19 +00:00
|
|
|
type: string
|
2024-11-11 11:43:54 +00:00
|
|
|
isAppConnector:
|
|
|
|
description: IsAppConnector is set to true if the Connector acts as an app connector.
|
|
|
|
type: boolean
|
2024-01-09 14:13:22 +00:00
|
|
|
isExitNode:
|
|
|
|
description: IsExitNode is set to true if the Connector acts as an exit node.
|
|
|
|
type: boolean
|
|
|
|
subnetRoutes:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
|
|
|
SubnetRoutes are the routes currently exposed to tailnet via this
|
|
|
|
Connector instance.
|
2024-01-09 14:13:22 +00:00
|
|
|
type: string
|
2024-06-07 16:22:19 +00:00
|
|
|
tailnetIPs:
|
2024-06-18 18:01:40 +00:00
|
|
|
description: |-
|
|
|
|
TailnetIPs is the set of tailnet IP addresses (both IPv4 and IPv6)
|
|
|
|
assigned to the Connector node.
|
2024-06-07 16:22:19 +00:00
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
type: string
|
2023-12-14 13:51:59 +00:00
|
|
|
served: true
|
|
|
|
storage: true
|
|
|
|
subresources:
|
|
|
|
status: {}
|