manifests

package
v0.19.5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InitChartsKey      = "charts"
	InitManifestsKey   = "manifests"
	InitManifestSuffix = "-init-manifests"

	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"
)

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)

Types

type Chart added in v0.11.0

type Chart struct {
	Name             string `json:"name,omitempty"`
	Repo             string `json:"repo,omitempty"`
	Insecure         bool   `json:"insecure,omitempty"`
	Version          string `json:"version,omitempty"`
	Username         string `json:"username,omitempty"`
	Password         string `json:"password,omitempty"`
	Values           string `json:"values,omitempty"`
	Timeout          string `json:"timeout,omitempty"`
	Bundle           string `json:"bundle,omitempty"`
	ReleaseName      string `json:"releaseName,omitempty"`
	ReleaseNamespace string `json:"releaseNamespace,omitempty"`
}

type ChartStatus added in v0.11.0

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 InitManifestsConfigMapReconciler

type InitManifestsConfigMapReconciler struct {
	Log loghelper.Logger

	LocalClient    client.Client
	VirtualManager ctrl.Manager

	HelmClient helm.Client
}

func (*InitManifestsConfigMapReconciler) ProcessHelmChart added in v0.11.0

func (r *InitManifestsConfigMapReconciler) ProcessHelmChart(ctx context.Context, cm *corev1.ConfigMap) (bool, error)

func (*InitManifestsConfigMapReconciler) ProcessInitManifests added in v0.11.0

func (r *InitManifestsConfigMapReconciler) ProcessInitManifests(ctx context.Context, cm *corev1.ConfigMap) (bool, error)

func (*InitManifestsConfigMapReconciler) Reconcile

func (r *InitManifestsConfigMapReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)

func (*InitManifestsConfigMapReconciler) UpdateConfigMap added in v0.11.0

func (r *InitManifestsConfigMapReconciler) UpdateConfigMap(ctx context.Context, lastError error, requeue bool, oldConfigMap *corev1.ConfigMap, newConfigMap *corev1.ConfigMap) error

type InitObjectStatus added in v0.11.0

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 added in v0.11.0

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 added in v0.11.0

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 added in v0.11.0

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