Documentation ¶
Index ¶
- Variables
- func GetInstallArgs(args []v1alpha1.InstallArgs) []bom.KeyValue
- func SetDefaultUpgradeFunc()
- func SetUpgradeFunc(f upgradeFuncSig)
- type HelmComponent
- func (h HelmComponent) Exists(ctx spi.ComponentContext) (bool, error)
- func (h HelmComponent) GetCertificateNames(_ spi.ComponentContext) []types.NamespacedName
- func (h HelmComponent) GetComputedValues(context spi.ComponentContext) (chartutil.Values, error)
- func (h HelmComponent) GetDependencies() []string
- func (h HelmComponent) GetIngressNames(context spi.ComponentContext) []types.NamespacedName
- func (h HelmComponent) GetJSONName() string
- func (h HelmComponent) GetMinVerrazzanoVersion() string
- func (h HelmComponent) GetModuleConfigAsHelmValues(effectiveCR *v1alpha1.Verrazzano) (*apiextensionsv1.JSON, error)
- func (h HelmComponent) GetOverrides(cr runtime.Object) interface{}
- func (h HelmComponent) GetSkipUpgrade() bool
- func (h HelmComponent) GetWatchDescriptors() []controllerspi.WatchDescriptor
- func (h HelmComponent) Install(context spi.ComponentContext) error
- func (h HelmComponent) IsAvailable(context spi.ComponentContext) (string, v1alpha1.ComponentAvailability)
- func (h HelmComponent) IsEnabled(_ runtime.Object) bool
- func (h HelmComponent) IsInstalled(ctx spi.ComponentContext) (bool, error)
- func (h HelmComponent) IsOperatorInstallSupported() bool
- func (h HelmComponent) IsOperatorUninstallSupported() bool
- func (h HelmComponent) IsReady(context spi.ComponentContext) bool
- func (h HelmComponent) MonitorOverrides(ctx spi.ComponentContext) bool
- func (h HelmComponent) Name() string
- func (h HelmComponent) Namespace() string
- func (h HelmComponent) PostInstall(context spi.ComponentContext) error
- func (h HelmComponent) PostUninstall(context spi.ComponentContext) error
- func (h HelmComponent) PostUpgrade(_ spi.ComponentContext) error
- func (h HelmComponent) PreInstall(context spi.ComponentContext) error
- func (h HelmComponent) PreUninstall(context spi.ComponentContext) error
- func (h HelmComponent) PreUpgrade(context spi.ComponentContext) error
- func (h HelmComponent) Reconcile(_ spi.ComponentContext) error
- func (h HelmComponent) ResolveNamespace(ctx spi.ComponentContext) string
- func (h HelmComponent) ShouldInstallBeforeUpgrade() bool
- func (h HelmComponent) ShouldUseModule() bool
- func (h HelmComponent) Uninstall(context spi.ComponentContext) error
- func (h HelmComponent) Upgrade(context spi.ComponentContext) error
- func (h HelmComponent) ValidateInstall(vz *v1alpha1.Verrazzano) error
- func (h HelmComponent) ValidateInstallV1Beta1(vz *v1beta1.Verrazzano) error
- func (h HelmComponent) ValidateUpdate(old *v1alpha1.Verrazzano, new *v1alpha1.Verrazzano) error
- func (h HelmComponent) ValidateUpdateV1Beta1(old *v1beta1.Verrazzano, new *v1beta1.Verrazzano) error
Constants ¶
This section is empty.
Variables ¶
var UpgradePrehooksEnabled = true
UpgradePrehooksEnabled is needed so that higher level units tests can disable as needed
Functions ¶
func GetInstallArgs ¶
func GetInstallArgs(args []v1alpha1.InstallArgs) []bom.KeyValue
GetInstallArgs returns the list of install args as Helm value pairs
func SetDefaultUpgradeFunc ¶ added in v1.3.0
func SetDefaultUpgradeFunc()
func SetUpgradeFunc ¶ added in v1.3.0
func SetUpgradeFunc(f upgradeFuncSig)
Types ¶
type HelmComponent ¶
type HelmComponent struct { // ReleaseName is the helm chart release name ReleaseName string // JSONName is the josn name of the verrazzano component in CRD JSONName string // ChartDir is the helm chart directory ChartDir string // ChartNamespace is the namespace passed to the helm command ChartNamespace string // IgnoreNamespaceOverride bool indicates that the namespace param passed to // Upgrade is ignored IgnoreNamespaceOverride bool // IgnoreImageOverrides bool indicates that the image overrides processing should be ignored // This should only be set to true if the component doesn't have images (like istio-base) in // which case it is not in the bom IgnoreImageOverrides bool // ValuesFile is the helm chart values override file ValuesFile string // InstallBeforeUpgrade if component can be installed before upgade is done, default false InstallBeforeUpgrade bool // PreInstallFunc is an optional function to run before installing PreInstallFunc preInstallFuncSig // PostInstallFunc is an optional function to run after installing PostInstallFunc postInstallFuncSig // PreUpgradeFunc is an optional function to run before upgrading PreUpgradeFunc preUpgradeFuncSig // AppendOverridesFunc is an optional function get additional override values AppendOverridesFunc appendOverridesSig // GetInstallOverridesFunc is an optional function get install override sources GetInstallOverridesFunc getInstallOverridesSig // ResolveNamespaceFunc is an optional function to process the namespace name ResolveNamespaceFunc resolveNamespaceSig // SupportsOperatorInstall Indicates whether or not the component supports install via the operator SupportsOperatorInstall bool // SupportsOperatorUninstall Indicates whether or not the component supports uninstall via the operator SupportsOperatorUninstall bool // WaitForInstall Indicates if the operator should wait for helm operations to complete (synchronous behavior) WaitForInstall bool // ImagePullSecretKeyname is the Helm Value Key for the image pull secret for a chart ImagePullSecretKeyname string // Dependencies is a list of Dependencies for this component, by component/release name Dependencies []string // SkipUpgrade when true will skip upgrading this component in the upgrade loop // This is for the istio helm components SkipUpgrade bool // The minimum required Verrazzano version. MinVerrazzanoVersion string // Ingress names associated with the component IngressNames []types.NamespacedName // Certificates associated with the component Certificates []types.NamespacedName AvailabilityObjects *ready.AvailabilityObjects }
HelmComponent struct needed to implement a component
func (HelmComponent) Exists ¶ added in v1.4.8
func (h HelmComponent) Exists(ctx spi.ComponentContext) (bool, error)
func (HelmComponent) GetCertificateNames ¶ added in v1.3.0
func (h HelmComponent) GetCertificateNames(_ spi.ComponentContext) []types.NamespacedName
GetCertificateNames returns the list of expected certificates used by this component
func (HelmComponent) GetComputedValues ¶ added in v1.6.0
func (h HelmComponent) GetComputedValues(context spi.ComponentContext) (chartutil.Values, error)
GetComputedValues returns the computed Helm values for the component. Install is run with the dry run flag which will compute the Helm values without actually installing the component.
func (HelmComponent) GetDependencies ¶
func (h HelmComponent) GetDependencies() []string
GetDependencies returns the Dependencies of this component
func (HelmComponent) GetIngressNames ¶ added in v1.1.1
func (h HelmComponent) GetIngressNames(context spi.ComponentContext) []types.NamespacedName
func (HelmComponent) GetJSONName ¶ added in v1.3.0
func (h HelmComponent) GetJSONName() string
GetJSONName returns the josn name of the verrazzano component in CRD
func (HelmComponent) GetMinVerrazzanoVersion ¶
func (h HelmComponent) GetMinVerrazzanoVersion() string
GetMinVerrazzanoVersion returns the minimum Verrazzano version required by this component
func (HelmComponent) GetModuleConfigAsHelmValues ¶ added in v1.7.0
func (h HelmComponent) GetModuleConfigAsHelmValues(effectiveCR *v1alpha1.Verrazzano) (*apiextensionsv1.JSON, error)
GetModuleConfigAsHelmValues returns an unstructured JSON snippet representing the portion of the Verrazzano CR that corresponds to the module
func (HelmComponent) GetOverrides ¶ added in v1.3.1
func (h HelmComponent) GetOverrides(cr runtime.Object) interface{}
GetOverrides returns the list of install overrides for a component
func (HelmComponent) GetSkipUpgrade ¶
func (h HelmComponent) GetSkipUpgrade() bool
func (HelmComponent) GetWatchDescriptors ¶ added in v1.7.0
func (h HelmComponent) GetWatchDescriptors() []controllerspi.WatchDescriptor
GetWatchDescriptors returns the list of WatchDescriptors for objects being watched by the component
func (HelmComponent) Install ¶
func (h HelmComponent) Install(context spi.ComponentContext) error
Install installs the component using Helm
func (HelmComponent) IsAvailable ¶ added in v1.5.0
func (h HelmComponent) IsAvailable(context spi.ComponentContext) (string, v1alpha1.ComponentAvailability)
IsAvailable Indicates whether a component is available for end users Components should implement comprehensive availability checks, supplying an appropriate reason if the check fails.
func (HelmComponent) IsEnabled ¶
func (h HelmComponent) IsEnabled(_ runtime.Object) bool
IsEnabled Indicates whether a component is enabled for installation
func (HelmComponent) IsInstalled ¶
func (h HelmComponent) IsInstalled(ctx spi.ComponentContext) (bool, error)
IsInstalled Indicates whether the component is installed
func (HelmComponent) IsOperatorInstallSupported ¶
func (h HelmComponent) IsOperatorInstallSupported() bool
IsOperatorInstallSupported Returns true if the component supports direct install via the operator
func (HelmComponent) IsOperatorUninstallSupported ¶ added in v1.4.0
func (h HelmComponent) IsOperatorUninstallSupported() bool
IsOperatorUninstallSupported Returns true if the component supports direct uninstall via the operator
func (HelmComponent) IsReady ¶
func (h HelmComponent) IsReady(context spi.ComponentContext) bool
IsReady Indicates whether a component is available and ready
func (HelmComponent) MonitorOverrides ¶ added in v1.3.1
func (h HelmComponent) MonitorOverrides(ctx spi.ComponentContext) bool
func (HelmComponent) Namespace ¶ added in v1.4.0
func (h HelmComponent) Namespace() string
Namespace returns the component namespace
func (HelmComponent) PostInstall ¶
func (h HelmComponent) PostInstall(context spi.ComponentContext) error
func (HelmComponent) PostUninstall ¶ added in v1.4.0
func (h HelmComponent) PostUninstall(context spi.ComponentContext) error
func (HelmComponent) PostUpgrade ¶
func (h HelmComponent) PostUpgrade(_ spi.ComponentContext) error
func (HelmComponent) PreInstall ¶
func (h HelmComponent) PreInstall(context spi.ComponentContext) error
func (HelmComponent) PreUninstall ¶ added in v1.4.0
func (h HelmComponent) PreUninstall(context spi.ComponentContext) error
func (HelmComponent) PreUpgrade ¶
func (h HelmComponent) PreUpgrade(context spi.ComponentContext) error
func (HelmComponent) Reconcile ¶ added in v1.2.0
func (h HelmComponent) Reconcile(_ spi.ComponentContext) error
func (HelmComponent) ResolveNamespace ¶ added in v1.6.0
func (h HelmComponent) ResolveNamespace(ctx spi.ComponentContext) string
func (HelmComponent) ShouldInstallBeforeUpgrade ¶ added in v1.4.0
func (h HelmComponent) ShouldInstallBeforeUpgrade() bool
ShouldInstallBeforeUpgrade returns true if component can be installed before upgrade is done
func (HelmComponent) ShouldUseModule ¶ added in v1.7.0
func (h HelmComponent) ShouldUseModule() bool
ShouldUseModule returns true if component is implemented using a Module
func (HelmComponent) Uninstall ¶ added in v1.4.0
func (h HelmComponent) Uninstall(context spi.ComponentContext) error
func (HelmComponent) Upgrade ¶
func (h HelmComponent) Upgrade(context spi.ComponentContext) error
Upgrade is done by using the helm chart upgrade command. This command will apply the latest chart that is included in the operator image, while retaining any helm Value overrides that were applied during install. Along with the override files in helm_config, we need to generate image overrides using the BOM json file. Each component also has the ability to add additional override parameters.
func (HelmComponent) ValidateInstall ¶ added in v1.3.0
func (h HelmComponent) ValidateInstall(vz *v1alpha1.Verrazzano) error
ValidateInstall checks if the specified Verrazzano CR is valid for this component to be installed
func (HelmComponent) ValidateInstallV1Beta1 ¶ added in v1.4.0
func (h HelmComponent) ValidateInstallV1Beta1(vz *v1beta1.Verrazzano) error
ValidateInstall checks if the specified Verrazzano CR is valid for this component to be installed
func (HelmComponent) ValidateUpdate ¶ added in v1.3.0
func (h HelmComponent) ValidateUpdate(old *v1alpha1.Verrazzano, new *v1alpha1.Verrazzano) error
ValidateUpdate checks if the specified new Verrazzano CR is valid for this component to be updated
func (HelmComponent) ValidateUpdateV1Beta1 ¶ added in v1.4.0
func (h HelmComponent) ValidateUpdateV1Beta1(old *v1beta1.Verrazzano, new *v1beta1.Verrazzano) error
ValidateUpdate checks if the specified new Verrazzano CR is valid for this component to be updated