Documentation ¶
Index ¶
- type CompositeHook
- func (c CompositeHook) AfterProvision(platform *Platform, machine types.Machine) error
- func (c CompositeHook) AfterTerminate(platform *Platform, machine types.Machine) error
- func (c CompositeHook) BeforeProvision(platform *Platform, machine *types.VM) error
- func (c CompositeHook) BeforeTerminate(platform *Platform, machine types.Machine) error
- func (c CompositeHook) String() string
- type ConsulProvider
- func (consul ConsulProvider) AfterProvision(platform *Platform, machine types.Machine) error
- func (consul ConsulProvider) AfterTerminate(platform *Platform, machine types.Machine) error
- func (consul ConsulProvider) BeforeProvision(platform *Platform, machine *types.VM) error
- func (consul ConsulProvider) BeforeTerminate(platform *Platform, machine types.Machine) error
- func (consul ConsulProvider) GetControlPlaneEndpoint(platform *Platform) (string, error)
- func (consul ConsulProvider) GetExternalEndpoints(platform *Platform) ([]string, error)
- func (consul ConsulProvider) String() string
- type DNSProvider
- func (dns DNSProvider) AfterProvision(platform *Platform, machine types.Machine) error
- func (dns DNSProvider) AfterTerminate(platform *Platform, machine types.Machine) error
- func (dns DNSProvider) BeforeProvision(platform *Platform, machine *types.VM) error
- func (dns DNSProvider) BeforeTerminate(platform *Platform, machine types.Machine) error
- func (dns DNSProvider) GetControlPlaneEndpoint(platform *Platform) (string, error)
- func (dns DNSProvider) GetExternalEndpoints(platform *Platform) ([]string, error)
- func (dns DNSProvider) String() string
- type KindProvider
- func (kind KindProvider) AfterProvision(platform *Platform, machine types.Machine) error
- func (kind KindProvider) AfterTerminate(platform *Platform, machine types.Machine) error
- func (kind KindProvider) BeforeProvision(platform *Platform, machine *types.VM) error
- func (kind KindProvider) BeforeTerminate(platform *Platform, machine types.Machine) error
- func (kind KindProvider) GetControlPlaneEndpoint(platform *Platform) (string, error)
- func (kind KindProvider) GetExternalEndpoints(platform *Platform) ([]string, error)
- func (kind KindProvider) String() string
- type MasterDiscovery
- type NSXProvider
- func (nsx *NSXProvider) AfterProvision(platform *Platform, vm types.Machine) error
- func (nsx NSXProvider) AfterTerminate(platform *Platform, machine types.Machine) error
- func (nsx *NSXProvider) BeforeProvision(platform *Platform, machine *types.VM) error
- func (nsx *NSXProvider) BeforeTerminate(platform *Platform, machine types.Machine) error
- func (nsx *NSXProvider) GetControlPlaneEndpoint(platform *Platform) (string, error)
- func (nsx *NSXProvider) GetExternalEndpoints(platform *Platform) ([]string, error)
- func (nsx *NSXProvider) String() string
- type Platform
- func (platform *Platform) ApplyCRD(namespace string, specs ...k8s.CRD) error
- func (platform *Platform) ApplySpecs(namespace string, specs ...string) error
- func (platform *Platform) ApplyText(namespace string, specs ...string) error
- func (platform *Platform) Clone(vm types.VM, config *konfigadm.Config) (types.Machine, error)
- func (platform *Platform) CreateIngressCertificate(subDomain string) (*certs.Certificate, error)
- func (platform *Platform) CreateInternalCertificate(service string, namespace string, clusterDomain string) (*certs.Certificate, error)
- func (platform *Platform) CreateOrUpdateNamespace(name string, labels map[string]string, annotations map[string]string) error
- func (platform *Platform) CreateOrUpdateWorkloadNamespace(name string, labels map[string]string, annotations map[string]string) error
- func (platform *Platform) CreateTLSSecret(namespace, subDomain, secretName string) error
- func (platform *Platform) DefaultNamespaceAnnotations() map[string]string
- func (platform *Platform) DefaultNamespaceLabels() map[string]string
- func (platform *Platform) DeleteSpecs(namespace string, specs ...string) error
- func (platform *Platform) ExposeIngress(namespace, service string, port int, annotations map[string]string) error
- func (platform *Platform) ExposeIngressTLS(namespace, service string, port int) error
- func (platform *Platform) GetAPIEndpoint() (string, error)
- func (platform *Platform) GetAWSS3Client() (*s3.S3, error)
- func (platform *Platform) GetAWSSession() (*session.Session, error)
- func (platform *Platform) GetBinary(name string) deps.BinaryFunc
- func (platform *Platform) GetBinaryWithEnv(name string, env map[string]string) deps.BinaryFunc
- func (platform *Platform) GetBinaryWithKubeConfig(binary string) deps.BinaryFunc
- func (platform *Platform) GetCA() certs.CertificateAuthority
- func (platform *Platform) GetConsulClient() api.Consul
- func (platform *Platform) GetDNSClient() dns.Client
- func (platform *Platform) GetIngressCA() certs.CertificateAuthority
- func (platform *Platform) GetKubeConfig() (string, error)
- func (platform *Platform) GetKubeConfigBytes() ([]byte, error)
- func (platform *Platform) GetKubectl() deps.BinaryFunc
- func (platform *Platform) GetNodeNames() map[string]bool
- func (platform *Platform) GetOrCreateBucket(name string) error
- func (platform *Platform) GetResourceByName(file string, pkg string) (string, error)
- func (platform *Platform) GetResourcesByDir(path string, pkg string) (map[string]http.File, error)
- func (platform *Platform) GetS3Client() (*minio.Client, error)
- func (platform *Platform) Init() error
- func (platform *Platform) IsMaster(machine types.TagInterface) bool
- func (platform *Platform) NewSelfSigned(domain string) *certs.Certificate
- func (platform *Platform) OpenDB(namespace, clusterName, databaseName string) (*pg.DB, error)
- func (platform *Platform) ReadCA(ca *types.CA) (*certs.Certificate, error)
- func (platform *Platform) ReadIngressCACertString() string
- func (platform *Platform) ResetMasterConnection()
- func (platform *Platform) Template(file string, pkg string) (string, error)
- func (platform *Platform) WaitFor() error
- func (platform *Platform) WaitForNamespace(ns string, timeout time.Duration)
- func (platform *Platform) WithField(key string, value interface{}) *Platform
- func (platform *Platform) WithLogOutput(output io.Writer) *Platform
- type ProvisionHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompositeHook ¶
type CompositeHook struct {
Hooks []ProvisionHook
}
func (CompositeHook) AfterProvision ¶
func (c CompositeHook) AfterProvision(platform *Platform, machine types.Machine) error
func (CompositeHook) AfterTerminate ¶
func (c CompositeHook) AfterTerminate(platform *Platform, machine types.Machine) error
func (CompositeHook) BeforeProvision ¶
func (c CompositeHook) BeforeProvision(platform *Platform, machine *types.VM) error
func (CompositeHook) BeforeTerminate ¶
func (c CompositeHook) BeforeTerminate(platform *Platform, machine types.Machine) error
func (CompositeHook) String ¶
func (c CompositeHook) String() string
type ConsulProvider ¶
func NewConsulProvider ¶
func NewConsulProvider(platform *Platform) ConsulProvider
func (ConsulProvider) AfterProvision ¶
func (consul ConsulProvider) AfterProvision(platform *Platform, machine types.Machine) error
func (ConsulProvider) AfterTerminate ¶
func (consul ConsulProvider) AfterTerminate(platform *Platform, machine types.Machine) error
func (ConsulProvider) BeforeProvision ¶
func (consul ConsulProvider) BeforeProvision(platform *Platform, machine *types.VM) error
func (ConsulProvider) BeforeTerminate ¶
func (consul ConsulProvider) BeforeTerminate(platform *Platform, machine types.Machine) error
func (ConsulProvider) GetControlPlaneEndpoint ¶
func (consul ConsulProvider) GetControlPlaneEndpoint(platform *Platform) (string, error)
func (ConsulProvider) GetExternalEndpoints ¶
func (consul ConsulProvider) GetExternalEndpoints(platform *Platform) ([]string, error)
func (ConsulProvider) String ¶
func (consul ConsulProvider) String() string
type DNSProvider ¶
func NewDNSProvider ¶
func NewDNSProvider(client dns.Client) DNSProvider
func (DNSProvider) AfterProvision ¶
func (dns DNSProvider) AfterProvision(platform *Platform, machine types.Machine) error
func (DNSProvider) AfterTerminate ¶
func (dns DNSProvider) AfterTerminate(platform *Platform, machine types.Machine) error
func (DNSProvider) BeforeProvision ¶
func (dns DNSProvider) BeforeProvision(platform *Platform, machine *types.VM) error
func (DNSProvider) BeforeTerminate ¶
func (dns DNSProvider) BeforeTerminate(platform *Platform, machine types.Machine) error
func (DNSProvider) GetControlPlaneEndpoint ¶
func (dns DNSProvider) GetControlPlaneEndpoint(platform *Platform) (string, error)
func (DNSProvider) GetExternalEndpoints ¶
func (dns DNSProvider) GetExternalEndpoints(platform *Platform) ([]string, error)
func (DNSProvider) String ¶
func (dns DNSProvider) String() string
type KindProvider ¶
type KindProvider struct { }
func (KindProvider) AfterProvision ¶
func (kind KindProvider) AfterProvision(platform *Platform, machine types.Machine) error
func (KindProvider) AfterTerminate ¶
func (kind KindProvider) AfterTerminate(platform *Platform, machine types.Machine) error
func (KindProvider) BeforeProvision ¶
func (kind KindProvider) BeforeProvision(platform *Platform, machine *types.VM) error
func (KindProvider) BeforeTerminate ¶
func (kind KindProvider) BeforeTerminate(platform *Platform, machine types.Machine) error
func (KindProvider) GetControlPlaneEndpoint ¶
func (kind KindProvider) GetControlPlaneEndpoint(platform *Platform) (string, error)
func (KindProvider) GetExternalEndpoints ¶
func (kind KindProvider) GetExternalEndpoints(platform *Platform) ([]string, error)
func (KindProvider) String ¶
func (kind KindProvider) String() string
type MasterDiscovery ¶
type NSXProvider ¶
func NewNSXProvider ¶
func NewNSXProvider(platform *Platform) (*NSXProvider, error)
func (*NSXProvider) AfterProvision ¶
func (nsx *NSXProvider) AfterProvision(platform *Platform, vm types.Machine) error
func (NSXProvider) AfterTerminate ¶
func (nsx NSXProvider) AfterTerminate(platform *Platform, machine types.Machine) error
func (*NSXProvider) BeforeProvision ¶
func (nsx *NSXProvider) BeforeProvision(platform *Platform, machine *types.VM) error
func (*NSXProvider) BeforeTerminate ¶
func (nsx *NSXProvider) BeforeTerminate(platform *Platform, machine types.Machine) error
func (*NSXProvider) GetControlPlaneEndpoint ¶
func (nsx *NSXProvider) GetControlPlaneEndpoint(platform *Platform) (string, error)
func (*NSXProvider) GetExternalEndpoints ¶
func (nsx *NSXProvider) GetExternalEndpoints(platform *Platform) ([]string, error)
func (*NSXProvider) String ¶
func (nsx *NSXProvider) String() string
type Platform ¶
type Platform struct { Cluster types.Cluster types.PlatformConfig MasterDiscovery MasterDiscovery ProvisionHook ProvisionHook logger.Logger k8s.Client KubeConfigPath string // Terminating is true if the cluster is in a terminating state Terminating bool // contains filtered or unexported fields }
func (*Platform) ApplySpecs ¶
func (*Platform) CreateIngressCertificate ¶
func (platform *Platform) CreateIngressCertificate(subDomain string) (*certs.Certificate, error)
func (*Platform) CreateInternalCertificate ¶
func (*Platform) CreateOrUpdateNamespace ¶
func (*Platform) CreateOrUpdateWorkloadNamespace ¶
func (*Platform) CreateTLSSecret ¶
func (*Platform) DefaultNamespaceAnnotations ¶
func (*Platform) DefaultNamespaceLabels ¶
func (*Platform) DeleteSpecs ¶
func (*Platform) ExposeIngress ¶
func (*Platform) ExposeIngressTLS ¶
func (*Platform) GetAPIEndpoint ¶
GetAPIEndpoint returns an endpoint for reaching a master node that is reachable on 6443 or an error otherwise
func (*Platform) GetAWSSession ¶
func (*Platform) GetBinaryWithEnv ¶
func (*Platform) GetBinaryWithKubeConfig ¶
func (platform *Platform) GetBinaryWithKubeConfig(binary string) deps.BinaryFunc
func (*Platform) GetCA ¶
func (platform *Platform) GetCA() certs.CertificateAuthority
GetCA retrieves the cert.CertificateAuthority for the given platform, initialising it (platform.ca) if it hasn't been read from the specified config (platform.CA) yet.
func (*Platform) GetConsulClient ¶
func (*Platform) GetDNSClient ¶
func (*Platform) GetIngressCA ¶
func (platform *Platform) GetIngressCA() certs.CertificateAuthority
func (*Platform) GetKubeConfig ¶
GetKubeConfig gets the path to the admin kubeconfig, creating it if necessary
func (*Platform) GetKubeConfigBytes ¶
func (*Platform) GetKubectl ¶
func (platform *Platform) GetKubectl() deps.BinaryFunc
func (*Platform) GetNodeNames ¶
func (*Platform) GetOrCreateBucket ¶
func (*Platform) GetResourceByName ¶
func (*Platform) GetResourcesByDir ¶
func (*Platform) NewSelfSigned ¶ added in v0.16.3
func (platform *Platform) NewSelfSigned(domain string) *certs.Certificate
func (*Platform) ReadCA ¶
ReadCA opens the CA stored in the file ca.Cert using the private key in ca.PrivateKey with key password ca.Password.
func (*Platform) ReadIngressCACertString ¶
func (*Platform) ResetMasterConnection ¶
func (platform *Platform) ResetMasterConnection()
func (*Platform) WaitForNamespace ¶
type ProvisionHook ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.