Documentation
¶
Index ¶
- Constants
- func ApplyGivenInitManifests(ctx context.Context, vClient client.Client, vConfig *rest.Config, ...) error
- func ManifestStringToUnstructuredArray(out, defaultNamespace string) ([]*unstructured.Unstructured, error)
- type Chart
- type ChartStatus
- type InitManifestsConfigMapReconciler
- func (r *InitManifestsConfigMapReconciler) ProcessHelmChart(ctx context.Context, cm *corev1.ConfigMap) (bool, error)
- func (r *InitManifestsConfigMapReconciler) ProcessInitManifests(ctx context.Context, cm *corev1.ConfigMap) (bool, error)
- func (r *InitManifestsConfigMapReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
- func (r *InitManifestsConfigMapReconciler) SetupWithManager(hostMgr ctrl.Manager) error
- func (r *InitManifestsConfigMapReconciler) UpdateConfigMap(ctx context.Context, lastError error, requeue bool, ...) error
- type InitObjectStatus
- type KObject
- type ManifestsStatus
- type Status
- type UnstructuredMap
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) SetupWithManager ¶
func (r *InitManifestsConfigMapReconciler) SetupWithManager(hostMgr ctrl.Manager) 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
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
Click to show internal directories.
Click to hide internal directories.