Documentation
¶
Index ¶
- func BuildFeatureGateString(enabled, disabled []string) string
- func CertificateData(certData []byte) ([]*x509.Certificate, error)
- func GetEnabledDisabledFeatures(features featuregates.FeatureGate, filter []string) ([]string, []string)
- func GetLeaderElectionDefaults(restConfig *rest.Config, leaderElection configv1.LeaderElection) configv1.LeaderElection
- func GetUpstreamCloudFeatureGates() ([]string, error)
- func TrustBundleConfigMap(cfgMap *corev1.ConfigMap, caBundleKey string) ([]*x509.Certificate, []byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildFeatureGateString ¶
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 ¶
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.