Documentation ¶
Index ¶
- Constants
- func GetRequiredPkgs(os string) []string
- func HetznerRulesWithSources(sources []string) []*firewall.RuleConfig
- type Compiled
- type Config
- type K3S
- func (k *K3S) CompileAll(token, ip, leaderIP, externalIP string) *Compiled
- func (k *K3S) Order() int
- func (k *K3S) SetOrder(order int)
- func (k *K3S) Up(ctx *program.Context, con *connection.Connection, deps []pulumi.Resource, ...) (modules.Output, error)
- func (k *K3S) WithK8SAuditLog(log *audit.AuditLog) *K3S
- func (k *K3S) WithLeaderIP(ip pulumi.StringOutput) *K3S
- func (k *K3S) WithSysInfo(info *info.Info) *K3S
- func (k *K3S) WithToken(token pulumi.StringOutput) *K3S
- type K3sConfig
- type Outputs
- type Provisioned
Constants ¶
View Source
const (
// ManagedLabel is a label for node Label. Used for internal purposes.
NodeManagedLabel = "phkh.io/managed=true"
)
Variables ¶
This section is empty.
Functions ¶
func GetRequiredPkgs ¶
func HetznerRulesWithSources ¶
func HetznerRulesWithSources(sources []string) []*firewall.RuleConfig
Types ¶
type Config ¶
type Config struct { // version is used to determine if k3s should be upgraded if auto-upgrade is disabled. // If the version is changed, k3s will be upgraded. Version string // [Experimental] clean-data-on-upgrade is used to delete all data while upgrade. // This is based on the script https://docs.k3s.io/upgrades/killall CleanDataOnUpgrade bool `json:"clean-data-on-upgrade" yaml:"clean-data-on-upgrade,omitempty"` // The real config of k3s service. K3S *K3sConfig `json:"config" yaml:"config"` }
type K3S ¶
type K3S struct { ID string OS info.OSInfo Sys *info.Info Config *Config // contains filtered or unexported fields }
func (*K3S) CompileAll ¶
CompleteConfig completes k3s config with pulumi.Outputs values.
func (*K3S) Up ¶
func (k *K3S) Up(ctx *program.Context, con *connection.Connection, deps []pulumi.Resource, payload []interface{}) (modules.Output, error)
func (*K3S) WithLeaderIP ¶
func (k *K3S) WithLeaderIP(ip pulumi.StringOutput) *K3S
type K3sConfig ¶
type K3sConfig struct { // Token used for nodes to join the cluster, generated automatically. Token string `json:"-" yaml:"token"` // Server specifies the address of the main server node (leader) in the cluster, generated automatically. Server string `json:"-" yaml:"server,omitempty"` // FlannelIface specifies the network interface that Flannel should use. FlannelIface string `json:"-" yaml:"flannel-iface,omitempty"` // WriteKubeconfigMode defines the file permission mode for the kubeconfig file on disk. WriteKubeconfigMode string `json:"-" yaml:"write-kubeconfig-mode,omitempty"` // AdvertiseAddr specifies the IP address that the server uses to advertise to members of the cluster. AdvertiseAddr string `json:"-" yaml:"advertise-address,omitempty"` // NodeIP specifies the IP address to advertise for this node. NodeIP string `json:"-" yaml:"node-ip,omitempty"` // BindAddress is the IP address that the server should bind to for API server traffic. BindAddress string `json:"-" yaml:"bind-address,omitempty"` // ClusterInit indicates whether this node should initialize a new cluster. ClusterInit bool `json:"-" yaml:"cluster-init,omitempty"` // ExternalNodeIP specifies the external IP address of the node. ExternalNodeIP string `json:"-" yaml:"node-external-ip,omitempty"` // TLSSanSecurity enables or disables the addition of TLS SANs (Subject Alternative Names). TLSSanSecurity bool `json:"-" yaml:"tls-san-security,omitempty"` // TLSSan adds specific TLS SANs for securing communication to the K3s server. TLSSan string `json:"-" yaml:"tls-san,omitempty"` // NodeName specifies the name of the node within the cluster. NodeName string `json:"-" yaml:"node-name,omitempty"` // ClusterCidr defines the IP range from which pod IPs shall be allocated. // Default is 10.141.0.0/16. ClusterCidr string `json:"cluster-cidr" yaml:"cluster-cidr,omitempty"` // ServiceCidr defines the IP range from which service cluster IPs are allocated. // Default is 10.140.0.0/16. ServiceCidr string `json:"service-cidr" yaml:"service-cidr,omitempty"` // ClusterDomain specifies the domain name of the cluster. ClusterDomain string `json:"cluster-domain" yaml:"cluster-domain,omitempty"` // ClusterDNS specifies the IP address of the DNS service within the cluster. // Default is autopicked. ClusterDNS string `json:"cluster-dns" yaml:"cluster-dns,omitempty"` // FlannelBackend determines the type of backend used for Flannel, a networking solution. FlannelBackend string `json:"flannel-backend" yaml:"flannel-backend,omitempty"` // DisableNetworkPolicy determines whether to disable network policies. DisableNetworkPolicy bool `json:"disable-network-policy" yaml:"disable-network-policy,omitempty"` // KubeletArgs allows passing additional arguments to the kubelet service. KubeletArgs []string `json:"kubelet-arg" yaml:"kubelet-arg,omitempty"` // KubeControllerManagerArgs allows passing additional arguments to the Kubernetes controller manager. KubeControllerManagerArgs []string `json:"kube-controller-manager-arg" yaml:"kube-controller-manager-arg,omitempty"` // KubeCloudControllerManagerArgs allows passing additional arguments to the Kubernetes cloud controller manager. KubeCloudControllerManagerArgs []string `json:"kube-cloud-controller-manager-arg" yaml:"kube-cloud-controller-manager-arg,omitempty"` // KubeAPIServerArgs allows passing additional arguments to the Kubernetes API server. KubeAPIServerArgs []string `json:"kube-apiserver-arg" yaml:"kube-apiserver-arg,omitempty"` // DisableCloudController determines whether to disable the integrated cloud controller manager. // Default is false, but will be true if ccm is enabled. DisableCloudController bool `json:"disable-cloud-controller" yaml:"disable-cloud-controller,omitempty"` // Disable lists components or features to disable. Disable []string `yaml:"disable,omitempty"` // NodeLables set labels on registration NodeLabels []string `json:"node-label" yaml:"node-label,omitempty"` // NodeTaints are used to taint the node with key=value:effect. // By default, server node is tainted with a couple of taints if number of agents nodes more than 0. NodeTaints []string `json:"node-taint" yaml:"node-taint,omitempty"` }
func (*K3sConfig) WithServerDefaults ¶
func (*K3sConfig) WithoutDuplicates ¶
type Provisioned ¶
type Provisioned struct { Outputs *Outputs // contains filtered or unexported fields }
func (*Provisioned) Resources ¶
func (p *Provisioned) Resources() []pulumi.Resource
func (*Provisioned) Value ¶
func (p *Provisioned) Value() interface{}
Click to show internal directories.
Click to hide internal directories.