util

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ServiceAccountTokenFilepath is the default path to the service account token file in Kubernetes
	ServiceAccountTokenFilepath = "/var/run/secrets/kubernetes.io/serviceaccount/token"
)

Variables

This section is empty.

Functions

func GetCert

func GetCert(filepath string) (*x509.CertPool, error)

GetCert creates a new x509.CertPool and adds the system's default CA certificates and the CA certificate from the specified file.

func IsRunningInCluster

func IsRunningInCluster() bool

IsRunningInCluster checks if the application is running inside a Kubernetes cluster. It does this by checking for the existence of the service account token file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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