Documentation ¶
Index ¶
- func AnnotateVC(cli client.Client, vc *tenancyv1alpha1.VirtualCluster, key, val string, ...) error
- func CreateRootNS(cli client.Client, vc *tenancyv1alpha1.VirtualCluster) (string, error)
- func GetPodNsFromInside() (string, error)
- func GetSvcClusterIP(cli client.Client, namespace, name string) (string, error)
- func IsObjExist(cli client.Client, key client.ObjectKey, obj runtime.Object, log logr.Logger) bool
- func NewInClusterClient() (client.Client, error)
- func RetryPatchVCOnConflict(ctx context.Context, cli client.Client, vc *tenancyv1alpha1.VirtualCluster, ...) error
- func RetryUpdateVCStatusOnConflict(ctx context.Context, cli client.Client, vc *tenancyv1alpha1.VirtualCluster, ...) error
- func SetVCStatus(vc *tenancyv1alpha1.VirtualCluster, phase tenancyv1alpha1.ClusterPhase, ...)
- func WaitStatefulSetReady(cli client.Client, namespace, name string, timeOutSec, periodSec int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnnotateVC ¶
func AnnotateVC(cli client.Client, vc *tenancyv1alpha1.VirtualCluster, key, val string, log logr.Logger) error
AnnotateVC add the annotation('key'='val') to the VirtualCluster 'vc'
func CreateRootNS ¶
func CreateRootNS(cli client.Client, vc *tenancyv1alpha1.VirtualCluster) (string, error)
CreateRootNS creates the root namespace for the vc
func GetPodNsFromInside ¶
GetPodNsFromInside gets the namespace of the pod from inside the pod
func GetSvcClusterIP ¶
GetSvcClusterIP gets the ClusterIP of the service 'namespace/name'
func IsObjExist ¶
IsObjExist check if object with 'key' exist
func NewInClusterClient ¶
NewInClusterClient creates a client that has virtualcluster and clusterversion schemes registered
func RetryPatchVCOnConflict ¶
func RetryPatchVCOnConflict(ctx context.Context, cli client.Client, vc *tenancyv1alpha1.VirtualCluster, patch client.Patch, log logr.Logger, opts ...client.PatchOption) error
RetryPatchVCOnConflict tries to patch the VirtualCluster 'vc'. It will retry to patch the 'vc' if there are conflicts caused by other code
func RetryUpdateVCStatusOnConflict ¶
func RetryUpdateVCStatusOnConflict(ctx context.Context, cli client.Client, vc *tenancyv1alpha1.VirtualCluster, log logr.Logger) error
RetryUpdateVCStatusOnConflict tries to update the VirtualCluster 'vc' status. It will retry to update the 'vc' if there are conflicts caused by other code
func SetVCStatus ¶
func SetVCStatus(vc *tenancyv1alpha1.VirtualCluster, phase tenancyv1alpha1.ClusterPhase, message, reason string)
SetVCStatus set the virtualcluster 'vc' status, and append the new status to conditions list
Types ¶
This section is empty.