addons

package
v1.4.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

README

Addons

Addons extend the functionality of kubernetes. You can think of them as plugins that hook into Kubernetes providing new infrastructure services, for example, network connectivity among pods.

Usage

All the go files in this directory (apart from the xxx_test.go files) are equipped with the functions and variables to deploy and configure the addons correctly.

All addons in this directory get deployed automatically by Skuba. They get registered through the init() function, which is called as soon as another package imports the addons package. To learn more about this go functionality read:

https://golang.org/doc/effective_go.html#init

How to create a new Addon

To create a new addon, check the rest of the addons source file to understand what is required. Again, as long as the addon is in this directory, it will get called.

You should also express the version mapping with kubernetes in:

https://github.com/SUSE/skuba/blob/master/internal/pkg/skuba/kubernetes/versions.go

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

Constants

This section is empty.

Variables

View Source
var Addons = map[kubernetes.Addon]Addon{}

Functions

func CheckLocalAddonsBaseManifests added in v1.4.6

func CheckLocalAddonsBaseManifests(addonConfiguration AddonConfiguration) (bool, error)

func DeployAddons

func DeployAddons(client clientset.Interface, addonConfiguration AddonConfiguration, dryRun bool) 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 GetCiliumImage(imageTag string) string

func GetCiliumInitImage added in v1.1.1

func GetCiliumInitImage(imageTag string) string

func GetCiliumOperatorImage added in v1.1.1

func GetCiliumOperatorImage(imageTag string) string

func GetDexImage added in v1.1.1

func GetDexImage(imageTag string) string

func GetGangwayImage added in v1.1.1

func GetGangwayImage(imageTag string) string

func GetKuceroImage added in v1.3.10

func GetKuceroImage(imageTag string) string

func GetKuredImage added in v1.1.1

func GetKuredImage(imageTag string) string

func GetMetricsServerImage added in v1.3.4

func GetMetricsServerImage(imageTag string) string

Types

type Addon

type Addon struct {
	Addon kubernetes.Addon
	// contains filtered or unexported fields
}

func (Addon) Apply

func (addon Addon) Apply(client clientset.Interface, addonConfiguration AddonConfiguration, skubaConfiguration *skuba.SkubaConfiguration, dryRun bool) 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

func (addon Addon) Images(imageTag string) []string

Images returns the images required for this Addon to properly function

func (Addon) IsPresentForClusterVersion

func (addon Addon) IsPresentForClusterVersion(clusterVersion *version.Version) bool

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) RenderPreflight added in v1.3.4

func (addon Addon) RenderPreflight(addonConfiguration AddonConfiguration) (string, error)

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 AddonConfiguration struct {
	ClusterVersion *version.Version
	ControlPlane   string
	ClusterName    string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL