commandexecutorkubernetes

package
v0.333.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusterByName

func GetClusterByName(clusterName string) (kubernetes kubernetesutils.KubernetesCluster, err error)

func GetCommandExecutorKubernetsByName

func GetCommandExecutorKubernetsByName(commandExecutor commandexecutor.CommandExecutor, clusterName string) (kubernetes kubernetesutils.KubernetesCluster, err error)

func GetCommandExecutorResource

func GetCommandExecutorResource(commandExectutor commandexecutor.CommandExecutor, namespace kubernetesutils.Namespace, resourceName string, resourceType string) (resource kubernetesutils.Resource, err error)

Types

type CommandExecutorKubernetes

type CommandExecutorKubernetes struct {
	// contains filtered or unexported fields
}

func NewCommandExecutorKubernetes

func NewCommandExecutorKubernetes() (c *CommandExecutorKubernetes)

func (*CommandExecutorKubernetes) ConfigMapByNameExists added in v0.322.0

func (c *CommandExecutorKubernetes) ConfigMapByNameExists(ctx context.Context, namespaceName string, configmapName string) (exists bool, err error)

func (*CommandExecutorKubernetes) CreateConfigMap added in v0.322.0

func (c *CommandExecutorKubernetes) CreateConfigMap(ctx context.Context, namespaceName string, configMapName string, options *kubernetesutils.CreateConfigMapOptions) (createdConfigMap kubernetesutils.ConfigMap, err error)

func (*CommandExecutorKubernetes) CreateNamespaceByName

func (c *CommandExecutorKubernetes) CreateNamespaceByName(ctx context.Context, name string) (createdNamespace kubernetesutils.Namespace, err error)

func (*CommandExecutorKubernetes) CreateSecret

func (c *CommandExecutorKubernetes) CreateSecret(ctx context.Context, namespaceName string, secretName string, options *kubernetesutils.CreateSecretOptions) (createdSecret kubernetesutils.Secret, err error)

func (*CommandExecutorKubernetes) DeleteConfigMapByName added in v0.322.0

func (c *CommandExecutorKubernetes) DeleteConfigMapByName(ctx context.Context, namespaceName string, configmapName string) (err error)

func (*CommandExecutorKubernetes) DeleteNamespaceByName

func (c *CommandExecutorKubernetes) DeleteNamespaceByName(ctx context.Context, name string) (err error)

func (*CommandExecutorKubernetes) DeleteSecretByName

func (c *CommandExecutorKubernetes) DeleteSecretByName(ctx context.Context, namespaceName string, secretName string) (err error)

func (*CommandExecutorKubernetes) GetCachedContextName

func (c *CommandExecutorKubernetes) GetCachedContextName() (cachedContextName string, err error)

func (*CommandExecutorKubernetes) GetCachedKubectlContext

func (c *CommandExecutorKubernetes) GetCachedKubectlContext(ctx context.Context) (context string, err error)

func (*CommandExecutorKubernetes) GetCommandExecutor

func (c *CommandExecutorKubernetes) GetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor, err error)

func (*CommandExecutorKubernetes) GetKubectlContext

func (c *CommandExecutorKubernetes) GetKubectlContext(ctx context.Context) (context string, err error)

func (*CommandExecutorKubernetes) GetKubectlContexts

func (c *CommandExecutorKubernetes) GetKubectlContexts() (contexts []kubernetesutils.KubectlContext, err error)

func (*CommandExecutorKubernetes) GetName

func (c *CommandExecutorKubernetes) GetName() (name string, err error)

Returns the kubernetes cluster name

func (*CommandExecutorKubernetes) GetNamespaceByName

func (c *CommandExecutorKubernetes) GetNamespaceByName(name string) (namespace kubernetesutils.Namespace, err error)

func (*CommandExecutorKubernetes) GetResourceByNames

func (c *CommandExecutorKubernetes) GetResourceByNames(resourceName string, resourceType string, namespaceName string) (resource kubernetesutils.Resource, err error)

func (*CommandExecutorKubernetes) ListNamespaceNames

func (c *CommandExecutorKubernetes) ListNamespaceNames(ctx context.Context) (namespaceNames []string, err error)

func (*CommandExecutorKubernetes) ListNamespaces

func (c *CommandExecutorKubernetes) ListNamespaces(ctx context.Context) (namespaces []kubernetesutils.Namespace, err error)

func (*CommandExecutorKubernetes) ListResourceNames

func (c *CommandExecutorKubernetes) ListResourceNames(options *parameteroptions.ListKubernetesResourcesOptions) (resourceNames []string, err error)

func (*CommandExecutorKubernetes) ListResources

func (*CommandExecutorKubernetes) NamespaceByNameExists

func (c *CommandExecutorKubernetes) NamespaceByNameExists(ctx context.Context, name string) (exists bool, err error)

func (*CommandExecutorKubernetes) RunCommand

