tokens

package
v0.3.11-8 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: Apache-2.0 Imports: 17 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MaximumRetries = 5
)

Functions

func GetClient

func GetClient() (kubernetes.Interface, error)

func GetClusterConfig

func GetClusterConfig() (*rest.Config, error)

func GetControlPlaneEndpoint

func GetControlPlaneEndpoint() (string, error)

func GetCoreClient

func GetCoreClient() (corev1.CoreV1Interface, error)

func GetDockerDaemonContent

func GetDockerDaemonContent() (string, error)

func GetImageRegistries

func GetImageRegistries() ([]string, error)

func GetNodeJoinToken

func GetNodeJoinToken() (string, error)

func IsInsideKubernetesCluster

func IsInsideKubernetesCluster() (bool, error)

func NewBootstrap

func NewBootstrap(client corev1.SecretsGetter, ttl time.Duration) (string, error)

NewBootstrap attempts to create a token with the given ID.

func TryRunCommand

func TryRunCommand(f func() error, failureThreshold int) error

TryRunCommand runs a function a maximum of failureThreshold times, and retries on error. If failureThreshold is hit; the last error is returned

Types

type DockerDaemonConfig

type DockerDaemonConfig struct {
	Bridge             string            `json:"bridge"`
	Iptables           bool              `json:"iptables"`
	ExecOpts           []string          `json:"exec-opts"`
	DataRoot           string            `json:"data-root"`
	LogDriver          string            `json:"log-driver"`
	LogOpts            map[string]string `json:"log-opts"`
	RegistryMirrors    []string          `json:"registry-mirrors"`
	InsecureRegistries []string          `json:"insecure-registries"`
	LiveRestore        bool              `json:"live-restore"`
}

TODO: move to other packages

func GetDockerDaemonConfig

func GetDockerDaemonConfig() (*DockerDaemonConfig, error)

Jump to

Keyboard shortcuts

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