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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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