Documentation ¶
Overview ¶
Copyright 2020 k0s authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Mirantis, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Mirantis, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Mirantis, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Mirantis, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Mirantis, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Mirantis, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Mirantis, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Mirantis, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Mirantis, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Mirantis, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Mirantis, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Mirantis, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Mirantis, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 k0s authors ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Mirantis, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Mirantis, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Mirantis, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type APIEndpointReconciler
- type APIServer
- type CASyncer
- type CRD
- type Calico
- type Certificates
- type ControllerManager
- type CoreDNS
- type DefaultPSP
- type Etcd
- type FsManifestsSaver
- type HelmAddons
- type K0SControlAPI
- type Kine
- type Konnectivity
- type KubeProxy
- type KubeletConfig
- type LeaderElector
- type MetricServer
- type Scheduler
- type SystemRBAC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIEndpointReconciler ¶ added in v0.9.0
type APIEndpointReconciler struct { ClusterConfig *config.ClusterConfig L *logrus.Entry // contains filtered or unexported fields }
APIEndpointReconciler is the component to reconcile in-cluster API address endpoint based from externalName
func NewEndpointReconciler ¶ added in v0.9.0
func NewEndpointReconciler(c *k0sv1beta1.ClusterConfig, leaderElector LeaderElector, kubeClientFactory k8sutil.ClientFactory) *APIEndpointReconciler
NewEndpointReconciler creates new endpoint reconciler
func (*APIEndpointReconciler) Healthy ¶ added in v0.9.0
func (a *APIEndpointReconciler) Healthy() error
Healthy dummy implementation
func (*APIEndpointReconciler) Init ¶ added in v0.9.0
func (a *APIEndpointReconciler) Init() error
Init initializes the APIEndpointReconciler
func (*APIEndpointReconciler) Run ¶ added in v0.9.0
func (a *APIEndpointReconciler) Run() error
Run runs the main loop for reconciling the externalAddress
func (*APIEndpointReconciler) Stop ¶ added in v0.9.0
func (a *APIEndpointReconciler) Stop() error
Stop stops the reconciler
type APIServer ¶
type APIServer struct { ClusterConfig *config.ClusterConfig K0sVars constant.CfgVars LogLevel string Storage component.Component // contains filtered or unexported fields }
APIServer implement the component interface to run kube api
type CASyncer ¶
type CASyncer struct { JoinClient *v1beta1.JoinClient K0sVars constant.CfgVars }
CASyncer is the Component implementation to sync CAs between multiple controllers
type CRD ¶
type CRD struct {
// contains filtered or unexported fields
}
CRD unpacks bundled CRD definitions to the filesystem
type Calico ¶
type Calico struct {
// contains filtered or unexported fields
}
Calico is the Component interface implementation to manage Calico
type Certificates ¶
type Certificates struct { CACert string CertManager certificate.Manager ClusterSpec *config.ClusterSpec K0sVars constant.CfgVars }
Certificates is the Component implementation to manage all k0s certs
func (*Certificates) Init ¶
func (c *Certificates) Init() error
Init initializes the certificate component
func (*Certificates) Run ¶
func (c *Certificates) Run() error
Run does nothing, the cert component only needs to be initialized
func (*Certificates) Stop ¶
func (c *Certificates) Stop() error
Stop does nothing, the cert component is not constantly running
type ControllerManager ¶
type ControllerManager struct { ClusterConfig *config.ClusterConfig K0sVars constant.CfgVars LogLevel string // contains filtered or unexported fields }
ControllerManager implement the component interface to run kube scheduler
func (*ControllerManager) Healthy ¶
func (a *ControllerManager) Healthy() error
Health-check interface
func (*ControllerManager) Init ¶
func (a *ControllerManager) Init() error
Init extracts the needed binaries
func (*ControllerManager) Run ¶
func (a *ControllerManager) Run() error
Run runs kube ControllerManager
func (*ControllerManager) Stop ¶
func (a *ControllerManager) Stop() error
Stop stops ControllerManager
type CoreDNS ¶
CoreDNS is the component implementation to manage CoreDNS
func NewCoreDNS ¶
func NewCoreDNS(clusterConfig *config.ClusterConfig, k0sVars constant.CfgVars, clientFactory k8sutil.ClientFactory) (*CoreDNS, error)
NewCoreDNS creates new instance of CoreDNS component
type DefaultPSP ¶
type DefaultPSP struct {
// contains filtered or unexported fields
}
DefaultPSP implements system RBAC reconciler
It always creates two sets of PSP rules: - 00-k0s-privileged: allows "privileged" stuff (host namespaces, privileged etc.) to be running - 99-k0s-restricted: more restricted rules, usually suitable for "normal" workloads
Depending on user config, we select either of the above rule sets to be the default
func NewDefaultPSP ¶
func NewDefaultPSP(clusterSpec *config.ClusterSpec, k0sVars constant.CfgVars) (*DefaultPSP, error)
NewDefaultPSP creates new system level RBAC reconciler
type Etcd ¶
type Etcd struct { CertManager certificate.Manager Config *config.EtcdConfig Join bool JoinClient *v1beta1.JoinClient K0sVars constant.CfgVars LogLevel string // contains filtered or unexported fields }
Etcd implement the component interface to run etcd
type FsManifestsSaver ¶
type FsManifestsSaver struct {
// contains filtered or unexported fields
}
FsManifestsSaver saves all given manifests under the specified root dir
func NewManifestsSaver ¶
func NewManifestsSaver(dir string, dataDir string) (*FsManifestsSaver, error)
NewManifestsSaver builds new filesystem manifests saver
type HelmAddons ¶
type HelmAddons struct { Client clientset.ChartV1Beta1Interface ClusterConfig *k0sv1beta1.ClusterConfig L *logrus.Entry // contains filtered or unexported fields }
Helm watch for Chart crd
func NewHelmAddons ¶
func NewHelmAddons(c *k0sv1beta1.ClusterConfig, s manifestsSaver, k0sVars constant.CfgVars, kubeClientFactory kubeutil.ClientFactory) *HelmAddons
NewHelmAddons builds new HelmAddons
func (*HelmAddons) CrdControlLoop ¶
func (h *HelmAddons) CrdControlLoop()
type K0SControlAPI ¶
type K0SControlAPI struct { ConfigPath string ClusterConfig *config.ClusterConfig K0sVars constant.CfgVars // contains filtered or unexported fields }
K0SControlAPI implements the k0s control API component
func (*K0SControlAPI) Healthy ¶
func (m *K0SControlAPI) Healthy() error
Healthy for health-check interface
func (*K0SControlAPI) Run ¶
func (m *K0SControlAPI) Run() error
Run runs k0s control api as separate process
type Kine ¶
type Kine struct { Config *config.KineConfig K0sVars constant.CfgVars // contains filtered or unexported fields }
Kine implement the component interface to run kine
type Konnectivity ¶
type Konnectivity struct { ClusterConfig *config.ClusterConfig K0sVars constant.CfgVars LogLevel string // contains filtered or unexported fields }
Konnectivity implement the component interface of konnectivity server
type KubeProxy ¶
KubeProxy is the component implementation to manage kube-proxy
func NewKubeProxy ¶
NewKubeProxy creates new KubeProxy component
type KubeletConfig ¶
type KubeletConfig struct {
// contains filtered or unexported fields
}
KubeletConfig is the reconciler for generic kubelet configs
func NewKubeletConfig ¶
func NewKubeletConfig(clusterSpec *config.ClusterSpec, k0sVars constant.CfgVars) (*KubeletConfig, error)
NewKubeletConfig creates new KubeletConfig reconciler
func (*KubeletConfig) Run ¶
func (k *KubeletConfig) Run() error
Run dumps the needed manifest objects
func (*KubeletConfig) Stop ¶
func (k *KubeletConfig) Stop() error
Stop does nothign, nothing actually running
type LeaderElector ¶ added in v0.9.0
LeaderElector is the common leader elector component to manage each controller leader status
func NewLeaderElector ¶ added in v0.9.0
func NewLeaderElector(c *k0sv1beta1.ClusterConfig, kubeClientFactory kubeutil.ClientFactory) LeaderElector
NewLeaderElector creates new leader elector
type MetricServer ¶
MetricServer is the reconciler implementation for metrics server
func NewMetricServer ¶
func NewMetricServer(clusterConfig *config.ClusterConfig, k0sVars constant.CfgVars, kubeClientFactory k8sutil.ClientFactory) (*MetricServer, error)
NewMetricServer creates new MetricServer reconciler
func (*MetricServer) Healthy ¶
func (m *MetricServer) Healthy() error
Healthy is the health-check interface
type Scheduler ¶
type Scheduler struct { ClusterConfig *config.ClusterConfig K0sVars constant.CfgVars LogLevel string // contains filtered or unexported fields }
Scheduler implement the component interface to run kube scheduler
type SystemRBAC ¶
type SystemRBAC struct {
// contains filtered or unexported fields
}
SystemRBAC implements system RBAC reconciler
func NewSystemRBAC ¶
func NewSystemRBAC(manifestDir string) (*SystemRBAC, error)
NewSystemRBAC creates new system level RBAC reconciler
func (*SystemRBAC) Run ¶
func (s *SystemRBAC) Run() error
Run reconciles the k0s related system RBAC rules