func (c *CommandExecutorKubernetes) RunCommand(ctx context.Context, runCommandOptions *parameteroptions.RunCommandOptions) (commandOutput *commandexecutor.CommandOutput, err error)

func (*CommandExecutorKubernetes) RunCommandAndGetStdoutAsLines

func (c *CommandExecutorKubernetes) RunCommandAndGetStdoutAsLines(ctx context.Context, runCommandOptions *parameteroptions.RunCommandOptions) (lines []string, err error)

func (*CommandExecutorKubernetes) SecretByNameExists

func (c *CommandExecutorKubernetes) SecretByNameExists(ctx context.Context, namespaceName string, secretName string) (exists bool, err error)

func (*CommandExecutorKubernetes) SetCachedContextName

func (c *CommandExecutorKubernetes) SetCachedContextName(cachedContextName string) (err error)

func (*CommandExecutorKubernetes) SetCommandExecutor

func (c *CommandExecutorKubernetes) SetCommandExecutor(commandExecutor commandexecutor.CommandExecutor) (err error)

func (*CommandExecutorKubernetes) SetName

func (c *CommandExecutorKubernetes) SetName(name string) (err error)

type CommandExecutorNamespace

type CommandExecutorNamespace struct {
	// contains filtered or unexported fields
}

func NewCommandExecutorNamespace

func NewCommandExecutorNamespace() (c *CommandExecutorNamespace)

func (*CommandExecutorNamespace) ConfigMapByNameExists added in v0.322.0

func (c *CommandExecutorNamespace) ConfigMapByNameExists(ctx context.Context, name string) (bool, error)

func (*CommandExecutorNamespace) Create

func (c *CommandExecutorNamespace) Create(ctx context.Context) (err error)

func (*CommandExecutorNamespace) CreateConfigMap added in v0.322.0

func (c *CommandExecutorNamespace) CreateConfigMap(ctx context.Context, name string, options *kubernetesutils.CreateConfigMapOptions) (createdConfigMap kubernetesutils.ConfigMap, err error)

func (*CommandExecutorNamespace) CreateRole

func (c *CommandExecutorNamespace) CreateRole(ctx context.Context, createOptions *kubernetesutils.CreateRoleOptions) (createdRole kubernetesutils.Role, err error)

func (*CommandExecutorNamespace) CreateSecret

func (c *CommandExecutorNamespace) CreateSecret(ctx context.Context, name string, options *kubernetesutils.CreateSecretOptions) (createdSecret kubernetesutils.Secret, err error)

func (*CommandExecutorNamespace) DeleteConfigMapByName added in v0.322.0

func (c *CommandExecutorNamespace) DeleteConfigMapByName(ctx context.Context, name string) (err error)

func (*CommandExecutorNamespace) DeleteRoleByName

func (c *CommandExecutorNamespace) DeleteRoleByName(ctx context.Context, name string) (err error)

func (*CommandExecutorNamespace) DeleteSecretByName

func (c *CommandExecutorNamespace) DeleteSecretByName(ctx context.Context, name string) (err error)

func (*CommandExecutorNamespace) GetCachedKubectlContext

func (c *CommandExecutorNamespace) GetCachedKubectlContext(ctx context.Context) (context string, err error)

func (*CommandExecutorNamespace) GetClusterName

func (c *CommandExecutorNamespace) GetClusterName() (clusterName string, err error)

func (*CommandExecutorNamespace) GetCommandExecutor

func (c *CommandExecutorNamespace) GetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor, err error)

func (*CommandExecutorNamespace) GetConfigMapByName added in v0.322.0

func (c *CommandExecutorNamespace) GetConfigMapByName(name string) (secret kubernetesutils.ConfigMap, err error)

func (*CommandExecutorNamespace) GetKubectlContext

func (c *CommandExecutorNamespace) GetKubectlContext(ctx context.Context) (contextName string, err error)

func (*CommandExecutorNamespace) GetKubernetesCluster

func (c *CommandExecutorNamespace) GetKubernetesCluster() (kubernetesCluster kubernetesutils.KubernetesCluster, err error)

func (*CommandExecutorNamespace) GetName

func (c *CommandExecutorNamespace) GetName() (name string, err error)

func (*CommandExecutorNamespace) GetResourceByNames

func (c *CommandExecutorNamespace) GetResourceByNames(resourceName string, resourceType string) (resource kubernetesutils.Resource, err error)

func (*CommandExecutorNamespace) GetRoleByName

func (c *CommandExecutorNamespace) GetRoleByName(name string) (role kubernetesutils.Role, err error)

func (*CommandExecutorNamespace) GetSecretByName

func (c *CommandExecutorNamespace) GetSecretByName(name string) (secret kubernetesutils.Secret, err error)

func (*CommandExecutorNamespace) ListRoleNames

func (c *CommandExecutorNamespace) ListRoleNames(ctx context.Context) (roleNames []string, err error)

func (*CommandExecutorNamespace) RoleByNameExists

