Documentation
¶
Index ¶
- type Blockd
- type BootDevice
- type CRT
- type CommonServiceOptions
- type Env
- type File
- type Init
- type Install
- type InstallDevice
- type Kubeadm
- type Kubelet
- type KubernetesSecurity
- type NTPd
- type Networking
- type OSD
- type OSSecurity
- type Proxyd
- type RootDevice
- type Security
- type Services
- type Trustd
- type UserData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blockd ¶
type Blockd struct {
CommonServiceOptions `yaml:",inline"`
}
Blockd describes the configuration of the blockd service.
type BootDevice ¶
type BootDevice struct {
InstallDevice `yaml:",inline"`
Kernel string `yaml:"kernel"`
Initramfs string `yaml:"initramfs"`
}
BootDevice represents the install options specific to the boot partition.
type CRT ¶
type CRT struct {
CommonServiceOptions `yaml:",inline"`
}
CRT describes the configuration of the container runtime service.
type CommonServiceOptions ¶
type CommonServiceOptions struct {
Env Env `yaml:"env,omitempty"`
}
CommonServiceOptions represents the set of options common to all services.
type File ¶
type File struct {
Contents string `yaml:"contents"`
Permissions os.FileMode `yaml:"permissions"`
Path string `yaml:"path"`
}
File represents a file to write to disk.
type Init ¶
type Init struct {
CNI string `yaml:"cni,omitempty"`
}
Init describes the configuration of the init service.
type Install ¶
type Install struct {
Boot *BootDevice `yaml:"boot,omitempty"`
Root *RootDevice `yaml:"root"`
Data *InstallDevice `yaml:"data,omitempty"`
Wipe bool `yaml:"wipe"`
Force bool `yaml:"force"`
}
Install represents the installation options for preparing a node.
type InstallDevice ¶
type InstallDevice struct {
Device string `yaml:"device,omitempty"`
Size uint `yaml:"size,omitempty"`
}
InstallDevice represents the specific directions for each partition.
type Kubeadm ¶
type Kubeadm struct {
CommonServiceOptions `yaml:",inline"`
// ConfigurationStr is converted to Configuration and back in Marshal/UnmarshalYAML
Configuration runtime.Object `yaml:"-"`
ConfigurationStr string `yaml:"configuration"`
ExtraArgs []string `yaml:"extraArgs,omitempty"`
CertificateKey string `yaml:"certificateKey,omitempty"`
IgnorePreflightErrors []string `yaml:"ignorePreflightErrors,omitempty"`
// contains filtered or unexported fields
}
Kubeadm describes the set of configuration options available for kubeadm.
func (*Kubeadm) MarshalYAML ¶
MarshalYAML implements the yaml.Marshaler interface.
func (*Kubeadm) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.
type Kubelet ¶
type Kubelet struct {
CommonServiceOptions `yaml:",inline"`
}
Kubelet describes the configuration of the kubelet service.
type KubernetesSecurity ¶
type KubernetesSecurity struct {
CA *x509.PEMEncodedCertificateAndKey `yaml:"ca"`
}
KubernetesSecurity represents the set of security options specific to Kubernetes.
type NTPd ¶
type NTPd struct {
CommonServiceOptions `yaml:",inline"`
Server string `yaml:"server,omitempty"`
}
NTPd describes the configuration of the ntp service.
type Networking ¶
type Networking struct {
OS struct{} `yaml:"os"`
Kubernetes struct{} `yaml:"kubernetes"`
}
Networking represents the set of options available to configure networking.
type OSD ¶
type OSD struct {
CommonServiceOptions `yaml:",inline"`
}
OSD describes the configuration of the osd service.
type OSSecurity ¶
type OSSecurity struct {
CA *x509.PEMEncodedCertificateAndKey `yaml:"ca"`
Identity *x509.PEMEncodedCertificateAndKey `yaml:"identity"`
}
OSSecurity represents the set of security options specific to the OS.
type Proxyd ¶
type Proxyd struct {
CommonServiceOptions `yaml:",inline"`
}
Proxyd describes the configuration of the proxyd service.
type RootDevice ¶
type RootDevice struct {
InstallDevice `yaml:",inline"`
Rootfs string `yaml:"rootfs"`
}
RootDevice represents the install options specific to the root partition.
type Security ¶
type Security struct {
OS *OSSecurity `yaml:"os"`
Kubernetes *KubernetesSecurity `yaml:"kubernetes"`
}
Security represents the set of options available to configure security.
type Services ¶
type Services struct {
Init *Init `yaml:"init"`
Kubelet *Kubelet `yaml:"kubelet"`
Kubeadm *Kubeadm `yaml:"kubeadm"`
Trustd *Trustd `yaml:"trustd"`
Proxyd *Proxyd `yaml:"proxyd"`
Blockd *Blockd `yaml:"blockd"`
OSD *OSD `yaml:"osd"`
CRT *CRT `yaml:"crt"`
NTPd *NTPd `yaml:"ntp"`
}
Services represents the set of services available to configure.
type Trustd ¶
type Trustd struct {
CommonServiceOptions `yaml:",inline"`
Username string `yaml:"username"`
Password string `yaml:"password"`
Endpoints []string `yaml:"endpoints,omitempty"`
CertSANs []string `yaml:"certSANs,omitempty"`
BootstrapNode string `yaml:"bootstrapNode,omitempty"`
}
Trustd describes the configuration of the Root of Trust (RoT) service. The username and password are used by master nodes, and worker nodes. The master nodes use them to authenticate clients, while the workers use them to authenticate as a client. The endpoints should only be specified in the worker user data, and should include all master nodes participating as a RoT.
type UserData ¶
type UserData struct {
Version string `yaml:"version"`
Security *Security `yaml:"security"`
Networking *Networking `yaml:"networking"`
Services *Services `yaml:"services"`
Files []*File `yaml:"files"`
Debug bool `yaml:"debug"`
Env Env `yaml:"env,omitempty"`
Install *Install `yaml:"install,omitempty"`
}
UserData represents the user data.
func (*UserData) IsBootstrap ¶
IsBootstrap indicates if the current kubeadm configuration is a master init configuration.
func (*UserData) IsControlPlane ¶
IsControlPlane indicates if the current kubeadm configuration is a worker acting as a master.
func (*UserData) IsMaster ¶
IsMaster indicates if the current kubeadm configuration is a master configuration.
func (*UserData) IsWorker ¶
IsWorker indicates if the current kubeadm configuration is a worker configuration.
func (*UserData) NewIdentityCSR ¶
func (data *UserData) NewIdentityCSR() (csr *x509.CertificateSigningRequest, err error)
NewIdentityCSR creates a new CSR for the node's identity certificate.
func (*UserData) WriteFiles ¶
WriteFiles writes the requested files to disk.