install

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

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.

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.

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.

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

This section is empty.

Variables

This section is empty.

Functions

func CreateControllerUsers added in v0.11.0

func CreateControllerUsers(clusterConfig *v1beta1.ClusterConfig, k0sVars constant.CfgVars) error

CreateControllerUsers accepts a cluster config, and cfgVars and creates controller users accordingly

func CreateUser

func CreateUser(userName string, homeDir string, shell string) error

CreateUser creates a system user with either `adduser` or `useradd` command

func DeleteControllerUsers added in v0.11.0

func DeleteControllerUsers(clusterConfig *v1beta1.ClusterConfig) error

CreateControllerUsers accepts a cluster config, and cfgVars and creates controller users accordingly

func DeleteUser added in v0.11.0

func DeleteUser(userName string) error

DeleteUser deletes system users with either `deluser` or `userdel` command

func EnsureService

func EnsureService(args []string) error

EnsureService installs the k0s service, per the given arguments, and the detected platform

func EnsureUser

func EnsureUser(name string, homeDir string) error

EnsureUser checks if a user exists, and creates it, if it doesn't TODO: we should also consider modifying the user, if the user exists, but with wrong settings

func GetRoleByPID added in v0.11.0

func GetRoleByPID(pid int) (role string, err error)

func GetRoleByStagedKubelet added in v0.11.0

func GetRoleByStagedKubelet(binPath string) string

This function attempts to find out the host role, by staged binaries

func GetSysInit added in v0.10.0

func GetSysInit(role string) (sysInitPlatform string, stubFile string, err error)

GetSysInit returns the sys init platform name, and the stub file path for a system

func UninstallService added in v0.11.0

func UninstallService(role string) error

Types

type CleanUpConfig added in v0.11.0

type CleanUpConfig struct {
	// contains filtered or unexported fields
}

func NewCleanUpConfig added in v0.11.0

func NewCleanUpConfig(dataDir string) *CleanUpConfig

func (*CleanUpConfig) RemoveAllDirectories added in v0.11.0

func (c *CleanUpConfig) RemoveAllDirectories() error

func (*CleanUpConfig) WorkerCleanup added in v0.11.0

func (c *CleanUpConfig) WorkerCleanup() error

type K0sStatus added in v0.13.0

type K0sStatus struct {
	Version  string
	Pid      int
	PPid     int
	Role     string
	SysInit  string
	StubFile string
	Output   string
}

func GetPid added in v0.13.0

func GetPid() (status *K0sStatus, err error)

func (K0sStatus) GetK0sVersion added in v0.13.0

func (s K0sStatus) GetK0sVersion() (string, error)

func (K0sStatus) String added in v0.13.0

func (s K0sStatus) String()

Jump to

Keyboard shortcuts

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