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.
Click to show internal directories.
Click to hide internal directories.