util

package
v0.13.5 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServiceAccountNamespaceFile = "/var/run/secrets/kubernetes.io/serviceaccount/namespace"

Functions

func GetCurrentNS

func GetCurrentNS() (string, error)

GetCurrentNS fetch namespace the current pod running in. reference to client-go (config *inClusterClientConfig) Namespace() (string, bool, error).

func GetCurrentNSOrDefault

func GetCurrentNSOrDefault() string

func GetCurrentRunningPodName added in v0.9.0

func GetCurrentRunningPodName() string

func IsExist added in v0.9.0

func IsExist(filepath string) bool

func NewCertManager added in v0.9.0

func NewCertManager(
	Orz []string,
	effectiveTime time.Duration,
	dnsNames []string,
	commonName string,
) *certManager

func NewSchema

func NewSchema() *runtime.Scheme

NewSchema returns a singleton schema set which aggregated Kubernetes's schemes and extended schemes.

func UpdateOwnReference added in v0.8.2

func UpdateOwnReference(client kubernetes.Interface, configMapList []*apis.ConfigMapRef, secretList []*apis.SecretRef, belongToReference metav1.OwnerReference) error

func WriteFile added in v0.9.0

func WriteFile(filepath string, bytes []byte) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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