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 2021 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 2021 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 2021 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 2021 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 2021 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 2021 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 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 2021 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 2021 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 2021 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 2021 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 2021 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 2021 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 2021 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 2021 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 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 2021 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 2021 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 2021 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.
Index ¶
- type APIEndpointReconciler
- type APIServer
- type CASyncer
- type CRD
- type CSRApprover
- type Calico
- type Certificates
- type CoreDNS
- type DefaultPSP
- type DummyLeaderElector
- func (l *DummyLeaderElector) AddAcquiredLeaseCallback(fn func())
- func (l *DummyLeaderElector) AddLostLeaseCallback(fn func())
- func (l *DummyLeaderElector) Healthy() error
- func (l *DummyLeaderElector) Init() error
- func (l *DummyLeaderElector) IsLeader() bool
- func (l *DummyLeaderElector) Run() error
- func (l *DummyLeaderElector) Stop() error
- type Etcd
- type FsManifestsSaver
- type HelmAddons
- type K0SControlAPI
- type K0sLease
- type Kine
- type Konnectivity
- type KubeProxy
- type KubeletConfig
- type LeaderElector
- type Manager
- type MetricServer
- type Scheduler
- type SystemRBAC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIEndpointReconciler ¶
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 ¶
func NewEndpointReconciler(c *k0sv1beta1.ClusterConfig, leaderElector LeaderElector, kubeClientFactory k8sutil.ClientFactory) *APIEndpointReconciler
NewEndpointReconciler creates new endpoint reconciler
func (*APIEndpointReconciler) Healthy ¶
func (a *APIEndpointReconciler) Healthy() error
Healthy dummy implementation
func (*APIEndpointReconciler) Init ¶
func (a *APIEndpointReconciler) Init() error
Init initializes the APIEndpointReconciler
func (*APIEndpointReconciler) Run ¶
func (a *APIEndpointReconciler) Run() error
Run runs the main loop for reconciling the externalAddress
func (*APIEndpointReconciler) Stop ¶
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 CSRApprover ¶
type CSRApprover struct { L *logrus.Entry ClusterConfig *config.ClusterConfig KubeClientFactory kubeutil.ClientFactory // contains filtered or unexported fields }
func NewCSRApprover ¶
func NewCSRApprover(c *k0sv1beta1.ClusterConfig, leaderElector LeaderElector, kubeClientFactory k8sutil.ClientFactory) *CSRApprover
NewCSRApprover creates the CSRApprover component
func (*CSRApprover) Healthy ¶
func (a *CSRApprover) Healthy() error
func (*CSRApprover) Run ¶
func (a *CSRApprover) Run() error
Run every 10 seconds checks for newly issued CSRs and approves them
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 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 DummyLeaderElector ¶
type DummyLeaderElector struct { Leader bool // contains filtered or unexported fields }
func (*DummyLeaderElector) AddAcquiredLeaseCallback ¶
func (l *DummyLeaderElector) AddAcquiredLeaseCallback(fn func())
func (*DummyLeaderElector) AddLostLeaseCallback ¶
func (l *DummyLeaderElector) AddLostLeaseCallback(fn func())
func (*DummyLeaderElector) Healthy ¶
func (l *DummyLeaderElector) Healthy() error
func (*DummyLeaderElector) Init ¶
func (l *DummyLeaderElector) Init() error
func (*DummyLeaderElector) IsLeader ¶
func (l *DummyLeaderElector) IsLeader() bool
func (*DummyLeaderElector) Run ¶
func (l *DummyLeaderElector) Run() error
func (*DummyLeaderElector) Stop ¶
func (l *DummyLeaderElector) Stop() error
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, leaderElector LeaderElector) *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 K0sLease ¶
type K0sLease struct { ClusterConfig *config.ClusterConfig KubeClientFactory kubeutil.ClientFactory // contains filtered or unexported fields }
ControllerLease implements a component that manages a lease per controller. The per-controller leases are used to determine the amount of currently running controllers
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 // used for lease lock KubeClientFactory k8sutil.ClientFactory // contains filtered or unexported fields }
Konnectivity implements 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 ¶
type LeaderElector interface { IsLeader() bool AddAcquiredLeaseCallback(fn func()) AddLostLeaseCallback(fn func()) component.Component }
LeaderElector is the common leader elector component to manage each controller leader status
func NewLeaderElector ¶
func NewLeaderElector(c *k0sv1beta1.ClusterConfig, kubeClientFactory kubeutil.ClientFactory) LeaderElector
NewLeaderElector creates new leader elector
type Manager ¶
type Manager struct { ClusterConfig *config.ClusterConfig K0sVars constant.CfgVars LogLevel string // contains filtered or unexported fields }
Manager implement the component interface to run kube scheduler
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
Source Files ¶
- apiendpointreconciler.go
- apiserver.go
- calico.go
- casyncer.go
- certificates.go
- controllermanager.go
- coredns.go
- crd.go
- csrapprover.go
- defaultpsp.go
- dummyleaderelector.go
- etcd.go
- helmaddons.go
- k0sLease.go
- k0scontrolapi.go
- kine.go
- konnectivity.go
- kubeletconfig.go
- kubeproxy.go
- leaderelector.go
- manifests.go
- metricserver.go
- scheduler.go
- systemrbac.go