Documentation ¶
Index ¶
- Constants
- func KubeConfigWithToken(clusterName, apiServerEndpoint, caCertificate, token string) (string, error)
- func KubernetesClientFromKubeConfig(kubeConfig string) (clientset.Interface, error)
- func OneInfraManagedClientFromKubeConfig(kubeConfig string) (oneinframanagedclientset.Interface, error)
- func RESTClientFromKubeConfig(kubeConfig string, groupVersion *schema.GroupVersion, scheme *runtime.Scheme) (*restclient.RESTClient, error)
- type CertificateAuthorities
- type Cluster
- func (cluster *Cluster) AdminKubeConfig() (string, error)
- func (cluster *Cluster) ClientCertificate(ca *certificates.Certificate, name, commonName string, organization []string, ...) (*certificates.Certificate, error)
- func (cluster *Cluster) CoreDNSServiceIP() (string, error)
- func (cluster *Cluster) Export() *clusterv1alpha1.Cluster
- func (cluster *Cluster) GenerateVPNPeer(peerName string) (*VPNPeer, error)
- func (cluster *Cluster) HasUninitializedCertificates() bool
- func (cluster *Cluster) InitializeCertificatesAndKeys() error
- func (cluster *Cluster) IsDirty() (bool, error)
- func (cluster *Cluster) JSONSpecs() (string, error)
- func (cluster *Cluster) KubeConfig(commonName string, organization []string) (string, error)
- func (cluster *Cluster) KubeConfigWithClientCertificate(apiServerEndpoint string, clientCertificate *certificates.Certificate) (string, error)
- func (cluster *Cluster) KubeConfigWithEndpoint(apiServerEndpoint, commonName string, organization []string) (string, error)
- func (cluster *Cluster) KubeletConfig() (string, error)
- func (cluster *Cluster) KubernetesClient() (clientset.Interface, error)
- func (cluster *Cluster) KubernetesExtensionsClient() (apiextensionsclientset.Interface, error)
- func (cluster *Cluster) KubernetesServiceIP() (string, error)
- func (cluster *Cluster) RESTClient(groupVersion *schema.GroupVersion, scheme *runtime.Scheme) (*restclient.RESTClient, error)
- func (cluster *Cluster) ReconcileCoreDNS() error
- func (cluster *Cluster) ReconcileCustomResourceDefinitions() error
- func (cluster *Cluster) ReconcileJoinPublicKeyConfigMap() error
- func (cluster *Cluster) ReconcileJoinTokens() error
- func (cluster *Cluster) ReconcileKubeProxy() error
- func (cluster *Cluster) ReconcileNamespaces() error
- func (cluster *Cluster) ReconcileNodeJoinRequests() error
- func (cluster *Cluster) ReconcilePermissions() error
- func (cluster *Cluster) RefreshCachedSpecs() error
- func (cluster *Cluster) Specs() (string, error)
- func (cluster *Cluster) VPNPeer(name string) (*VPNPeer, error)
- type EtcdServer
- type KubeAPIServer
- type Map
- type VPN
- type VPNPeer
- type VPNPeerMap
Constants ¶
const ( // ReconcileStarted represents a condition type signaling whether a // reconcile has been started ReconcileStarted conditions.ConditionType = "ReconcileStarted" // ReconcileSucceeded represents a condition type signaling that a // reconcile has succeeded ReconcileSucceeded conditions.ConditionType = "ReconcileSucceeded" )
Variables ¶
This section is empty.
Functions ¶
func KubeConfigWithToken ¶
func KubeConfigWithToken(clusterName, apiServerEndpoint, caCertificate, token string) (string, error)
KubeConfigWithToken returns a kubeconfig with token auth
func KubernetesClientFromKubeConfig ¶
KubernetesClientFromKubeConfig returns a kubernetes clientset from a kubeconfig file
func OneInfraManagedClientFromKubeConfig ¶
func OneInfraManagedClientFromKubeConfig(kubeConfig string) (oneinframanagedclientset.Interface, error)
OneInfraManagedClientFromKubeConfig returns a oneinfra managed clientset from a kubeconfig file
func RESTClientFromKubeConfig ¶
func RESTClientFromKubeConfig(kubeConfig string, groupVersion *schema.GroupVersion, scheme *runtime.Scheme) (*restclient.RESTClient, error)
RESTClientFromKubeConfig creates a rest client from a kubeconfig file
Types ¶
type CertificateAuthorities ¶
type CertificateAuthorities struct { APIServerClient *certificates.Certificate CertificateSigner *certificates.Certificate Kubelet *certificates.Certificate KubeletClient *certificates.Certificate EtcdClient *certificates.Certificate EtcdPeer *certificates.Certificate }
CertificateAuthorities represent global certificate authorities
func (*CertificateAuthorities) Export ¶
func (certificateAuthorities *CertificateAuthorities) Export() *clusterv1alpha1.CertificateAuthorities
Export exports these set of certificate authorities to a versioned certificate authority set
type Cluster ¶
type Cluster struct { Name string Namespace string ResourceVersion string Labels map[string]string Annotations map[string]string Finalizers []string DeletionTimestamp *metav1.Time KubernetesVersion string ControlPlaneReplicas int CertificateAuthorities *CertificateAuthorities EtcdServer *EtcdServer APIServer *KubeAPIServer ClientCertificates map[string]*certificates.Certificate StorageClientEndpoints map[string]string StoragePeerEndpoints map[string]string VPN *VPN VPNPeers VPNPeerMap APIServerEndpoint string VPNServerEndpoint string JoinKey *crypto.KeyPair DesiredJoinTokens []string CurrentJoinTokens []string Conditions conditions.ConditionList ClusterCIDR string ServiceCIDR string NodeCIDRMaskSize int NodeCIDRMaskSizeIPv4 int NodeCIDRMaskSizeIPv6 int // contains filtered or unexported fields }
Cluster represents a cluster
func NewCluster ¶
func NewCluster(clusterName, kubernetesVersion string, controlPlaneReplicas int, vpnEnabled bool, vpnCIDR string, apiServerExtraSANs []string) (*Cluster, error)
NewCluster returns an internal cluster
func NewClusterFromv1alpha1 ¶
func NewClusterFromv1alpha1(cluster *clusterv1alpha1.Cluster) (*Cluster, error)
NewClusterFromv1alpha1 returns a cluster based on a versioned cluster
func (*Cluster) AdminKubeConfig ¶
AdminKubeConfig returns a kubeconfig file for the current cluster
func (*Cluster) ClientCertificate ¶
func (cluster *Cluster) ClientCertificate(ca *certificates.Certificate, name, commonName string, organization []string, extraSANs []string) (*certificates.Certificate, error)
ClientCertificate returns a client certificate with the given name
func (*Cluster) CoreDNSServiceIP ¶
CoreDNSServiceIP returns the CoreDNS IP inside the services CIDR
func (*Cluster) Export ¶
func (cluster *Cluster) Export() *clusterv1alpha1.Cluster
Export exports the cluster to a versioned cluster
func (*Cluster) GenerateVPNPeer ¶
GenerateVPNPeer generates a new VPN peer with name peerName
func (*Cluster) HasUninitializedCertificates ¶
HasUninitializedCertificates returns whether this cluster has uninitialized certificates
func (*Cluster) InitializeCertificatesAndKeys ¶
InitializeCertificatesAndKeys initializes those certificates and keys that are not set in this cluster
func (*Cluster) IsDirty ¶
IsDirty returns whether this cluster is dirty compared to when it was loaded
func (*Cluster) KubeConfig ¶
KubeConfig returns a kube config with a client certificate with the given common name and organization
func (*Cluster) KubeConfigWithClientCertificate ¶
func (cluster *Cluster) KubeConfigWithClientCertificate(apiServerEndpoint string, clientCertificate *certificates.Certificate) (string, error)
KubeConfigWithClientCertificate returns a kubeconfig for the current cluster using the provided client certificate
func (*Cluster) KubeConfigWithEndpoint ¶
func (cluster *Cluster) KubeConfigWithEndpoint(apiServerEndpoint, commonName string, organization []string) (string, error)
KubeConfigWithEndpoint returns a kube config with a client certificate with the given common name and organization, pointing to the provided API endpoint
func (*Cluster) KubeletConfig ¶
KubeletConfig returns a default kubelet config
func (*Cluster) KubernetesClient ¶
KubernetesClient returns a kubernetes clientset for the current cluster
func (*Cluster) KubernetesExtensionsClient ¶
func (cluster *Cluster) KubernetesExtensionsClient() (apiextensionsclientset.Interface, error)
KubernetesExtensionsClient returns an extensions clientset for the current cluster
func (*Cluster) KubernetesServiceIP ¶
KubernetesServiceIP returns the Kubernetes IP inside the services CIDR
func (*Cluster) RESTClient ¶
func (cluster *Cluster) RESTClient(groupVersion *schema.GroupVersion, scheme *runtime.Scheme) (*restclient.RESTClient, error)
RESTClient returns a REST client for the current cluster
func (*Cluster) ReconcileCoreDNS ¶
ReconcileCoreDNS reconciles the CoreDNS deployment in this cluster
func (*Cluster) ReconcileCustomResourceDefinitions ¶
ReconcileCustomResourceDefinitions reconciles this cluster custom resource definitions
func (*Cluster) ReconcileJoinPublicKeyConfigMap ¶
ReconcileJoinPublicKeyConfigMap reconciles the join public key ConfigMap
func (*Cluster) ReconcileJoinTokens ¶
ReconcileJoinTokens reconciles this cluster join tokens
func (*Cluster) ReconcileKubeProxy ¶
ReconcileKubeProxy reconciles the kube-proxy daemonset in this cluster
func (*Cluster) ReconcileNamespaces ¶
ReconcileNamespaces reconciles this cluster namespaces
func (*Cluster) ReconcileNodeJoinRequests ¶
ReconcileNodeJoinRequests reconciles this cluster node join requests
func (*Cluster) ReconcilePermissions ¶
ReconcilePermissions reconciles this cluster namespaces
func (*Cluster) RefreshCachedSpecs ¶
RefreshCachedSpecs refreshes the cached spec
type EtcdServer ¶
type EtcdServer struct {
CA *certificates.Certificate
}
EtcdServer represents the etcd component
func (*EtcdServer) Export ¶
func (etcdServer *EtcdServer) Export() *clusterv1alpha1.EtcdServer
Export exports this etcd server into a versioned etcd server
type KubeAPIServer ¶
type KubeAPIServer struct { CA *certificates.Certificate ServiceAccount *crypto.KeyPair ExtraSANs []string }
KubeAPIServer represents the kube-apiserver component
func (*KubeAPIServer) Export ¶
func (kubeAPIServer *KubeAPIServer) Export() *clusterv1alpha1.KubeAPIServer
Export exports this kube-apiserver to a versioned kube-apiserver
type VPN ¶
VPN represents the VPN configuration
func (*VPN) Export ¶
func (vpn *VPN) Export() *clusterv1alpha1.VPN
Export exports this VPN to a versioned VPN
type VPNPeerMap ¶
VPNPeerMap represents a map of VPN peers
func (VPNPeerMap) Export ¶
func (vpnPeerMap VPNPeerMap) Export() []clusterv1alpha1.VPNPeer
Export exports the map of VPN peers to a versioned list of VPN peers