deploy

package
v0.22.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusFailed  InitObjectStatus = "Failed"
	StatusSuccess InitObjectStatus = "Success"
	StatusPending InitObjectStatus = "Pending"

	StatusKey = "vcluster.loft.sh/status"

	DefaultTimeOut = 180 * time.Second
	HelmWorkDir    = "/tmp"

	ChartPullError = "ChartPullFailed"
	InstallError   = "InstallFailed"
	UpgradeError   = "UpgradeFailed"
	UninstallError = "UninstallFailed"

	VClusterDeployConfigMap          = "vcluster-deploy"
	VClusterDeployConfigMapNamespace = "kube-system"
)

Variables

This section is empty.

Functions

func ApplyGivenInitManifests

func ApplyGivenInitManifests(ctx context.Context, vClient client.Client, vConfig *rest.Config, rawManifests, lastAppliedManifests string) error

func ManifestStringToUnstructuredArray

func ManifestStringToUnstructuredArray(out, defaultNamespace string) ([]*unstructured.Unstructured, error)

func RegisterInitManifestsController

func RegisterInitManifestsController(controllerCtx *synccontext.ControllerContext) error

Types

type ChartStatus

type ChartStatus struct {
	Name                       string `json:"name,omitempty"`
	Namespace                  string `json:"namespace,omitempty"`
	Phase                      string `json:"phase,omitempty"`
	Reason                     string `json:"reason,omitempty"`
	Message                    string `json:"message,omitempty"`
	LastAppliedChartConfigHash string `json:"lastAppliedChartConfigHash,omitempty"`
}

type Deployer

type Deployer struct {
	Log loghelper.Logger

	VirtualManager ctrl.Manager
	HelmClient     helm.Client
}

func (*Deployer) DeployHelmCharts

func (r *Deployer) DeployHelmCharts(ctx context.Context, vConfig *config.VirtualClusterConfig) error

func (*Deployer) DeployInitManifests

func (r *Deployer) DeployInitManifests(ctx context.Context, vConfig *config.VirtualClusterConfig) error

func (*Deployer) ProcessHelmChart

func (r *Deployer) ProcessHelmChart(ctx context.Context, vConfig *config.VirtualClusterConfig, configMap *corev1.ConfigMap) error

func (*Deployer) ProcessInitManifests

func (r *Deployer) ProcessInitManifests(ctx context.Context, vConfig *config.VirtualClusterConfig, configMap *corev1.ConfigMap) error

func (*Deployer) UpdateConfigMap

func (r *Deployer) UpdateConfigMap(ctx context.Context, lastError error, vConfig *config.VirtualClusterConfig, oldConfigMap *corev1.ConfigMap, newConfigMap *corev1.ConfigMap) error

type InitObjectStatus

type InitObjectStatus string

type KObject

type KObject struct {
	APIVersion string
	Kind       string
	Namespace  string
	Name       string
}

func UnstructuredToKObject

func UnstructuredToKObject(obj unstructured.Unstructured) KObject

func (*KObject) Equals

func (k *KObject) Equals(obj unstructured.Unstructured) bool

type ManifestsStatus

type ManifestsStatus struct {
	Phase                string `json:"phase,omitempty"`
	Reason               string `json:"reason,omitempty"`
	Message              string `json:"message,omitempty"`
	LastAppliedManifests string `json:"lastAppliedManifests,omitempty"`
}

type Status

type Status struct {
	Phase   string `json:"phase,omitempty"`
	Reason  string `json:"reason,omitempty"`
	Message string `json:"message,omitempty"`

	Charts    []ChartStatus   `json:"charts,omitempty"`
	Manifests ManifestsStatus `json:"manifests,omitempty"`
}

func ParseStatus

func ParseStatus(cm *corev1.ConfigMap) *Status

type UnstructuredMap

type UnstructuredMap map[KObject]*unstructured.Unstructured

Jump to

Keyboard shortcuts

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