Documentation ¶
Overview ¶
Package addons provides the mechanism to extend the kubernetes functionality by applying addons that provide new functions. This package also includes the addons
Index ¶
- Variables
- func DeployAddons(client clientset.Interface, addonConfiguration AddonConfiguration, ...) error
- func GetCiliumImage(imageTag string) string
- func GetCiliumInitImage(imageTag string) string
- func GetCiliumOperatorImage(imageTag string) string
- func GetDexImage(imageTag string) string
- func GetGangwayImage(imageTag string) string
- func GetKuredImage(imageTag string) string
- type Addon
- func (addon Addon) Apply(client clientset.Interface, addonConfiguration AddonConfiguration, ...) error
- func (addon Addon) HasToBeApplied(addonConfiguration AddonConfiguration, ...) (bool, error)
- func (addon Addon) Images(imageTag string) []string
- func (addon Addon) IsPresentForClusterVersion(clusterVersion *version.Version) bool
- func (addon Addon) Render(addonConfiguration AddonConfiguration) (string, error)
- func (addon Addon) Write(addonConfiguration AddonConfiguration) error
- type AddonConfiguration
- type ApplyBehavior
Constants ¶
This section is empty.
Variables ¶
var Addons = map[kubernetes.Addon]Addon{}
Functions ¶
func DeployAddons ¶
func DeployAddons(client clientset.Interface, addonConfiguration AddonConfiguration, applyBehavior ApplyBehavior) error
DeployAddons loops over the sorted list of addons, checks if each needs to be deployed and triggers its deployment
func GetCiliumImage ¶ added in v1.1.1
func GetCiliumInitImage ¶ added in v1.1.1
func GetCiliumOperatorImage ¶ added in v1.1.1
func GetDexImage ¶ added in v1.1.1
func GetGangwayImage ¶ added in v1.1.1
func GetKuredImage ¶ added in v1.1.1
Types ¶
type Addon ¶
type Addon struct {
// contains filtered or unexported fields
}
func (Addon) Apply ¶
func (addon Addon) Apply(client clientset.Interface, addonConfiguration AddonConfiguration, skubaConfiguration *skuba.SkubaConfiguration, applyBehavior ApplyBehavior) error
Apply deploys the addon by calling kubectl apply and pointing to the generated addon manifest
func (Addon) HasToBeApplied ¶
func (addon Addon) HasToBeApplied(addonConfiguration AddonConfiguration, skubaConfiguration *skuba.SkubaConfiguration) (bool, error)
HasToBeApplied decides if the Addon is deployed by checking its version with addonVersionLower
func (Addon) Images ¶ added in v1.1.1
Images returns the images required for this Addon to properly function
func (Addon) IsPresentForClusterVersion ¶
IsPresentForClusterVersion verifies if the Addon can be deployed with the current k8s version
func (Addon) Render ¶
func (addon Addon) Render(addonConfiguration AddonConfiguration) (string, error)
Render substitutes the variables in the template and returns a string with the addon manifest ready
func (Addon) Write ¶
func (addon Addon) Write(addonConfiguration AddonConfiguration) error
Write creates the manifest yaml file of the Addon after rendering its template
type AddonConfiguration ¶
type ApplyBehavior ¶
type ApplyBehavior uint
const ( // This is the default behavior for all operations except for Bootstrap, // the addon is always re-rendered prior to being applied. In an addons // upgrade operation for example, we always want to re-render the latest // contents and never reuse local file contents in case the upgrade was // executed inside a cluster definition folder AlwaysRender ApplyBehavior = iota // This is the desired behavior for Bootstrap, when the user can tweak // the addon configurations after `skuba cluster init`, so // `skuba node bootstrap` will apply the modified settings instead of // re-rendering them forcefully SkipRenderIfConfigFilePresent ApplyBehavior = iota )