config

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// namespace which owns the lock object.
	DefaultLockObjectNamespace = "kube-system"

	// object name of the lock object.
	DefaultLockObjectName = "ingress-serverscom-lock"

	// leader election default lease duration
	LeDefaultLeaseDuration = 15 * time.Second

	// leader election default renew deadline
	LeDefaultRenewDeadline = 10 * time.Second

	// leader election default retry period
	LeDefaultRetryPeriod = 2 * time.Second
)
View Source
const (
	DefaultSCApiUrl = "https://api.servers.com/v1"
)

Variables

This section is empty.

Functions

func DefaultLeaderElectionConfiguration

func DefaultLeaderElectionConfiguration() *k8sconfig.LeaderElectionConfiguration

DefaultLeaderElectionConfiguration returns default config for leader election

func FetchEnv

func FetchEnv(key string, defaultValue ...string) string

FetchEnv gets var from env or use first default value

func NewCubeClient

func NewCubeClient(configFile string) (*kubernetes.Clientset, error)

NewCubeClient creates a new k8s clientset

func NewServerscomClient

func NewServerscomClient() (*serverscom.Client, error)

NewServerscomClient creates a new SC client to interact with SC public api

Types

This section is empty.

Jump to

Keyboard shortcuts

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