AppConnector defines a Tailscale app connector node configured via Connector.
_Appears in:_
- [ConnectorSpec](#connectorspec)
| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `routes`_[Routes](#routes)_ | Routes are optional preconfigured routes for the domains routed via the app connector.<br/>If not set, routes for the domains will be discovered dynamically.<br/>If set, the app connector will immediately be able to route traffic using the preconfigured routes, but may<br/>also dynamically discover other routes.<br/>https://tailscale.com/kb/1332/apps-best-practices#preconfiguration | | Format: cidr <br/>MinItems: 1 <br/>Type: string <br/> |
#### Connector
#### Connector
@ -86,8 +102,9 @@ _Appears in:_
| `tags`_[Tags](#tags)_ | Tags that the Tailscale node will be tagged with.<br/>Defaults to [tag:k8s].<br/>To autoapprove the subnet routes or exit node defined by a Connector,<br/>you can configure Tailscale ACLs to give these tags the necessary<br/>permissions.<br/>See https://tailscale.com/kb/1337/acl-syntax#autoapprovers.<br/>If you specify custom tags here, you must also make the operator an owner of these tags.<br/>See https://tailscale.com/kb/1236/kubernetes-operator/#setting-up-the-kubernetes-operator.<br/>Tags cannot be changed once a Connector node has been created.<br/>Tag values must be in form ^tag:[a-zA-Z][a-zA-Z0-9-]*$. | | Pattern: `^tag:[a-zA-Z][a-zA-Z0-9-]*$`<br/>Type: string <br/> |
| `tags`_[Tags](#tags)_ | Tags that the Tailscale node will be tagged with.<br/>Defaults to [tag:k8s].<br/>To autoapprove the subnet routes or exit node defined by a Connector,<br/>you can configure Tailscale ACLs to give these tags the necessary<br/>permissions.<br/>See https://tailscale.com/kb/1337/acl-syntax#autoapprovers.<br/>If you specify custom tags here, you must also make the operator an owner of these tags.<br/>See https://tailscale.com/kb/1236/kubernetes-operator/#setting-up-the-kubernetes-operator.<br/>Tags cannot be changed once a Connector node has been created.<br/>Tag values must be in form ^tag:[a-zA-Z][a-zA-Z0-9-]*$. | | Pattern: `^tag:[a-zA-Z][a-zA-Z0-9-]*$`<br/>Type: string <br/> |
| `hostname`_[Hostname](#hostname)_ | Hostname is the tailnet hostname that should be assigned to the<br/>Connector node. If unset, hostname defaults to <connector<br/>name>-connector. Hostname can contain lower case letters, numbers and<br/>dashes, it must not start or end with a dash and must be between 2<br/>and 63 characters long. | | Pattern: `^[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$`<br/>Type: string <br/> |
| `hostname`_[Hostname](#hostname)_ | Hostname is the tailnet hostname that should be assigned to the<br/>Connector node. If unset, hostname defaults to <connector<br/>name>-connector. Hostname can contain lower case letters, numbers and<br/>dashes, it must not start or end with a dash and must be between 2<br/>and 63 characters long. | | Pattern: `^[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$`<br/>Type: string <br/> |
| `proxyClass`_string_ | ProxyClass is the name of the ProxyClass custom resource that<br/>contains configuration options that should be applied to the<br/>resources created for this Connector. If unset, the operator will<br/>create resources with the default configuration. | | |
| `proxyClass`_string_ | ProxyClass is the name of the ProxyClass custom resource that<br/>contains configuration options that should be applied to the<br/>resources created for this Connector. If unset, the operator will<br/>create resources with the default configuration. | | |
| `subnetRouter`_[SubnetRouter](#subnetrouter)_ | SubnetRouter defines subnet routes that the Connector node should<br/>expose to tailnet. If unset, none are exposed.<br/>https://tailscale.com/kb/1019/subnets/ | | |
| `subnetRouter`_[SubnetRouter](#subnetrouter)_ | SubnetRouter defines subnet routes that the Connector device should<br/>expose to tailnet as a Tailscale subnet router.<br/>https://tailscale.com/kb/1019/subnets/<br/>If this field is unset, the device does not get configured as a Tailscale subnet router.<br/>This field is mutually exclusive with the appConnector field. | | |
| `exitNode`_boolean_ | ExitNode defines whether the Connector node should act as a<br/>Tailscale exit node. Defaults to false.<br/>https://tailscale.com/kb/1103/exit-nodes | | |
| `appConnector`_[AppConnector](#appconnector)_ | AppConnector defines whether the Connector device should act as a Tailscale app connector. A Connector that is<br/>configured as an app connector cannot be a subnet router or an exit node. If this field is unset, the<br/>Connector does not act as an app connector.<br/>Note that you will need to manually configure the permissions and the domains for the app connector via the<br/>Admin panel.<br/>Note also that the main tested and supported use case of this config option is to deploy an app connector on<br/>Kubernetes to access SaaS applications available on the public internet. Using the app connector to expose<br/>cluster workloads or other internal workloads to tailnet might work, but this is not a use case that we have<br/>tested or optimised for.<br/>If you are using the app connector to access SaaS applications because you need a predictable egress IP that<br/>can be whitelisted, it is also your responsibility to ensure that cluster traffic from the connector flows<br/>via that predictable IP, for example by enforcing that cluster egress traffic is routed via an egress NAT<br/>device with a static IP address.<br/>https://tailscale.com/kb/1281/app-connectors | | |
| `exitNode`_boolean_ | ExitNode defines whether the Connector device should act as a Tailscale exit node. Defaults to false.<br/>This field is mutually exclusive with the appConnector field.<br/>https://tailscale.com/kb/1103/exit-nodes | | |
#### ConnectorStatus
#### ConnectorStatus
@ -106,6 +123,7 @@ _Appears in:_
| `conditions`_[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.3/#condition-v1-meta) array_ | List of status conditions to indicate the status of the Connector.<br/>Known condition types are `ConnectorReady`. | | |
| `conditions`_[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.3/#condition-v1-meta) array_ | List of status conditions to indicate the status of the Connector.<br/>Known condition types are `ConnectorReady`. | | |
| `subnetRoutes`_string_ | SubnetRoutes are the routes currently exposed to tailnet via this<br/>Connector instance. | | |
| `subnetRoutes`_string_ | SubnetRoutes are the routes currently exposed to tailnet via this<br/>Connector instance. | | |
| `isExitNode`_boolean_ | IsExitNode is set to true if the Connector acts as an exit node. | | |
| `isExitNode`_boolean_ | IsExitNode is set to true if the Connector acts as an exit node. | | |
| `isAppConnector`_boolean_ | IsAppConnector is set to true if the Connector acts as an app connector. | | |
| `tailnetIPs`_string array_ | TailnetIPs is the set of tailnet IP addresses (both IPv4 and IPv6)<br/>assigned to the Connector node. | | |
| `tailnetIPs`_string array_ | TailnetIPs is the set of tailnet IP addresses (both IPv4 and IPv6)<br/>assigned to the Connector node. | | |
| `hostname`_string_ | Hostname is the fully qualified domain name of the Connector node.<br/>If MagicDNS is enabled in your tailnet, it is the MagicDNS name of the<br/>node. | | |
| `hostname`_string_ | Hostname is the fully qualified domain name of the Connector node.<br/>If MagicDNS is enabled in your tailnet, it is the MagicDNS name of the<br/>node. | | |
// +kubebuilder:printcolumn:name="SubnetRoutes",type="string",JSONPath=`.status.subnetRoutes`,description="CIDR ranges exposed to tailnet by a subnet router defined via this Connector instance."
// +kubebuilder:printcolumn:name="SubnetRoutes",type="string",JSONPath=`.status.subnetRoutes`,description="CIDR ranges exposed to tailnet by a subnet router defined via this Connector instance."
// +kubebuilder:printcolumn:name="IsExitNode",type="string",JSONPath=`.status.isExitNode`,description="Whether this Connector instance defines an exit node."
// +kubebuilder:printcolumn:name="IsExitNode",type="string",JSONPath=`.status.isExitNode`,description="Whether this Connector instance defines an exit node."
// +kubebuilder:printcolumn:name="IsAppConnector",type="string",JSONPath=`.status.isAppConnector`,description="Whether this Connector instance is an app connector."
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.conditions[?(@.type == "ConnectorReady")].reason`,description="Status of the deployed Connector resources."
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.conditions[?(@.type == "ConnectorReady")].reason`,description="Status of the deployed Connector resources."
// Connector defines a Tailscale node that will be deployed in the cluster. The
// Connector defines a Tailscale node that will be deployed in the cluster. The
@ -55,7 +56,8 @@ type ConnectorList struct {
}
}
// ConnectorSpec describes a Tailscale node to be deployed in the cluster.
// ConnectorSpec describes a Tailscale node to be deployed in the cluster.
// +kubebuilder:validation:XValidation:rule="has(self.subnetRouter) || self.exitNode == true",message="A Connector needs to be either an exit node or a subnet router, or both."
// +kubebuilder:validation:XValidation: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."
// +kubebuilder:validation:XValidation: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."
typeConnectorSpecstruct{
typeConnectorSpecstruct{
// Tags that the Tailscale node will be tagged with.
// Tags that the Tailscale node will be tagged with.
// Defaults to [tag:k8s].
// Defaults to [tag:k8s].
@ -82,13 +84,31 @@ type ConnectorSpec struct {
// create resources with the default configuration.
// create resources with the default configuration.
// +optional
// +optional
ProxyClassstring`json:"proxyClass,omitempty"`
ProxyClassstring`json:"proxyClass,omitempty"`
// SubnetRouter defines subnet routes that the Connector node should
// SubnetRouter defines subnet routes that the Connector device should
// expose to tailnet. If unset, none are exposed.
// expose to tailnet as a Tailscale subnet router.
// https://tailscale.com/kb/1019/subnets/
// https://tailscale.com/kb/1019/subnets/
// 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.