Documentation ¶
Overview ¶
Package kube implements important interfaces like the Kube.
Index ¶
Constants ¶
View Source
const ( // DeploymentKind is the Deployment object. DeploymentKind = "Deployment" // ReplicaSetKind is the ReplicaSet object. ReplicaSetKind = "ReplicaSet" // StatefulSetKind is the StatefulSet object. StatefulSetKind = "StatefulSet" // DaemonSetKind is the DaemonSet object. DaemonSetKind = "DaemonSet" // IngressKind is the Ingress object. IngressKind = "Ingress" // JobKind is the Job object. JobKind = "Job" // PodKind is the Pod object. PodKind = "Pod" // ObjectLabelKeyOwned is the label for objects. ObjectLabelKeyOwned = "clusterstack.x-k8s.io/instance" // ObjectLabelValueOwned is the object owned. ObjectLabelValueOwned = "owned" )
Variables ¶
This section is empty.
Functions ¶
func GetDynamicResourceInterface ¶
func GetDynamicResourceInterface(namespace string, restConfig *rest.Config, group schema.GroupVersionKind) (dynamic.ResourceInterface, error)
GetDynamicResourceInterface returns a dynamic.ResourceInterface based on the groupVersionKind and namespace.
func GetResourcesFromHelmTemplate ¶
func GetResourcesFromHelmTemplate(template []byte) ([]*csov1alpha1.Resource, error)
GetResourcesFromHelmTemplate returns a slice of resources based on the outcome of a slice of bytes from helm template.
Types ¶
type Client ¶
type Client interface { Apply(ctx context.Context, template []byte, oldResources []*csov1alpha1.Resource) (newResources []*csov1alpha1.Resource, shouldRequeue bool, err error) Delete(ctx context.Context, template []byte, oldResources []*csov1alpha1.Resource) (newResources []*csov1alpha1.Resource, shouldRequeue bool, err error) ApplyNewClusterStack(ctx context.Context, oldTemplate, newTemplate []byte) (newResources []*csov1alpha1.Resource, shouldRequeue bool, err error) DeleteNewClusterStack(ctx context.Context, template []byte) (newResources []*csov1alpha1.Resource, shouldRequeue bool, err error) }
Client has all the meathod for helm chart kube operation.
Click to show internal directories.
Click to hide internal directories.