util

package
v0.0.0-...-7f6aa93 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFeatureGateString

func BuildFeatureGateString(enabled, disabled []string) string

BuildFeatureGateString takes slices of enabled and disabled feature gates and returns a string that can be passed as a cmd param "--feature-gates=" to the Cloud Provider. Returned string will be formated in a way that it can be passed as-is, i.e. enabled features will get "=true" suffix and disabled "=false". E.g. "ChocobombStrawberry=true,ChocobombBanana=false".

func CertificateData

func CertificateData(certData []byte) ([]*x509.Certificate, error)

CertificateData decodes certData, ensuring each PEM block is type "CERTIFICATE" and the block can be parsed as an x509 certificate, returning slice of parsed certificates

func GetEnabledDisabledFeatures

func GetEnabledDisabledFeatures(features featuregates.FeatureGate, filter []string) ([]string, []string)

GetEnabledDisabledFeatures returns two slices that contain all the known feature gates and separates them by their enabled/disabled state. It has ability to filter results by using a provided list of whitelisted names. It is useful when not all the features are allowed to be used in a specific context.

func GetLeaderElectionDefaults

func GetLeaderElectionDefaults(restConfig *rest.Config, leaderElection configv1.LeaderElection) configv1.LeaderElection

GetLeaderElectionDefaults returns leader election configs defaults based on the cluster topology

func GetUpstreamCloudFeatureGates

func GetUpstreamCloudFeatureGates() ([]string, error)

GetUpstreamCloudFeatureGates returns a list of feature gates that are allowed to be used in the context of cloud provider.

func TrustBundleConfigMap

func TrustBundleConfigMap(cfgMap *corev1.ConfigMap, caBundleKey string) ([]*x509.Certificate, []byte, error)

TrustBundleConfigMap validates that ConfigMap contains a trust bundle named aa "caBundleKey" argument and that "caBundleKey" contains one or more valid PEM encoded certificates, returning a byte slice of "caBundleKey" contents upon success.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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