k8s

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package k8s contains some helper functions related to the Kubernetes.

Index

Constants

View Source
const (
	Alpha = Stage("ALPHA")
	Beta  = Stage("BETA")
	GA    = Stage("GA")

	// Deprecated
	Deprecated = Stage("DEPRECATED")
)

The following stages are defined in https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/

Variables

This section is empty.

Functions

func BuildKubeApiserverTracingConfig added in v0.4.0

func BuildKubeApiserverTracingConfig(conf BuildKubeApiserverTracingConfigParam) (string, error)

BuildKubeApiserverTracingConfig builds a apiserverTracingConfig file from the given parameters.

func GetEtcdVersion

func GetEtcdVersion(version int) string

GetEtcdVersion returns the etcd version for the given k8s version

func GetFeatureGates

func GetFeatureGates(version int) string

GetFeatureGates returns the feature gates for the given version

func GetRuntimeConfig

func GetRuntimeConfig(version int) string

GetRuntimeConfig returns the runtime configuration of the Kubernetes cluster.

Types

type BuildKubeApiserverTracingConfigParam added in v0.4.0

type BuildKubeApiserverTracingConfigParam struct {
	Endpoint string
}

BuildKubeApiserverTracingConfigParam is the configuration for BuildKubeApiserverTracingConfig.

type FeatureSpec

type FeatureSpec struct {
	Name  string
	Stage Stage
	Since int
	Until int
}

FeatureSpec is the specification of a feature

func (*FeatureSpec) Contain

func (f *FeatureSpec) Contain(v int) bool

Contain returns true if the version is in the range of the feature

func (*FeatureSpec) Verification

func (f *FeatureSpec) Verification() error

Verification of the data

type Stage

type Stage string

Stage is the stage of a feature.

Jump to

Keyboard shortcuts

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