config

package
v0.1.0-rc8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportClusterConfiguration

func ExportClusterConfiguration(ctx context.Context, fullState *cluster.FullState, nodeName string, server bool, registries []string) error

func ExportKubeProxyConfig

func ExportKubeProxyConfig(fullState *cluster.FullState, dataDir string) error

func MigrateAddonsConfig

func MigrateAddonsConfig(ctx context.Context, fullState *cluster.FullState, dataDir string) error

MigrateAddonsConfig should read the addons configuration and copy it as a helm chart config to RKE2 and then save it to the manifest dir.

func MigrateCNIConfig

func MigrateCNIConfig(ctx context.Context, fullState *cluster.FullState, dataDir string) error

MigrateCNIConfig should read the cni plugin specific configuration and copy it as a helm chart config to RKE2 and then save it to the manifest dir, this currently only works for canal installation because calico tigera operator doesnt contain a lot of customization

func RemoveOldAddons

func RemoveOldAddons(ctx context.Context, dataDir string) error

Types

type AutoScalerConfig

type AutoScalerConfig struct {
	PriorityClassName         string          `json:"priorityClassName,omitempty"`
	Tolerations               []v1.Toleration `json:"tolerations,omitempty"`
	CoresPerReplica           float64         `json:"coresPerReplica,omitempty"`
	NodesPerReplica           float64         `json:"nodesPerReplica,omitempty"`
	Min                       int             `json:"min,omitempty"`
	Max                       int             `json:"max,omitempty"`
	PreventSinglePointFailure bool            `json:"preventSinglePointFailure,omitempty"`
	Enabled                   bool            `json:"enabled,omitempty"`
}

type CalicoConfig

type CalicoConfig struct {
	Installation CalicoInstallationSpec `json:"installation,omitempty"`
}

type CalicoInstallationSpec

type CalicoInstallationSpec struct {
	// we only copy the mtu config from rke1 so we only need a map of string to integer
	CalicoNetwork            map[string]int    `json:"calicoNetwork,omitempty"`
	FlexVolumePath           string            `json:"flexVolumePath,omitempty"`
	ControlPlaneNodeSelector map[string]string `json:"controlPlaneNodeSelector,omitempty"`
}

type CanalConfig

type CanalConfig struct {
	Calico  map[string]string `json:"calico,omitempty"`
	Flannel map[string]string `json:"flannel,omitempty"`
}

type CoreDNSConfig

type CoreDNSConfig struct {
	PriorityClassName string                          `json:"priorityClassName,omitempty"`
	NodeSelector      map[string]string               `json:"nodeSelector,omitempty"`
	RollingUpdate     *appsv1.RollingUpdateDeployment `json:"rollingUpdate,omitempty"`
	RBAC              RBACConfig                      `json:"rbac,omitempty"`
	Tolerations       []v1.Toleration                 `json:"tolerations,omitempty"`
	AutoScalerConfig  AutoScalerConfig                `json:"autoscaler,omitempty"`
}

type DefaultBackendConfig

type DefaultBackendConfig struct {
	PriorityClassName string `json:"priorityClassName,omitempty"`
	Enabled           bool   `json:"enabled,omitempty"`
}

type IngressConfig

type IngressConfig struct {
	ControllerConfig IngressControllerConfig `json:"controller,omitempty"`
	DefaultBackend   DefaultBackendConfig    `json:"defaultBackend,omitempty"`
}

type IngressControllerConfig

type IngressControllerConfig struct {
	Config            map[string]string               `json:"config,omitempty"`
	NodeSelector      map[string]string               `json:"nodeSelector,omitempty"`
	ExtraArgs         map[string]string               `json:"extraArgs,omitempty"`
	ExtraEnvs         []types.ExtraEnv                `json:"extraEnvs,omitempty"`
	ExtraVolumes      []types.ExtraVolume             `json:"extraVolumes,omitempty"`
	ExtraVolumeMounts []types.ExtraVolumeMount        `json:"extraVolumeMounts,omitempty"`
	DNSPolicy         string                          `json:"dnsPolicy,omitempty"`
	UpdateStrategy    *appsv1.DaemonSetUpdateStrategy `json:"updateStrategy,omitempty"`
	HostPorts         IngressHostPorts                `json:"hostPort,omitempty"`
	HostNetwork       bool                            `json:"HostNetwork,omitempty"`
	Tolerations       []v1.Toleration                 `json:"tolerations,omitempty"`
	PriorityClassName string                          `json:"priorityClassName,omitempty"`
}

type IngressHostPorts

type IngressHostPorts struct {
	Ports IngressPorts `json:"ports,omitempty"`
}

type IngressPorts

type IngressPorts struct {
	HTTPPort  int `json:"http,omitempty"`
	HTTPSPort int `json:"https,omitempty"`
}

type MetricsServerConfig

type MetricsServerConfig struct {
	PriorityClassName string            `json:"priorityClassName,omitempty"`
	RBAC              RBACConfig        `json:"rbac,omitempty"`
	Args              []string          `json:"args,omitempty"`
	NodeSelector      map[string]string `json:"nodeSelector,omitempty"`
	Replicas          int               `json:"replicas,omitempty"`
	Tolerations       []v1.Toleration   `json:"tolerations,omitempty"`
}

type RBACConfig

type RBACConfig struct {
	Create bool `json:"create,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL