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 GetCSVDeployment(ctx context.Context, client runtimeclient.Client) (*appsv1.Deployment, 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 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 HandleFilesWithCallback(folder string, action func(string) error) 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 MoveFileIfExists(source, dest string) 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 RenderTemplateFile(templateData string, params any, dest string, perm os.FileMode) error
- func ReplaceImageRegistry(image, targetRegistry, sourceRegistry string) (string, error)
- 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 TypeMetaForObject(scheme *runtime.Scheme, o runtime.Object) (*metav1.TypeMeta, 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 GetReleaseRegistry ¶
func GetSNOMasterNode ¶
func GetSecretData ¶
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 MoveFileIfExists ¶
func ReadSeedReconfigurationFromFile ¶
func ReadSeedReconfigurationFromFile(path string) (*seedreconfig.SeedReconfiguration, error)
func ReadYamlOrJSONFile ¶
func RenderTemplateFile ¶
RenderTemplateFile render template file
func ReplaceImageRegistry ¶
func SeedReconfigurationKubeconfigRetentionFromCluster ¶
func SeedReconfigurationKubeconfigRetentionFromCluster(ctx context.Context, client runtimeclient.Client) (*seedreconfig.KubeConfigCryptoRetention, error)
func SeedReconfigurationKubeconfigRetentionToCryptoDir ¶
func SeedReconfigurationKubeconfigRetentionToCryptoDir(cryptoDir string, kubeconfigCryptoRetention *seedreconfig.KubeConfigCryptoRetention) error
func TypeMetaForObject ¶
TypeMetaForObject returns the given object's TypeMeta or an error otherwise.
Types ¶
type ClusterInfo ¶
type ClusterInfo struct { OCPVersion string BaseDomain string ClusterName string ClusterID string NodeIP string ReleaseRegistry string Hostname string MirrorRegistryConfigured bool }
func GetClusterInfo ¶
func GetClusterInfo(ctx context.Context, client runtimeclient.Client) (*ClusterInfo, error)
Click to show internal directories.
Click to hide internal directories.