Documentation ¶
Index ¶
- func AppendToListIfNotExists(list []string, value string) []string
- func BackupKubeadminPasswordHash(ctx context.Context, client runtimeclient.Client, cryptoDir string) (bool, error)
- func BackupKubeconfigCrypto(ctx context.Context, client runtimeclient.Client, cryptoDir string) error
- func ConvertToRawExtension(config any) (runtime.RawExtension, error)
- func CopyFileIfExists(source, dest string) error
- func CopyToTempFile(sourceFileName, directory, pattern string) (string, error)
- func CreateDynamicClient(kubeconfig string, isTestEnvAllowed bool, log logr.Logger) (dynamic.Interface, error)
- func CreateKubeClient(scheme *runtime.Scheme, kubeconfig string) (runtimeclient.Client, error)
- func ExtractRegistryFromImage(image string) string
- func GetAdditionalTrustBundleFromConfigmap(ctx context.Context, client client.Client, configmapName string) (string, error)
- func GetCSVDeployment(ctx context.Context, client runtimeclient.Client) (*appsv1.Deployment, error)
- func GetClusterAdditionalTrustBundleState(ctx context.Context, client client.Client) (bool, string, error)
- func GetClusterBaseDomain(ctx context.Context, client runtimeclient.Client) (string, error)
- func GetClusterName(ctx context.Context, client runtimeclient.Client) (string, error)
- func GetConfigMapData(ctx context.Context, name, namespace, key string, client runtimeclient.Client) (string, error)
- func GetInfrastructure(ctx context.Context, client runtimeclient.Client) (*ocp_config_v1.Infrastructure, error)
- func GetIngressCertificateCN(ctx context.Context, client runtimeclient.Client) (string, error)
- func GetMirrorRegistrySourceRegistries(ctx context.Context, client runtimeclient.Client) ([]string, error)
- func GetReleaseRegistry(ctx context.Context, client runtimeclient.Client) (string, error)
- func GetSNOMasterNode(ctx context.Context, client runtimeclient.Client) (*corev1.Node, error)
- func GetSecretData(ctx context.Context, name, namespace, key string, client runtimeclient.Client) (string, error)
- func GetYamlOrJsonDecoder(fp string) (*yaml.YAMLOrJSONDecoder, error)
- func HandleFilesWithCallback(folder string, action func(string) error) error
- func HasFIPS(ctx context.Context, client runtimeclient.Client) (bool, error)
- func HasProxy(ctx context.Context, client runtimeclient.Client) (bool, error)
- func InitIBU(ctx context.Context, c client.Client, log *logr.Logger) error
- func IsIpv6(provideIp string) bool
- func LoadGroupedManifestsFromPath(basePath string, log *logr.Logger) ([][]*unstructured.Unstructured, error)
- func LoadKubeadminPasswordHash(cryptoDir string) (string, error)
- func MarshalToFile(data any, filePath string) error
- func MarshalToYamlFile(data any, filePath string) error
- func ReadIBIConfigFile(configFile string) (*ibiconfig.IBIPrepareConfig, error)
- func ReadImageFromStaticPodDefinition(podFile, containerName string) (string, error)
- func ReadSeedReconfigurationFromFile(path string) (*seedreconfig.SeedReconfiguration, error)
- func ReadYamlOrJSONFile(fp string, into any) error
- func RemoveListOfFolders(log *logrus.Logger, folders []string) error
- func RenderTemplate(templateData string, params any) ([]byte, error)
- func ReplaceImageRegistry(image, targetRegistry, sourceRegistry string) (string, error)
- func RetryMiddleware(logger logr.Logger) func(rt http.RoundTripper) http.RoundTripper
- func RunOnce(name, directory string, log *logrus.Logger, f any, args ...any) error
- func SeedReconfigurationKubeconfigRetentionFromCluster(ctx context.Context, client runtimeclient.Client) (*seedreconfig.KubeConfigCryptoRetention, error)
- func SeedReconfigurationKubeconfigRetentionToCryptoDir(cryptoDir string, ...) error
- func ShouldOverrideSeedRegistry(ctx context.Context, client runtimeclient.Client, ...) (bool, error)
- func UpdatePullSecretFromDockerConfig(ctx context.Context, c client.Client, dockerConfigJSON []byte) (*corev1.Secret, error)
- type ClusterInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendToListIfNotExists ¶
func BackupKubeconfigCrypto ¶
func ConvertToRawExtension ¶
func ConvertToRawExtension(config any) (runtime.RawExtension, error)
func CopyFileIfExists ¶
func CopyToTempFile ¶
CopyToTempFile copies a file to a temporary file. WARNING: This function only preserves POSIX permissions to the new file If you want to use it, take that into account and extend it if needed to also preserve other things like owner, extended attributes, selinux contexts or whatever might be needed
func CreateDynamicClient ¶
func CreateKubeClient ¶
func GetCSVDeployment ¶
func GetCSVDeployment(ctx context.Context, client runtimeclient.Client) (*appsv1.Deployment, error)
func GetClusterBaseDomain ¶
func GetClusterName ¶
func GetConfigMapData ¶
func GetInfrastructure ¶
func GetInfrastructure(ctx context.Context, client runtimeclient.Client) (*ocp_config_v1.Infrastructure, error)
func GetIngressCertificateCN ¶
func GetReleaseRegistry ¶
func GetSNOMasterNode ¶
func GetSecretData ¶
func GetYamlOrJsonDecoder ¶
func GetYamlOrJsonDecoder(fp string) (*yaml.YAMLOrJSONDecoder, error)
func HandleFilesWithCallback ¶
func LoadGroupedManifestsFromPath ¶
func LoadGroupedManifestsFromPath(basePath string, log *logr.Logger) ([][]*unstructured.Unstructured, error)
func MarshalToFile ¶
MarshalToFile marshals anything and writes it to the given file path. file only readable by root
func MarshalToYamlFile ¶
MarshalToYamlFile marshals any object to YAML and writes it to the given file path file only readable by root
func ReadIBIConfigFile ¶
func ReadIBIConfigFile(configFile string) (*ibiconfig.IBIPrepareConfig, error)
func ReadSeedReconfigurationFromFile ¶
func ReadSeedReconfigurationFromFile(path string) (*seedreconfig.SeedReconfiguration, error)
func ReadYamlOrJSONFile ¶
func RenderTemplate ¶
RenderTemplate render template
func ReplaceImageRegistry ¶
func RetryMiddleware ¶
func RetryMiddleware(logger logr.Logger) func(rt http.RoundTripper) http.RoundTripper
RetryMiddleware pass this into your client config (with .Wrap()) to make it retriable
func SeedReconfigurationKubeconfigRetentionFromCluster ¶
func SeedReconfigurationKubeconfigRetentionFromCluster(ctx context.Context, client runtimeclient.Client) (*seedreconfig.KubeConfigCryptoRetention, error)
func SeedReconfigurationKubeconfigRetentionToCryptoDir ¶
func SeedReconfigurationKubeconfigRetentionToCryptoDir(cryptoDir string, kubeconfigCryptoRetention *seedreconfig.KubeConfigCryptoRetention) error
Types ¶
type ClusterInfo ¶
type ClusterInfo struct { OCPVersion string BaseDomain string ClusterName string ClusterID string NodeIP string ReleaseRegistry string Hostname string MirrorRegistryConfigured bool ClusterNetworks []string ServiceNetworks []string MachineNetwork string NodeLabels map[string]string IngressCertificateCN string }
func GetClusterInfo ¶
func GetClusterInfo(ctx context.Context, client runtimeclient.Client) (*ClusterInfo, error)
Click to show internal directories.
Click to hide internal directories.