Documentation
¶
Index ¶
- Constants
- func ApplyGivenInitManifests(ctx context.Context, vClient client.Client, vConfig *rest.Config, ...) error
- func ManifestStringToUnstructuredArray(out, defaultNamespace string) ([]*unstructured.Unstructured, error)
- func RegisterInitManifestsController(controllerCtx *synccontext.ControllerContext) error
- type ChartStatus
- type Deployer
- func (r *Deployer) DeployHelmCharts(ctx context.Context, vConfig *config.VirtualClusterConfig) error
- func (r *Deployer) DeployInitManifests(ctx context.Context, vConfig *config.VirtualClusterConfig) error
- func (r *Deployer) ProcessHelmChart(ctx context.Context, vConfig *config.VirtualClusterConfig, ...) error
- func (r *Deployer) ProcessInitManifests(ctx context.Context, vConfig *config.VirtualClusterConfig, ...) error
- func (r *Deployer) UpdateConfigMap(ctx context.Context, lastError error, vConfig *config.VirtualClusterConfig, ...) error
- type InitObjectStatus
- type KObject
- type ManifestsStatus
- type Status
- type UnstructuredMap
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 ¶ added in v0.22.0
func (r *Deployer) DeployHelmCharts(ctx context.Context, vConfig *config.VirtualClusterConfig) error
func (*Deployer) DeployInitManifests ¶ added in v0.22.0
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
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
Click to show internal directories.
Click to hide internal directories.