shared

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvDataPath           = "KOTAL_DATA_PATH"
	EnvConfigPath         = "KOTAL_CONFIG_PATH"
	EnvSecretsPath        = "KOTAL_SECRETS_PATH"
	EnvUseExistingCluster = "USE_EXISTING_CLUSTER"
)
View Source
const (
	// BlockchainDataSubDir is the blockchain data sub directory
	BlockchainDataSubDir = "kotal-data"
	// SecretsSubDir is the secrets (private keys, password ... etc) sub directory
	SecretsSubDir = ".kotal-secrets"
	// ConfigSubDir is the configuration sub directory
	ConfigSubDir = "kotal-config"
)
View Source
const (
	// BusyboxImage is the busybox images used by init containers
	BusyboxImage = "busybox:1.34.1"
)

Variables

This section is empty.

Functions

func GetSecret

func GetSecret(ctx context.Context, client client.Client, name types.NamespacedName, key string) (value string, err error)

GetSecret returns k8s secret stored at key

func Host added in v0.2.0

func Host(toggle bool) string

Host returns localhost if toggle is not enabled otherwise returns the wildcard address

func IgnoreConflicts added in v0.2.0

func IgnoreConflicts(err *error)

IgnoreConflicts ignore conflict errors

func IsWebhookEnabled

func IsWebhookEnabled() bool

IsWebhookEnabled checks if webhooks are enabled

func PathConfig

func PathConfig(homeDir string) string

PathConfig returns configuration directory

func PathData

func PathData(homeDir string) string

PathData returns blockchain data directory

func PathSecrets

func PathSecrets(homeDir string) string

PathSecrets returns secrets directory

func SecurityContext

func SecurityContext() *corev1.PodSecurityContext

SecurityContext is the pod security policy used by all containers

func UpdateLabels

func UpdateLabels(cr CustomResource, client, network string)

UpdateLabels adds missing labels to the resource

Types

type CustomResource

type CustomResource interface {
	GroupVersionKind() schema.GroupVersionKind
	GetName() string
	SetLabels(map[string]string)
	GetLabels() map[string]string
}

Jump to

Keyboard shortcuts

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