func (c *CommandExecutorNamespace) RoleByNameExists(ctx context.Context, name string) (exists bool, err error)

func (*CommandExecutorNamespace) RunCommand

func (c *CommandExecutorNamespace) RunCommand(ctx context.Context, runCommandOptions *parameteroptions.RunCommandOptions) (commandOutput *commandexecutor.CommandOutput, err error)

func (*CommandExecutorNamespace) RunCommandAndGetStdoutAsLines

func (c *CommandExecutorNamespace) RunCommandAndGetStdoutAsLines(ctx context.Context, runCommandOptions *parameteroptions.RunCommandOptions) (lines []string, err error)

func (*CommandExecutorNamespace) SecretByNameExists

func (c *CommandExecutorNamespace) SecretByNameExists(ctx context.Context, name string) (bool, error)

func (*CommandExecutorNamespace) SetKubernetesCluster

func (c *CommandExecutorNamespace) SetKubernetesCluster(kubernetesCluster kubernetesutils.KubernetesCluster) (err error)

func (*CommandExecutorNamespace) SetName

func (c *CommandExecutorNamespace) SetName(name string) (err error)

func (*CommandExecutorNamespace) WatchConfigMap added in v0.332.0

func (c *CommandExecutorNamespace) WatchConfigMap(ctx context.Context, name string, onCreate func(kubernetesutils.ConfigMap), onUpdate func(kubernetesutils.ConfigMap), onDelete func(kubernetesutils.ConfigMap)) error

type CommandExecutorResource

type CommandExecutorResource struct {
	// contains filtered or unexported fields
}

func NewCommandExecutorResource

func NewCommandExecutorResource() (c *CommandExecutorResource)

func (*CommandExecutorResource) CreateByYamlString

func (c *CommandExecutorResource) CreateByYamlString(ctx context.Context, options *kubernetesutils.CreateResourceOptions) (err error)

func (*CommandExecutorResource) Delete

func (c *CommandExecutorResource) Delete(ctx context.Context) (err error)

func (*CommandExecutorResource) EnsureNamespaceExists

func (c *CommandExecutorResource) EnsureNamespaceExists(ctx context.Context) (err error)

func (*CommandExecutorResource) Exists

func (c *CommandExecutorResource) Exists(ctx context.Context) (exists bool, err error)

func (*CommandExecutorResource) GetAsYamlString

func (c *CommandExecutorResource) GetAsYamlString() (yamlString string, err error)

func (*CommandExecutorResource) GetClusterName

func (c *CommandExecutorResource) GetClusterName() (clusterName string, err error)

func (*CommandExecutorResource) GetCommandExecutor

func (c *CommandExecutorResource) GetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor, err error)

func (*CommandExecutorResource) GetKubectlContext

func (c *CommandExecutorResource) GetKubectlContext(ctx context.Context) (contextName string, err error)

func (*CommandExecutorResource) GetName

func (c *CommandExecutorResource) GetName() (name string, err error)

func (*CommandExecutorResource) GetNamespace

func (c *CommandExecutorResource) GetNamespace() (namespace kubernetesutils.Namespace, err error)

func (*CommandExecutorResource) GetNamespaceName

func (c *CommandExecutorResource) GetNamespaceName() (namsepaceName string, err error)

func (*CommandExecutorResource) GetResourceAndTypeAndNamespaceAndClusterName

func (c *CommandExecutorResource) GetResourceAndTypeAndNamespaceAndClusterName() (resourceName string, resourceTypeName string, namespaceName string, clusterName string, err error)

func (*CommandExecutorResource) GetTypeName

func (c *CommandExecutorResource) GetTypeName() (typeName string, err error)

func (*CommandExecutorResource) SetCommandExecutor

func (c *CommandExecutorResource) SetCommandExecutor(commandExecutor commandexecutor.CommandExecutor) (err error)

func (*CommandExecutorResource) SetName

func (c *CommandExecutorResource) SetName(name string) (err error)

func (*CommandExecutorResource) SetNamespace

func (c *CommandExecutorResource) SetNamespace(namespace kubernetesutils.Namespace) (err error)

func (*CommandExecutorResource) SetTypeName

func (c *CommandExecutorResource) SetTypeName(typeName string) (err error)

type CommandExecutorRole

type CommandExecutorRole struct {
	// contains filtered or unexported fields
}

func NewCommandExecutorRole

func NewCommandExecutorRole() (c *CommandExecutorRole)

func (*CommandExecutorRole) GetName

func (c *CommandExecutorRole) GetName() (name string, err error)

func (*CommandExecutorRole) GetNamespace

func (c *CommandExecutorRole) GetNamespace() (namespace kubernetesutils.Namespace, err error)

func (*CommandExecutorRole) SetName

func (c *CommandExecutorRole) SetName(name string) (err error)

func (*CommandExecutorRole) SetNamespace

func (c *CommandExecutorRole) SetNamespace(namespace kubernetesutils.Namespace) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL