kubernetes

package
v0.0.0-...-fc17aaa Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceAccount = "/var/run/secrets/kubernetes.io/serviceaccount"

Variables

This section is empty.

Functions

func GetNamespace

func GetNamespace() string

GetNamespace get k8s namespace

func GetPodName

func GetPodName() string

GetPodName get k8s pod name

func LoadNamespace

func LoadNamespace() string

func NewK8sClientset

func NewK8sClientset(opts ...Option) (*kubernetes.Clientset, error)

func NewKubernetesConfig

func NewKubernetesConfig(cli *kubernetes.Clientset, opts ...Option) (hconf.DataSource, error)

func NewOptions

func NewOptions(opts ...Option) *options

Types

type Option

type Option func(*options)

func KubeConfigPath

func KubeConfigPath(kubeConfigPath string) Option

func KubeMasterUrl

func KubeMasterUrl(masterUrl string) Option

func WithContext

func WithContext(ctx context.Context) Option

func WithNamespace

func WithNamespace(namespace string) Option

func WithPaths

func WithPaths(path ...string) Option

Jump to

Keyboard shortcuts

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