Documentation ¶
Overview ¶
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.
Index ¶
Constants ¶
const ( // NameLabel stack label NameLabel = "k0s.k0sproject.io/stack" // ChecksumAnnotation defines the annotation key to used for stack checksums ChecksumAnnotation = "k0s.k0sproject.io/stack-checksum" // LastConfigAnnotation defines the annotation to be used for last applied configs LastConfigAnnotation = "k0s.k0sproject.io/last-applied-configuration" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Applier ¶
Applier manages all the "static" manifests and applies them on the k8s API
func NewApplier ¶
func NewApplier(dir string, kubeClientFactory kubernetes.ClientFactory) Applier
NewApplier creates new Applier
type Manager ¶
type Manager struct { K0sVars constant.CfgVars KubeClientFactory kubeutil.ClientFactory // contains filtered or unexported fields }
Manager is the Component interface wrapper for Applier
type Stack ¶
type Stack struct { Name string Resources []*unstructured.Unstructured Client dynamic.Interface Discovery discovery.CachedDiscoveryInterface // contains filtered or unexported fields }
Stack is a k8s resource bundle
type StackApplier ¶
type StackApplier struct { Path string // contains filtered or unexported fields }
StackApplier handles each directory as a Stack and watches for changes
func NewStackApplier ¶
func NewStackApplier(path string, kubeClientFactory kubernetes.ClientFactory) (*StackApplier, error)
NewStackApplier crates new stack applier to manage a stack
func (*StackApplier) DeleteStack ¶
func (s *StackApplier) DeleteStack() error
DeleteStack deletes the associated stack
func (*StackApplier) Start ¶
func (s *StackApplier) Start() error
Start both the initial apply and also the watch for a single stack
func (*StackApplier) Stop ¶
func (s *StackApplier) Stop() error
Stop stops the stack applier and removes the stack