Documentation ¶
Index ¶
- func CleanupResources(ctx spi.ComponentContext, objects []client.Object) error
- func CreateOrUpdateResourceFromBytes(data []byte, log *zap.SugaredLogger) error
- func CreateOrUpdateResourceFromBytesUsingConfig(data []byte, config *rest.Config) error
- func CreateOrUpdateResourceFromFile(file string, log *zap.SugaredLogger) error
- func CreateOrUpdateResourceFromFileInCluster(file string, kubeconfigPath string) error
- func CreateOrUpdateResourceFromFileInClusterInGeneratedNamespace(file string, kubeconfigPath string, namespace string) error
- func CreateOrUpdateResourceFromFileInGeneratedNamespace(file string, namespace string) error
- func DeleteResourceFromFile(file string, log *zap.SugaredLogger) error
- func DeleteResourceFromFileInCluster(file string, kubeconfigPath string) error
- func DeleteResourceFromFileInClusterInGeneratedNamespace(file string, kubeconfigPath string, namespace string) error
- func DeleteResourceFromFileInGeneratedNamespace(file string, namespace string) error
- func PatchResourceFromBytes(gvr schema.GroupVersionResource, patchType types.PatchType, namespace string, ...) error
- func PatchResourceFromFileInCluster(gvr schema.GroupVersionResource, namespace string, name string, ...) error
- func VerifyResourcesDeleted(ctx spi.ComponentContext, objects []client.Object) error
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupResources ¶ added in v1.7.0
func CleanupResources(ctx spi.ComponentContext, objects []client.Object) error
CleanupResources deletes and removes finalizers from resources
func CreateOrUpdateResourceFromBytes ¶ added in v1.5.0
func CreateOrUpdateResourceFromBytes(data []byte, log *zap.SugaredLogger) error
CreateOrUpdateResourceFromBytes creates or updates a Kubernetes resources from a YAML data byte array. The cluster used is the one set by default in the environment
func CreateOrUpdateResourceFromBytesUsingConfig ¶ added in v1.5.0
CreateOrUpdateResourceFromBytesUsingConfig creates or updates a Kubernetes resource from bytes. This is intended to be equivalent to `kubectl apply`
func CreateOrUpdateResourceFromFile ¶ added in v1.5.0
func CreateOrUpdateResourceFromFile(file string, log *zap.SugaredLogger) error
CreateOrUpdateResourceFromFile creates or updates a Kubernetes resources from a YAML file. This is intended to be equivalent to `kubectl apply` The cluster used is the one set by default in the environment
func CreateOrUpdateResourceFromFileInCluster ¶ added in v1.5.0
CreateOrUpdateResourceFromFileInCluster is identical to CreateOrUpdateResourceFromFile, except that it uses the cluster specified by the kubeconfigPath argument instead of the default cluster in the environment
func CreateOrUpdateResourceFromFileInClusterInGeneratedNamespace ¶ added in v1.5.0
func CreateOrUpdateResourceFromFileInClusterInGeneratedNamespace(file string, kubeconfigPath string, namespace string) error
CreateOrUpdateResourceFromFileInClusterInGeneratedNamespace is identical to CreateOrUpdateResourceFromFileInGeneratedNamespace, except that it uses the cluster specified by the kubeconfigPath argument instead of the default cluster in the environment
func CreateOrUpdateResourceFromFileInGeneratedNamespace ¶ added in v1.5.0
CreateOrUpdateResourceFromFileInGeneratedNamespace creates or updates a Kubernetes resources from a YAML file. Namespaces are not in the resource yaml files. They are generated and passed in Resources will be created in the namespace that is passed in This is intended to be equivalent to `kubectl apply` The cluster used is the one set by default in the environment
func DeleteResourceFromFile ¶ added in v1.5.0
func DeleteResourceFromFile(file string, log *zap.SugaredLogger) error
DeleteResourceFromFile deletes Kubernetes resources using names found in a YAML file. This is intended to be equivalent to `kubectl delete`
func DeleteResourceFromFileInCluster ¶ added in v1.5.0
DeleteResourceFromFileInCluster is identical to DeleteResourceFromFile, except that // it uses the cluster specified by the kubeconfigPath argument instead of the default cluster in the environment
func DeleteResourceFromFileInClusterInGeneratedNamespace ¶ added in v1.5.0
func DeleteResourceFromFileInClusterInGeneratedNamespace(file string, kubeconfigPath string, namespace string) error
DeleteResourceFromFileInClusterInGeneratedNamespace is identical to DeleteResourceFromFileInGeneratedNamespace, except that it uses the cluster specified by the kubeconfigPath argument instead of the default cluster in the environment
func DeleteResourceFromFileInGeneratedNamespace ¶ added in v1.5.0
DeleteResourceFromFileInGeneratedNamespace deletes Kubernetes resources using names found in a YAML file. The namespace is generated and passed in
func PatchResourceFromBytes ¶ added in v1.5.0
func PatchResourceFromBytes(gvr schema.GroupVersionResource, patchType types.PatchType, namespace string, name string, patchDataJSON []byte, config *rest.Config) error
PatchResourceFromBytes patches a Kubernetes resource from bytes. The contents of the byte slice must be in JSON format. This is intended to be equivalent to `kubectl patch`.
func PatchResourceFromFileInCluster ¶ added in v1.5.0
func PatchResourceFromFileInCluster(gvr schema.GroupVersionResource, namespace string, name string, patchFile string, kubeconfigPath string) error
PatchResourceFromFileInCluster patches a Kubernetes resource from a given patch file in the specified cluster If the given patch file has a ".yaml" extension, the contents will be converted to JSON This is intended to be equivalent to `kubectl patch`
func VerifyResourcesDeleted ¶ added in v1.7.0
func VerifyResourcesDeleted(ctx spi.ComponentContext, objects []client.Object) error
VerifyResourcesDeleted verifies resources have been fully cleaned up
Types ¶
type Resource ¶
type Resource struct { Namespace string Name string Client client.Client Object client.Object Log vzlog.VerrazzanoLogger }
func (Resource) RemoveFinalizers ¶
RemoveFinalizers removes all finalizers from a resource
func (Resource) RemoveFinalizersAndDelete ¶
RemoveFinializersAndDelete removes all finalizers from a resource and deletes the resource