provision

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: EPL-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContainerFailureStateReasons = []string{
	"CrashLoopBackOff",
	"ImagePullBackOff",
	"CreateContainerError",
	"RunContainerError",
}

Functions

func DeleteWorkspaceDeployment

func DeleteWorkspaceDeployment(ctx context.Context, workspace *dw.DevWorkspace, client runtimeClient.Client) (wait bool, err error)

DeleteWorkspaceDeployment deletes the deployment for the DevWorkspace

func GetDevWorkspaceSecurityContext

func GetDevWorkspaceSecurityContext() *corev1.PodSecurityContext

func ScaleDeploymentToZero added in v0.3.0

func ScaleDeploymentToZero(workspace *dw.DevWorkspace, client runtimeClient.Client) error

ScaleDeploymentToZero scales the cluster deployment to zero

func SyncMutableObjects

func SyncMutableObjects(objects []runtime.Object, client client.Client, reqLogger logr.Logger) (requeue bool, err error)

SyncMutableObjects synchronizes runtime objects and changes/updates existing ones

func SyncObject

func SyncObject(object runtime.Object, client client.Client, reqLogger logr.Logger, update bool) (clusterObject runtime.Object, requeue bool, apiErr error)

SyncObject synchronizes a runtime object and changes/updates existing ones

Types

type ClusterAPI

type ClusterAPI struct {
	Client client.Client
	Scheme *runtime.Scheme
	Logger logr.Logger
	Ctx    context.Context
}

type DeploymentProvisioningStatus

type DeploymentProvisioningStatus struct {
	ProvisioningStatus
}

func SyncDeploymentToCluster

func SyncDeploymentToCluster(
	workspace *dw.DevWorkspace,
	podAdditions []v1alpha1.PodAdditions,
	saName string,
	clusterAPI ClusterAPI) DeploymentProvisioningStatus

type ProvisioningStatus

type ProvisioningStatus struct {
	// Continue should be true if cluster state matches spec state for this step
	Continue    bool
	Requeue     bool
	FailStartup bool
	Err         error
	Message     string
}

func SyncRBAC

func SyncRBAC(workspace *dw.DevWorkspace, client client.Client, reqLogger logr.Logger) ProvisioningStatus

SyncRBAC generates RBAC and synchronizes the runtime objects

func (*ProvisioningStatus) Info added in v0.4.0

func (s *ProvisioningStatus) Info() string

Info returns the the user-friendly info about provisioning status It includes message or error or both if present

type PullSecretsProvisioningStatus added in v0.2.0

type PullSecretsProvisioningStatus struct {
	ProvisioningStatus
	v1alpha1.PodAdditions
}

func PullSecrets added in v0.2.0

func PullSecrets(clusterAPI ClusterAPI) PullSecretsProvisioningStatus

type RoutingProvisioningStatus

type RoutingProvisioningStatus struct {
	ProvisioningStatus
	PodAdditions     *v1alpha1.PodAdditions
	ExposedEndpoints map[string]v1alpha1.ExposedEndpointList
}

func SyncRoutingToCluster

func SyncRoutingToCluster(
	workspace *dw.DevWorkspace,
	clusterAPI ClusterAPI) RoutingProvisioningStatus

type ServiceAcctProvisioningStatus

type ServiceAcctProvisioningStatus struct {
	ProvisioningStatus
	ServiceAccountName string
}

func SyncServiceAccount

func SyncServiceAccount(
	workspace *dw.DevWorkspace,
	additionalAnnotations map[string]string,
	clusterAPI ClusterAPI) ServiceAcctProvisioningStatus

Jump to

Keyboard shortcuts

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