Documentation ¶
Index ¶
- Constants
- func CheckResourceExists(clientset kubernetes.Clientset, group, version, kind string) bool
- func DropDatabase(ctx context.Context, cpName string, crClient client.Client) error
- func GVKToGVR(clientset *kubernetes.Clientset, gvk schema.GroupVersionKind) (schema.GroupVersionResource, error)
- func GVRToGVK(clientset *kubernetes.Clientset, gvr schema.GroupVersionResource) (schema.GroupVersionKind, error)
- func GenerateDevLocalDNSName(name, domain string) string
- func GenerateHostedDNSName(namespace, name string) []string
- func GenerateNamespaceFromControlPlaneName(name string) string
- func GenerateObjectInfoString(obj unstructured.Unstructured) string
- func GenerateOperatorDeploymentName() string
- func GeneratePGConnectionString(dbPassword, dbName string) string
- func GeneratePSReplicaSetName(releaseName string) string
- func GeneratePSecretName(releaseName string) string
- func GetAPIServerDeploymentNameByControlPlaneType(controlPlaneType string) string
- func GetGroupVersionKindFromObject(obj *unstructured.Unstructured) schema.GroupVersionKind
- func GetKubeconfSecretKeyNameByControlPlaneType(controlPlaneType string) string
- func GetKubeconfSecretNameByControlPlaneType(controlPlaneType string) string
- func GetKubernetesClusterVersionInfo(kubeconfig string) (string, error)
- func GetPGDBPassword(crClient client.Client) (string, error)
- func IsAPIServerDeploymentReady(log logr.Logger, c client.Client, hcp tenancyv1alpha1.ControlPlane) (bool, error)
- func IsClusterScoped(gvk schema.GroupVersionKind, apiResourceLists []*metav1.APIResourceList) (bool, error)
- func IsInCluster() bool
- func IsOpenShift(clientset kubernetes.Clientset) bool
- func ParseVersionNumber(versionString string) string
- func PrintStatus(message string, done chan bool, wg *sync.WaitGroup, chattyStatus bool)
- func RenderYAML(yamlTemplate []byte, data interface{}) ([]byte, error)
- func ReplaceNotAllowedCharsInDBName(name string) string
- func SetClusterScopedOwnerRefs(c crc.Client, scheme *runtime.Scheme, hcp *tenancyv1alpha1.ControlPlane) error
- func ToUnstructured(raw []byte) (*unstructured.Unstructured, error)
- func WaitForDeploymentReady(clientset kubernetes.Clientset, name, namespace string) error
- func WaitForNamespaceDeletion(clientset kubernetes.Clientset, name string) error
- func WaitForStatefulSetReady(clientset kubernetes.Clientset, name, namespace string) error
- func ZeroFields(obj runtime.Object) runtime.Object
Constants ¶
View Source
const ( ManagedByKey = "app.kubernetes.io/managed-by" HelmReleaseNamespaceAnnotationKey = "meta.helm.sh/release-namespace" )
View Source
const ( APIServerDeploymentName = "kube-apiserver" OCMServerDeploymentName = "multicluster-controlplane" VClusterServerDeploymentName = "vcluster" CMDeploymentName = "kube-controller-manager" ProjectName = "kubeflex" DBReleaseName = "postgres" SystemNamespace = "kubeflex-system" SystemConfigMap = "kubeflex-config" AdminConfSecret = "admin-kubeconfig" OCMKubeConfigSecret = "multicluster-controlplane-kubeconfig" VClusterKubeConfigSecret = "vc-vcluster" VClusterNodePortServiceName = "vcluster-nodeport" VClusterServiceName = "vcluster" KubeconfigSecretKeyDefault = "kubeconfig" KubeconfigSecretKeyInCluster = "kubeconfig-incluster" KubeconfigSecretKeyVCluster = "config" KubeconfigSecretKeyVClusterInCluster = "config-incluster" )
View Source
const (
UnableToRetrieveCompleteAPIListError = "unable to retrieve the complete list of server APIs"
)
Variables ¶
This section is empty.
Functions ¶
func CheckResourceExists ¶ added in v0.2.5
func CheckResourceExists(clientset kubernetes.Clientset, group, version, kind string) bool
func DropDatabase ¶ added in v0.2.5
func GVKToGVR ¶ added in v0.4.0
func GVKToGVR(clientset *kubernetes.Clientset, gvk schema.GroupVersionKind) (schema.GroupVersionResource, error)
func GVRToGVK ¶ added in v0.4.0
func GVRToGVK(clientset *kubernetes.Clientset, gvr schema.GroupVersionResource) (schema.GroupVersionKind, error)
func GenerateDevLocalDNSName ¶
GenerateDevLocalDNSName: generates the local dns name for test/dev from the controlplane name
func GenerateHostedDNSName ¶ added in v0.2.1
func GenerateObjectInfoString ¶ added in v0.3.0
func GenerateObjectInfoString(obj unstructured.Unstructured) string
Used for generating a single string unique representation of the object for logging info
func GenerateOperatorDeploymentName ¶
func GenerateOperatorDeploymentName() string
func GeneratePGConnectionString ¶ added in v0.2.5
func GeneratePSecretName ¶
func GetAPIServerDeploymentNameByControlPlaneType ¶ added in v0.2.0
func GetGroupVersionKindFromObject ¶ added in v0.3.0
func GetGroupVersionKindFromObject(obj *unstructured.Unstructured) schema.GroupVersionKind
func GetKubeconfSecretKeyNameByControlPlaneType ¶ added in v0.2.0
func GetKubeconfSecretNameByControlPlaneType ¶ added in v0.2.0
func IsAPIServerDeploymentReady ¶ added in v0.1.1
func IsAPIServerDeploymentReady(log logr.Logger, c client.Client, hcp tenancyv1alpha1.ControlPlane) (bool, error)
func IsClusterScoped ¶ added in v0.3.0
func IsClusterScoped(gvk schema.GroupVersionKind, apiResourceLists []*metav1.APIResourceList) (bool, error)
func IsInCluster ¶ added in v0.2.5
func IsInCluster() bool
func IsOpenShift ¶ added in v0.2.5
func IsOpenShift(clientset kubernetes.Clientset) bool
func ParseVersionNumber ¶
func PrintStatus ¶
PrintWithIcon prints a message with defined colors and a spinning icon in front that can be changed to checkmark when completed.
func RenderYAML ¶ added in v0.3.0
func ReplaceNotAllowedCharsInDBName ¶ added in v0.2.5
func SetClusterScopedOwnerRefs ¶ added in v0.3.1
func SetClusterScopedOwnerRefs(c crc.Client, scheme *runtime.Scheme, hcp *tenancyv1alpha1.ControlPlane) error
func ToUnstructured ¶ added in v0.3.0
func ToUnstructured(raw []byte) (*unstructured.Unstructured, error)
func WaitForDeploymentReady ¶
func WaitForDeploymentReady(clientset kubernetes.Clientset, name, namespace string) error
func WaitForNamespaceDeletion ¶
func WaitForNamespaceDeletion(clientset kubernetes.Clientset, name string) error
func WaitForStatefulSetReady ¶
func WaitForStatefulSetReady(clientset kubernetes.Clientset, name, namespace string) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.