Documentation ¶
Overview ¶
The addon package contains tools opinionated for managing Kubernetes cluster addons. The declarative.DeclarativeObject must be castable to a addonsv1alpha1.CommonObject in order for this pattern to be used.
What is an Addon Object?
An Addon Object is an instance of a type defined as a CustomResourceDefinition that implements the addonsv1alpha1.CommonObject interface. The object represents the intent to deploy an instance of a specific Addon in the cluster. This pattern manages a Kubernetes deployment for the specific addon based on the Addon Object.
Writing an Addon Operator ¶
Follow the dashboard walkthrough to stand up an addon operator[1]. Then dig into the declarative and addon patterns to extend it.
Index ¶
Constants ¶
const ( // Used to indicate that not all of application's components // have been deployed yet. Pending = "Pending" // Used to indicate that all of application's components // have already been deployed. Succeeded = "Succeeded" // Used to indicate that deployment of application's components // failed. Some components might be present, but deployment of // the remaining ones will not be re-attempted. Failed = "Failed" )
Application Constants
Variables ¶
This section is empty.
Functions ¶
func ApplyPatches ¶
func ApplyPatches(ctx context.Context, object declarative.DeclarativeObject, objects *manifest.Objects) error
ApplyPatches is an ObjectTransform to apply Patches specified on the Addon object to the manifest This transform requires the DeclarativeObject to implement addonsv1alpha1.Patchable
func Init ¶
func Init()
Init should be called at the beginning of the main function for all addon operator controllers
This function configures the environment and declarative library with defaults specific to addons.
func TransformApplicationFromStatus ¶
func TransformApplicationFromStatus(ctx context.Context, instance declarative.DeclarativeObject, objects *manifest.Objects) error
TransformApplicationFromStatus modifies the Application in the deployment based off the CommonStatus
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
apis/v1alpha1
The v1alpha1 API provides a set of common fields for addon objects.
|
The v1alpha1 API provides a set of common fields for addon objects. |
loaders
The loaders package implements loading of raw kubernetes manifests based off of the CommonSpec of an Addon object.
|
The loaders package implements loading of raw kubernetes manifests based off of the CommonSpec of an Addon object. |
status
The status package provides implementations for discovering and updating the CommonStatus on an Addon.
|
The status package provides implementations for discovering and updating the CommonStatus on an Addon. |