workflow

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DeleteClusterDNSRecordsActivityName = "delete-cluster-dns-records"
View Source
const DeleteHelmDeploymentsActivityName = "delete-helm-deployments"
View Source
const DeleteK8sResourcesWorkflowName = "delete-k8s-resources"
View Source
const DeleteNamespaceResourcesActivityName = "delete-namespace-resources"
View Source
const DeleteNamespaceServicesActivityName = "delete-namespace-services"
View Source
const DeleteUnusedClusterSecretsActivityName = "delete-unused-cluster-secrets"
View Source
const DeleteUserNamespacesActivityName = "delete-user-namespaces"
View Source
const HealthCheckActivityName = "k8s-health-check"
View Source
const WaitPersistentVolumesDeletionActivityName = "wait-persistent-volumes-deletion"

Variables

This section is empty.

Functions

func DeleteK8sResourcesWorkflow

func DeleteK8sResourcesWorkflow(ctx workflow.Context, input DeleteK8sResourcesWorkflowInput) error

Types

type ClientFactory

type ClientFactory interface {
	// FromSecret creates a Kubernetes client for a cluster from a secret.
	FromSecret(ctx context.Context, secretID string) (kubernetes.Interface, error)
}

ClientFactory returns a Kubernetes client.

type ClusterDNSRecordsDeleter

type ClusterDNSRecordsDeleter interface {
	Delete(organizationID uint, clusterUID string) error
}

type DeleteClusterDNSRecordsActivity

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

func (DeleteClusterDNSRecordsActivity) Execute

type DeleteClusterDNSRecordsActivityInput

type DeleteClusterDNSRecordsActivityInput struct {
	OrganizationID uint
	ClusterUID     string
}

type DeleteHelmDeploymentsActivity

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

func MakeDeleteHelmDeploymentsActivity

func MakeDeleteHelmDeploymentsActivity(k8sConfigGetter K8sConfigGetter, releaseDeleter helm.ReleaseDeleter, logger logrus.FieldLogger) DeleteHelmDeploymentsActivity

func (DeleteHelmDeploymentsActivity) Execute

type DeleteHelmDeploymentsActivityInput

type DeleteHelmDeploymentsActivityInput struct {
	OrganizationID uint
	ClusterName    string
	K8sSecretID    string
}

type DeleteK8sResourcesWorkflowInput

type DeleteK8sResourcesWorkflowInput struct {
	OrganizationID uint
	ClusterName    string
	K8sSecretID    string
}

type DeleteNamespaceResourcesActivity

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

func MakeDeleteNamespaceResourcesActivity

func MakeDeleteNamespaceResourcesActivity(deleter NamespaceResourcesDeleter, k8sConfigGetter K8sConfigGetter) DeleteNamespaceResourcesActivity

func (DeleteNamespaceResourcesActivity) Execute

type DeleteNamespaceResourcesActivityInput

type DeleteNamespaceResourcesActivityInput struct {
	OrganizationID uint
	ClusterName    string
	K8sSecretID    string
	Namespace      string
}

type DeleteNamespaceServicesActivity

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

func MakeDeleteNamespaceServicesActivity

func MakeDeleteNamespaceServicesActivity(deleter NamespaceServicesDeleter, k8sConfigGetter K8sConfigGetter) DeleteNamespaceServicesActivity

func (DeleteNamespaceServicesActivity) Execute

type DeleteNamespaceServicesActivityInput

type DeleteNamespaceServicesActivityInput struct {
	OrganizationID uint
	ClusterName    string
	K8sSecretID    string
	Namespace      string
}

type DeleteUnusedClusterSecretsActivity

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

func MakeDeleteUnusedClusterSecretsActivity

func MakeDeleteUnusedClusterSecretsActivity(secrets SecretStore) DeleteUnusedClusterSecretsActivity

func (DeleteUnusedClusterSecretsActivity) Execute

type DeleteUnusedClusterSecretsActivityInput

type DeleteUnusedClusterSecretsActivityInput struct {
	OrganizationID uint
	ClusterUID     string
}

type DeleteUserNamespacesActivity

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

func MakeDeleteUserNamespacesActivity

func MakeDeleteUserNamespacesActivity(deleter UserNamespaceDeleter, k8sConfigGetter K8sConfigGetter) DeleteUserNamespacesActivity

type DeleteUserNamespacesActivityInput

type DeleteUserNamespacesActivityInput struct {
	OrganizationID uint
	ClusterName    string
	K8sSecretID    string
}

type DeleteUserNamespacesActivityOutput

type DeleteUserNamespacesActivityOutput struct {
	NamespacesLeft []string
}

type HealthCheckActivity

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

func NewHealthCheckActivity

func NewHealthCheckActivity(
	checker HealthChecker, clientFactory ClientFactory,
) HealthCheckActivity

NewHealthCheckActivity returns a new HealthCheckActivity.

func (HealthCheckActivity) Execute

type HealthCheckActivityInput

type HealthCheckActivityInput struct {
	SecretID string
}

type HealthChecker

type HealthChecker interface {
	Check(ctx context.Context, client kubernetes.Interface) error
}

HealthChecker returns the result of the healthcheck

type K8sConfigGetter

type K8sConfigGetter interface {
	Get(organizationID uint, k8sSecretID string) ([]byte, error)
}

type NamespaceResourcesDeleter

type NamespaceResourcesDeleter interface {
	Delete(ctx context.Context, organizationID uint, clusterName string, k8sConfig []byte, namespace string) error
}

type NamespaceServicesDeleter

type NamespaceServicesDeleter interface {
	Delete(ctx context.Context, organizationID uint, clusterName string, k8sConfig []byte, namespace string) error
}

type SecretStore

type SecretStore interface {
	DeleteByClusterUID(organizationID uint, clusterUID string) error
}

type UserNamespaceDeleter

type UserNamespaceDeleter interface {
	Delete(ctx context.Context, organizationID uint, clusterName string, nsFilter *corev1.NamespaceList, k8sConfig []byte) ([]string, error)
}

type WaitPersistentVolumesDeletionActivity

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

WaitPersistentVolumesDeletionActivity collects the PVs that were created through PVCs and are expected to be deleted by Kubernetes upon cluster deletion.

func MakeWaitPersistentVolumesDeletionActivity

func MakeWaitPersistentVolumesDeletionActivity(k8sConfigGetter K8sConfigGetter, logger logrus.FieldLogger) WaitPersistentVolumesDeletionActivity

func (WaitPersistentVolumesDeletionActivity) Execute

type WaitPersistentVolumesDeletionActivityInput

type WaitPersistentVolumesDeletionActivityInput struct {
	OrganizationID uint
	ClusterName    string
	K8sSecretID    string
}

Jump to

Keyboard shortcuts

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