kubernetes

package
v0.0.0-...-dca2ff9 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceAccountPath      = "/var/run/secrets/kubernetes.io/serviceaccount"
	ServiceAccountTokenPath = ServiceAccountPath + "/token"
)

Kubernetes constants

Variables

This section is empty.

Functions

func GetBearerToken

func GetBearerToken(authTokenPath string) (string, error)

GetBearerToken reads the serviceaccount token

func GetCertificateAuthority

func GetCertificateAuthority(certPath string) (*x509.CertPool, error)

GetCertificateAuthority loads the issuing certificate authority

func GetCertificates

func GetCertificates(certFilePath, keyFilePath string) ([]tls.Certificate, error)

GetCertificates loads the certificate and the private key

func IsServiceAccountTokenAvailable

func IsServiceAccountTokenAvailable() bool

IsServiceAccountTokenAvailable returns if a service account token is available on disk

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