kubeoptions

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Overview

Package kubeoptions provides the ability to retrieve all available Kubernetes feature gates and admission controllers through the MKS V1 API.

Example of getting available feature gates by Kubernetes version:

availableFG, _, err := kubeoptions.ListFeatureGates(ctx, mksClient)
if err != nil {
  log.Fatal(err)
}
for _, fgList := range availableFG {
  fmt.Printf("%s: %v\n", fgList.KubeVersion, fgList.Names)
}

Example of getting available admission controllers by Kubernetes version:

availableAC, _, err := kubeoptions.ListAdmissionControllers(ctx, mksClient)
if err != nil {
  log.Fatal(err)
}
for _, acList := range availableAC {
  fmt.Printf("%s: %v\n", acList.KubeVersion, acList.Names)
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type View

type View struct {
	// KubeVersion represents the Kubernetes minor version in format: "X.Y".
	KubeVersion string `json:"KubeVersionMinor"`

	// Names represents list of feature-gate names.
	Names []string `json:"Names"`
}

View represents list of feature-gates/admission-controllers by kubernetes version.

func ListAdmissionControllers

func ListAdmissionControllers(ctx context.Context, client *v1.ServiceClient) ([]*View, *v1.ResponseResult, error)

ListAdmissionControllers gets a list of available admission controllers by Kubernetes versions.

func ListFeatureGates

func ListFeatureGates(ctx context.Context, client *v1.ServiceClient) ([]*View, *v1.ResponseResult, error)

ListFeatureGates gets a list of available feature gates by Kubernetes versions.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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