package kube
import "tailscale.com/k8s-operator"
Package kube contains types and utilities for the Tailscale Kubernetes Operator.
Index ¶
- Constants
- func CapVerFromFileName(name string) (tailcfg.CapabilityVersion, error)
- func DNSCfgIsReady(cfg *tsapi.DNSConfig) bool
- func GetServiceCondition(svc *corev1.Service, conditionType tsapi.ConditionType) *metav1.Condition
- func ProxyClassIsReady(pc *tsapi.ProxyClass) bool
- func ProxyGroupIsReady(pg *tsapi.ProxyGroup) bool
- func RemoveConnectorCondition(conn *tsapi.Connector, conditionType tsapi.ConditionType)
- func RemoveServiceCondition(svc *corev1.Service, conditionType tsapi.ConditionType)
- func SetConnectorCondition(cn *tsapi.Connector, conditionType tsapi.ConditionType, status metav1.ConditionStatus, reason, message string, gen int64, clock tstime.Clock, logger *zap.SugaredLogger)
- func SetDNSConfigCondition(dnsCfg *tsapi.DNSConfig, conditionType tsapi.ConditionType, status metav1.ConditionStatus, reason, message string, gen int64, clock tstime.Clock, logger *zap.SugaredLogger)
- func SetProxyClassCondition(pc *tsapi.ProxyClass, conditionType tsapi.ConditionType, status metav1.ConditionStatus, reason, message string, gen int64, clock tstime.Clock, logger *zap.SugaredLogger)
- func SetProxyGroupCondition(pg *tsapi.ProxyGroup, conditionType tsapi.ConditionType, status metav1.ConditionStatus, reason, message string, gen int64, clock tstime.Clock, logger *zap.SugaredLogger)
- func SetRecorderCondition(tsr *tsapi.Recorder, conditionType tsapi.ConditionType, status metav1.ConditionStatus, reason, message string, gen int64, clock tstime.Clock, logger *zap.SugaredLogger)
- func SetServiceCondition(svc *corev1.Service, conditionType tsapi.ConditionType, status metav1.ConditionStatus, reason, message string, clock tstime.Clock, logger *zap.SugaredLogger)
- func SvcIsReady(svc *corev1.Service) bool
- func TailscaledConfigFileName(cap tailcfg.CapabilityVersion) string
- type Records
Constants ¶
const ( Alpha1Version = "v1alpha1" DNSRecordsCMName = "dnsrecords" DNSRecordsCMKey = "records.json" )
Functions ¶
func CapVerFromFileName ¶
func CapVerFromFileName(name string) (tailcfg.CapabilityVersion, error)
CapVerFromFileName parses the capability version from a tailscaled config file name previously generated by TailscaledConfigFileNameForCap.
func DNSCfgIsReady ¶
func GetServiceCondition ¶
GetServiceCondition returns Service condition with the specified type, if it exists on the Service.
func ProxyClassIsReady ¶
func ProxyClassIsReady(pc *tsapi.ProxyClass) bool
func ProxyGroupIsReady ¶
func ProxyGroupIsReady(pg *tsapi.ProxyGroup) bool
func RemoveConnectorCondition ¶
func RemoveConnectorCondition(conn *tsapi.Connector, conditionType tsapi.ConditionType)
RemoveConnectorCondition will remove condition of the given type if it exists.
func RemoveServiceCondition ¶
func RemoveServiceCondition(svc *corev1.Service, conditionType tsapi.ConditionType)
RemoveServiceCondition will remove condition of the given type if it exists.
func SetConnectorCondition ¶
func SetConnectorCondition(cn *tsapi.Connector, conditionType tsapi.ConditionType, status metav1.ConditionStatus, reason, message string, gen int64, clock tstime.Clock, logger *zap.SugaredLogger)
SetConnectorCondition ensures that Connector status has a condition with the given attributes. LastTransitionTime gets set every time condition's status changes.
func SetDNSConfigCondition ¶
func SetDNSConfigCondition(dnsCfg *tsapi.DNSConfig, conditionType tsapi.ConditionType, status metav1.ConditionStatus, reason, message string, gen int64, clock tstime.Clock, logger *zap.SugaredLogger)
SetDNSConfigCondition ensures that DNSConfig status has a condition with the given attributes. LastTransitionTime gets set every time condition's status changes
func SetProxyClassCondition ¶
func SetProxyClassCondition(pc *tsapi.ProxyClass, conditionType tsapi.ConditionType, status metav1.ConditionStatus, reason, message string, gen int64, clock tstime.Clock, logger *zap.SugaredLogger)
SetProxyClassCondition ensures that ProxyClass status has a condition with the given attributes. LastTransitionTime gets set every time condition's status changes.
func SetProxyGroupCondition ¶
func SetProxyGroupCondition(pg *tsapi.ProxyGroup, conditionType tsapi.ConditionType, status metav1.ConditionStatus, reason, message string, gen int64, clock tstime.Clock, logger *zap.SugaredLogger)
SetProxyGroupCondition ensures that ProxyGroup status has a condition with the given attributes. LastTransitionTime gets set every time condition's status changes.
func SetRecorderCondition ¶
func SetRecorderCondition(tsr *tsapi.Recorder, conditionType tsapi.ConditionType, status metav1.ConditionStatus, reason, message string, gen int64, clock tstime.Clock, logger *zap.SugaredLogger)
SetRecorderCondition ensures that Recorder status has a condition with the given attributes. LastTransitionTime gets set every time condition's status changes.
func SetServiceCondition ¶
func SetServiceCondition(svc *corev1.Service, conditionType tsapi.ConditionType, status metav1.ConditionStatus, reason, message string, clock tstime.Clock, logger *zap.SugaredLogger)
SetServiceCondition ensures that Service status has a condition with the given attributes. LastTransitionTime gets set every time condition's status changes.
func SvcIsReady ¶
func TailscaledConfigFileName ¶
func TailscaledConfigFileName(cap tailcfg.CapabilityVersion) string
TailscaledConfigFileName returns a tailscaled config file name in format expected by containerboot for the given CapVer.
Types ¶
type Records ¶
type Records struct { // Version is the version of this Records configuration. Version is // written by the operator, i.e when it first populates the Records. // k8s-nameserver must verify that it knows how to parse a given // version. Version string `json:"version"` // IP4 contains a mapping of DNS names to IPv4 address(es). IP4 map[string][]string `json:"ip4"` }
Source Files ¶
conditions.go utils.go
Directories ¶
Path | Synopsis |
---|---|
k8s-operator/api-proxy | Package apiproxy contains the Kubernetes API Proxy implementation used by k8s-operator and k8s-proxy. |
k8s-operator/apis | Package apis contains a constant to name the Tailscale Kubernetes Operator's schema group. |
k8s-operator/apis/v1alpha1 | +kubebuilder:object:generate=true +groupName=tailscale.com |
k8s-operator/sessionrecording | Package sessionrecording contains functionality for recording Kubernetes API server proxy 'kubectl exec' sessions. |
k8s-operator/sessionrecording/fakes | Package fakes contains mocks used for testing 'kubectl exec' session recording functionality. |
k8s-operator/sessionrecording/spdy | Package spdy contains functionality for parsing SPDY streaming sessions. |
k8s-operator/sessionrecording/tsrecorder | Package tsrecorder contains functionality for connecting to a tsrecorder instance. |
k8s-operator/sessionrecording/ws | package ws has functionality to parse 'kubectl exec' sessions streamed using WebSocket protocol. |
- Version
- v1.84.0 (latest)
- Published
- May 21, 2025
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 1 day ago –
Tools for package owners.