Documentation
¶
Index ¶
- Constants
- func LabelsForSimpleApp(name, version string) map[string]string
- func ReconcileDeployment(ctx context.Context, c client.Client, scheme *runtime.Scheme, ...) error
- func ReconcilePVC(ctx context.Context, c client.Client, scheme *runtime.Scheme, ...) error
- func ReconcileService(ctx context.Context, c client.Client, scheme *runtime.Scheme, ...) error
- type InvalidSpecError
Constants ¶
const ( // ConditionTypeReady indicates whether all SimpleApp resources have been // successfully reconciled and the Deployment is available. ConditionTypeReady = "Ready" // ConditionTypeProgressing indicates the Deployment is rolling out new pods. ConditionTypeProgressing = "Progressing" // ConditionTypeDegraded indicates the Deployment has not reached its // desired replica count or has failing pods. ConditionTypeDegraded = "Degraded" )
Variables ¶
This section is empty.
Functions ¶
func LabelsForSimpleApp ¶
LabelsForSimpleApp returns a standard set of labels for resources managed by this operator.
func ReconcileDeployment ¶
func ReconcileDeployment(ctx context.Context, c client.Client, scheme *runtime.Scheme, app *appsv1alpha1.SimpleApp, version string) error
ReconcileDeployment ensures the Deployment exists and matches the desired state declared in SimpleApp.Spec.Deployment.
func ReconcilePVC ¶
func ReconcilePVC(ctx context.Context, c client.Client, scheme *runtime.Scheme, app *appsv1alpha1.SimpleApp, version string) error
ReconcilePVC ensures the PersistentVolumeClaim matches the desired state or is deleted when the spec is removed.
Most PVC spec fields are immutable after the claim is bound. The only mutable field is spec.resources.requests.storage, which supports volume expansion when the StorageClass has allowVolumeExpansion: true. On update, we synchronize the storage request along with labels and owner references.
Types ¶
type InvalidSpecError ¶
InvalidSpecError is a permanent error indicating that a field in SimpleAppSpec contains invalid JSON that cannot be deserialized into the expected Kubernetes type.
func (*InvalidSpecError) Error ¶
func (e *InvalidSpecError) Error() string