Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Common ¶
type Common struct {
Image string `json:"image" yaml:"image"`
KubernetesCACertificate types.Certificate `json:"kubernetesCACertificate" yaml:"kubernetesCACertificate"`
FrontProxyCACertificate types.Certificate `json:"frontProxyCACertificate" yaml:"frontProxyCACertificate"`
}
Common struct contains fields, which are common between all controlplane components.
type Controlplane ¶
type Controlplane struct {
// User-configurable fields.
// They should be defined here if they are used more than once. Things like serviceCIDR, which is only needed in KubeAPIServer,
// should be defined directly there.
Common Common `json:"common" yaml:"common"`
SSH *ssh.Config `json:"ssh" yaml:"ssh"`
APIServerAddress string `json:"apiServerAddress" yaml:"apiServerAddress"`
APIServerPort int `json:"apiServerPort" yaml:"apiServerPort"`
KubeAPIServer KubeAPIServer `json:"kubeAPIServer" yaml:"kubeAPIServer"`
KubeControllerManager KubeControllerManager `json:"kubeControllerManager" yaml:"kubeControllerManager"`
KubeScheduler KubeScheduler `json:"kubeScheduler" yaml:"kubeScheduler"`
Shutdown bool `json:"shutdown" yaml:"shutdown"`
// Serializable fields.
State container.ContainersState `json:"state" yaml:"state"`
}
Controlplane represents kubernetes controlplane configuration and state from the user.
func (*Controlplane) New ¶
func (c *Controlplane) New() (types.Resource, error)
New validates Controlplane configuration and fills populates all values provided by the users to the structs underneath.
func (*Controlplane) Validate ¶
func (c *Controlplane) Validate() error
Validate validates Controlplane configuration.
type KubeAPIServer ¶
type KubeAPIServer struct {
Common Common `json:"common" yaml:"common"`
Host host.Host `json:"host" yaml:"host"`
APIServerCertificate types.Certificate `json:"apiServerCertificate" yaml:"apiServerCertificate"`
APIServerKey types.PrivateKey `json:"apiServerKey" yaml:"apiServerKey"`
ServiceAccountPublicKey string `json:"serviceAccountPublicKey" yaml:"serviceAccountPublicKey"`
BindAddress string `json:"bindAddress" yaml:"bindAddress"`
AdvertiseAddress string `json:"advertiseAddress" yaml:"advertiseAddress"`
EtcdServers []string `json:"etcdServers" yaml:"etcdServers"`
ServiceCIDR string `json:"serviceCIDR" yaml:"serviceCIDR"`
SecurePort int `json:"securePort" yaml:"securePort"`
FrontProxyCertificate types.Certificate `json:"frontProxyCertificate" yaml:"frontProxyCertificate"`
FrontProxyKey types.PrivateKey `json:"frontProxyKey" yaml:"frontProxyKey"`
KubeletClientCertificate types.Certificate `json:"kubeletClientCertificate" yaml:"kubeletClientCertificate"`
KubeletClientKey types.PrivateKey `json:"kubeletClientKey" yaml:"kubeletClientKey"`
EtcdCACertificate types.Certificate `json:"etcdCACertificate" yaml:"etcdCACertificate"`
EtcdClientCertificate types.Certificate `json:"etcdClientCertificate" yaml:"etcdClientCertificate"`
EtcdClientKey types.PrivateKey `json:"etcdClientKey" yaml:"etcdClientKey"`
}
KubeAPIServer represents kube-apiserver container configuration
func (*KubeAPIServer) New ¶
func (k *KubeAPIServer) New() (container.ResourceInstance, error)
New validates KubeAPIServer configuration and populates default for some fields, if they are empty
func (*KubeAPIServer) Validate ¶
func (k *KubeAPIServer) Validate() error
Validate validates KubeAPIServer struct
TODO add validation of certificates if specified
type KubeControllerManager ¶
type KubeControllerManager struct {
Common Common `json:"common" yaml:"common"`
Host host.Host `json:"host" yaml:"host"`
Kubeconfig client.Config `json:"kubeconfig" yaml:"kubeconfig"`
KubernetesCAKey types.PrivateKey `json:"kubernetesCAKey" yaml:"kubernetesCAKey"`
ServiceAccountPrivateKey types.PrivateKey `json:"serviceAccountPrivateKey" yaml:"serviceAccountPrivateKey"`
RootCACertificate types.Certificate `json:"rootCACertificate" yaml:"rootCACertificate"`
FlexVolumePluginDir string `json:"flexVolumePluginDir" yaml:"flexVolumePluginDir"`
}
KubeControllerManager represents kube-controller-manager container configuration.
func (*KubeControllerManager) New ¶
func (k *KubeControllerManager) New() (container.ResourceInstance, error)
New validates KubeControllerManager and returns usable kubeControllerManager.
func (*KubeControllerManager) Validate ¶
func (k *KubeControllerManager) Validate() error
Validate validates KubeControllerManager configuration.
TODO add validation of certificates if specified
type KubeScheduler ¶
type KubeScheduler struct {
Common Common `json:"common" yaml:"common"`
Host host.Host `json:"host" yaml:"host"`
Kubeconfig client.Config `json:"kubeconfig" yaml:"kubeconfig"`
}
KubeScheduler represents kube-scheduler configuration data
func (*KubeScheduler) New ¶
func (k *KubeScheduler) New() (container.ResourceInstance, error)
New validates KubeScheduler struct and returns it's usable version
func (*KubeScheduler) Validate ¶
func (k *KubeScheduler) Validate() error
Validate valides kube-scheduler configuration.