mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-21 14:11:56 +00:00
cmd/k8s-operator,k8s-operator: document tailscale.com Custom Resource Definitions better. (#11665)
Updates tailscale/tailscale#10880 Signed-off-by: Irbe Krumina <irbe@tailscale.com>
This commit is contained in:
parent
ca5cb41b43
commit
26f9bbc02b
@ -31,6 +31,7 @@ spec:
|
|||||||
name: v1alpha1
|
name: v1alpha1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
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: https://tailscale.com/kb/1236/kubernetes-operator#deploying-exit-nodes-and-subnet-routers-on-kubernetes-using-connector-custom-resource'
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
- spec
|
- spec
|
||||||
@ -44,7 +45,7 @@ spec:
|
|||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
description: ConnectorSpec describes the desired Tailscale component.
|
description: 'ConnectorSpec describes the desired Tailscale component. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
exitNode:
|
exitNode:
|
||||||
|
@ -21,6 +21,7 @@ spec:
|
|||||||
name: v1alpha1
|
name: v1alpha1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
description: 'ProxyClass describes a set of configuration parameters that can be applied to proxy resources created by the Tailscale Kubernetes operator. To apply a given ProxyClass to resources created for a tailscale Ingress or Service, use tailscale.com/proxy-class=<proxyclass-name> label. To apply a given ProxyClass to resources created for a Connector, use connector.spec.proxyClass field. ProxyClass is a cluster scoped resource. More info: https://tailscale.com/kb/1236/kubernetes-operator#cluster-resource-customization-using-proxyclass-custom-resource.'
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
- spec
|
- spec
|
||||||
@ -34,12 +35,13 @@ spec:
|
|||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
|
description: Specification of the desired state of the ProxyClass resource. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
- statefulSet
|
- statefulSet
|
||||||
properties:
|
properties:
|
||||||
statefulSet:
|
statefulSet:
|
||||||
description: Proxy's StatefulSet spec.
|
description: Configuration parameters for the proxy's StatefulSet. Tailscale Kubernetes operator deploys a StatefulSet for each of the user configured proxies (Tailscale Ingress, Tailscale Service, Connector).
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
annotations:
|
annotations:
|
||||||
@ -483,6 +485,7 @@ spec:
|
|||||||
description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.
|
description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.
|
||||||
type: string
|
type: string
|
||||||
status:
|
status:
|
||||||
|
description: Status of the ProxyClass. This is set and managed automatically. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
conditions:
|
conditions:
|
||||||
|
@ -60,6 +60,7 @@ spec:
|
|||||||
name: v1alpha1
|
name: v1alpha1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
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: https://tailscale.com/kb/1236/kubernetes-operator#deploying-exit-nodes-and-subnet-routers-on-kubernetes-using-connector-custom-resource'
|
||||||
properties:
|
properties:
|
||||||
apiVersion:
|
apiVersion:
|
||||||
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'
|
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'
|
||||||
@ -70,7 +71,7 @@ spec:
|
|||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
description: ConnectorSpec describes the desired Tailscale component.
|
description: 'ConnectorSpec describes the desired Tailscale component. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
|
||||||
properties:
|
properties:
|
||||||
exitNode:
|
exitNode:
|
||||||
description: ExitNode defines whether the Connector node should act as a Tailscale exit node. Defaults to false. https://tailscale.com/kb/1103/exit-nodes
|
description: ExitNode defines whether the Connector node should act as a Tailscale exit node. Defaults to false. https://tailscale.com/kb/1103/exit-nodes
|
||||||
@ -179,6 +180,7 @@ spec:
|
|||||||
name: v1alpha1
|
name: v1alpha1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
description: 'ProxyClass describes a set of configuration parameters that can be applied to proxy resources created by the Tailscale Kubernetes operator. To apply a given ProxyClass to resources created for a tailscale Ingress or Service, use tailscale.com/proxy-class=<proxyclass-name> label. To apply a given ProxyClass to resources created for a Connector, use connector.spec.proxyClass field. ProxyClass is a cluster scoped resource. More info: https://tailscale.com/kb/1236/kubernetes-operator#cluster-resource-customization-using-proxyclass-custom-resource.'
|
||||||
properties:
|
properties:
|
||||||
apiVersion:
|
apiVersion:
|
||||||
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'
|
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'
|
||||||
@ -189,9 +191,10 @@ spec:
|
|||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
spec:
|
spec:
|
||||||
|
description: Specification of the desired state of the ProxyClass resource. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||||
properties:
|
properties:
|
||||||
statefulSet:
|
statefulSet:
|
||||||
description: Proxy's StatefulSet spec.
|
description: Configuration parameters for the proxy's StatefulSet. Tailscale Kubernetes operator deploys a StatefulSet for each of the user configured proxies (Tailscale Ingress, Tailscale Service, Connector).
|
||||||
properties:
|
properties:
|
||||||
annotations:
|
annotations:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
@ -638,6 +641,7 @@ spec:
|
|||||||
- statefulSet
|
- statefulSet
|
||||||
type: object
|
type: object
|
||||||
status:
|
status:
|
||||||
|
description: Status of the ProxyClass. This is set and managed automatically. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||||
properties:
|
properties:
|
||||||
conditions:
|
conditions:
|
||||||
description: List of status conditions to indicate the status of the ProxyClass. Known condition types are `ProxyClassReady`.
|
description: List of status conditions to indicate the status of the ProxyClass. Known condition types are `ProxyClassReady`.
|
||||||
|
@ -23,7 +23,7 @@ Resource Types:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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: https://tailscale.com/kb/1236/kubernetes-operator#deploying-exit-nodes-and-subnet-routers-on-kubernetes-using-connector-custom-resource
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
@ -55,7 +55,7 @@ Resource Types:
|
|||||||
<td><b><a href="#connectorspec">spec</a></b></td>
|
<td><b><a href="#connectorspec">spec</a></b></td>
|
||||||
<td>object</td>
|
<td>object</td>
|
||||||
<td>
|
<td>
|
||||||
ConnectorSpec describes the desired Tailscale component.<br/>
|
ConnectorSpec describes the desired Tailscale component. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<i>Validations</i>:<li>has(self.subnetRouter) || self.exitNode == true: A Connector needs to be either an exit node or a subnet router, or both.</li>
|
<i>Validations</i>:<li>has(self.subnetRouter) || self.exitNode == true: A Connector needs to be either an exit node or a subnet router, or both.</li>
|
||||||
</td>
|
</td>
|
||||||
@ -76,7 +76,7 @@ Resource Types:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
ConnectorSpec describes the desired Tailscale component.
|
ConnectorSpec describes the desired Tailscale component. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
@ -267,7 +267,7 @@ ConnectorCondition contains condition information for a Connector.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ProxyClass describes a set of configuration parameters that can be applied to proxy resources created by the Tailscale Kubernetes operator. To apply a given ProxyClass to resources created for a tailscale Ingress or Service, use tailscale.com/proxy-class=<proxyclass-name> label. To apply a given ProxyClass to resources created for a Connector, use connector.spec.proxyClass field. ProxyClass is a cluster scoped resource. More info: https://tailscale.com/kb/1236/kubernetes-operator#cluster-resource-customization-using-proxyclass-custom-resource.
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
@ -299,14 +299,14 @@ ConnectorCondition contains condition information for a Connector.
|
|||||||
<td><b><a href="#proxyclassspec">spec</a></b></td>
|
<td><b><a href="#proxyclassspec">spec</a></b></td>
|
||||||
<td>object</td>
|
<td>object</td>
|
||||||
<td>
|
<td>
|
||||||
<br/>
|
Specification of the desired state of the ProxyClass resource. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status<br/>
|
||||||
</td>
|
</td>
|
||||||
<td>true</td>
|
<td>true</td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
<td><b><a href="#proxyclassstatus">status</a></b></td>
|
<td><b><a href="#proxyclassstatus">status</a></b></td>
|
||||||
<td>object</td>
|
<td>object</td>
|
||||||
<td>
|
<td>
|
||||||
<br/>
|
Status of the ProxyClass. This is set and managed automatically. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status<br/>
|
||||||
</td>
|
</td>
|
||||||
<td>false</td>
|
<td>false</td>
|
||||||
</tr></tbody>
|
</tr></tbody>
|
||||||
@ -318,7 +318,7 @@ ConnectorCondition contains condition information for a Connector.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Specification of the desired state of the ProxyClass resource. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
@ -333,7 +333,7 @@ ConnectorCondition contains condition information for a Connector.
|
|||||||
<td><b><a href="#proxyclassspecstatefulset">statefulSet</a></b></td>
|
<td><b><a href="#proxyclassspecstatefulset">statefulSet</a></b></td>
|
||||||
<td>object</td>
|
<td>object</td>
|
||||||
<td>
|
<td>
|
||||||
Proxy's StatefulSet spec.<br/>
|
Configuration parameters for the proxy's StatefulSet. Tailscale Kubernetes operator deploys a StatefulSet for each of the user configured proxies (Tailscale Ingress, Tailscale Service, Connector).<br/>
|
||||||
</td>
|
</td>
|
||||||
<td>true</td>
|
<td>true</td>
|
||||||
</tr></tbody>
|
</tr></tbody>
|
||||||
@ -345,7 +345,7 @@ ConnectorCondition contains condition information for a Connector.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Proxy's StatefulSet spec.
|
Configuration parameters for the proxy's StatefulSet. Tailscale Kubernetes operator deploys a StatefulSet for each of the user configured proxies (Tailscale Ingress, Tailscale Service, Connector).
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
@ -1638,7 +1638,7 @@ The pod this Toleration is attached to tolerates any taint that matches the trip
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Status of the ProxyClass. This is set and managed automatically. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -24,11 +24,19 @@ var ConnectorKind = "Connector"
|
|||||||
// +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="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
|
||||||
|
// 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:
|
||||||
|
// https://tailscale.com/kb/1236/kubernetes-operator#deploying-exit-nodes-and-subnet-routers-on-kubernetes-using-connector-custom-resource
|
||||||
type Connector struct {
|
type Connector struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// ConnectorSpec describes the desired Tailscale component.
|
// ConnectorSpec describes the desired Tailscale component.
|
||||||
|
// More info:
|
||||||
|
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||||
Spec ConnectorSpec `json:"spec"`
|
Spec ConnectorSpec `json:"spec"`
|
||||||
|
|
||||||
// ConnectorStatus describes the status of the Connector. This is set
|
// ConnectorStatus describes the status of the Connector. This is set
|
||||||
|
@ -17,13 +17,26 @@ var ProxyClassKind = "ProxyClass"
|
|||||||
// +kubebuilder:resource:scope=Cluster
|
// +kubebuilder:resource:scope=Cluster
|
||||||
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.conditions[?(@.type == "ProxyClassReady")].reason`,description="Status of the ProxyClass."
|
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.conditions[?(@.type == "ProxyClassReady")].reason`,description="Status of the ProxyClass."
|
||||||
|
|
||||||
|
// ProxyClass describes a set of configuration parameters that can be applied to
|
||||||
|
// proxy resources created by the Tailscale Kubernetes operator.
|
||||||
|
// To apply a given ProxyClass to resources created for a tailscale Ingress or
|
||||||
|
// Service, use tailscale.com/proxy-class=<proxyclass-name> label. To apply a
|
||||||
|
// given ProxyClass to resources created for a Connector, use
|
||||||
|
// connector.spec.proxyClass field.
|
||||||
|
// ProxyClass is a cluster scoped resource.
|
||||||
|
// More info:
|
||||||
|
// https://tailscale.com/kb/1236/kubernetes-operator#cluster-resource-customization-using-proxyclass-custom-resource.
|
||||||
type ProxyClass struct {
|
type ProxyClass struct {
|
||||||
metav1.TypeMeta `json:",inline"`
|
metav1.TypeMeta `json:",inline"`
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
|
// Specification of the desired state of the ProxyClass resource.
|
||||||
|
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||||
Spec ProxyClassSpec `json:"spec"`
|
Spec ProxyClassSpec `json:"spec"`
|
||||||
|
|
||||||
// +optional
|
// +optional
|
||||||
|
// Status of the ProxyClass. This is set and managed automatically.
|
||||||
|
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||||
Status ProxyClassStatus `json:"status"`
|
Status ProxyClassStatus `json:"status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,7 +49,9 @@ type ProxyClassList struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ProxyClassSpec struct {
|
type ProxyClassSpec struct {
|
||||||
// Proxy's StatefulSet spec.
|
// Configuration parameters for the proxy's StatefulSet. Tailscale
|
||||||
|
// Kubernetes operator deploys a StatefulSet for each of the user
|
||||||
|
// configured proxies (Tailscale Ingress, Tailscale Service, Connector).
|
||||||
StatefulSet *StatefulSet `json:"statefulSet"`
|
StatefulSet *StatefulSet `json:"statefulSet"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user