addon

package
v0.5.9 Latest Latest
Warning

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

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

Documentation

Overview

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2020 The cert-manager Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2020 The cert-manager Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2020 The cert-manager Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2020 The cert-manager Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallGlobalAddon

func InstallGlobalAddon(addon Addon, cfg *Config)

func PrintLogs

func PrintLogs()

func UninstallGlobalAddons

func UninstallGlobalAddons()

Types

type Addon

type Addon interface {
	Setup(*Config) error
	Install() error
	Logs() error
	Uninstall() error
}

type ArgoCDApplication added in v0.5.4

type ArgoCDApplication struct {
	Name                 string
	Namespace            string
	DestinationNamespace string
	HelmChart            string
	HelmRepo             string
	HelmRevision         string
	HelmValues           string
	// contains filtered or unexported fields
}

HelmChart installs the specified Chart into the cluster.

func (*ArgoCDApplication) Install added in v0.5.4

func (c *ArgoCDApplication) Install() error

Install adds the chart repo and installs the helm chart.

func (*ArgoCDApplication) Logs added in v0.5.4

func (c *ArgoCDApplication) Logs() error

func (*ArgoCDApplication) Setup added in v0.5.4

func (c *ArgoCDApplication) Setup(cfg *Config) error

Setup stores the config in an internal field to get access to the k8s api in orderto fetch logs.

func (*ArgoCDApplication) Uninstall added in v0.5.4

func (c *ArgoCDApplication) Uninstall() error

Uninstall removes the chart aswell as the repo.

type ChartRepo

type ChartRepo struct {
	Name string
	URL  string
}

type Config

type Config struct {
	// KubeConfig which was used to create the connection.
	KubeConfig *rest.Config

	// Kubernetes API clientsets
	KubeClientSet kubernetes.Interface

	// controller-runtime client for newer controllers
	CRClient crclient.Client
}

type ESO

type ESO struct {
	*HelmChart
}

func NewESO

func NewESO(mutators ...MutationFunc) *ESO

func (*ESO) Install added in v0.4.0

func (l *ESO) Install() error

func (*ESO) Uninstall added in v0.5.4

func (l *ESO) Uninstall() error

type FluxHelmRelease added in v0.5.4

type FluxHelmRelease struct {
	Name            string
	Namespace       string
	TargetNamespace string
	HelmChart       string
	HelmRepo        string
	HelmRevision    string
	HelmValues      string
	// contains filtered or unexported fields
}

HelmChart installs the specified Chart into the cluster.

func (*FluxHelmRelease) Install added in v0.5.4

func (c *FluxHelmRelease) Install() error

Install adds the chart repo and installs the helm chart.

func (*FluxHelmRelease) Logs added in v0.5.4

func (c *FluxHelmRelease) Logs() error

func (*FluxHelmRelease) Setup added in v0.5.4

func (c *FluxHelmRelease) Setup(cfg *Config) error

Setup stores the config in an internal field to get access to the k8s api in orderto fetch logs.

func (*FluxHelmRelease) Uninstall added in v0.5.4

func (c *FluxHelmRelease) Uninstall() error

Uninstall removes the chart aswell as the repo.

type HelmChart

type HelmChart struct {
	Namespace    string
	ReleaseName  string
	Chart        string
	ChartVersion string
	Repo         ChartRepo
	Vars         []StringTuple
	Values       []string
	Args         []string
	// contains filtered or unexported fields
}

HelmChart installs the specified Chart into the cluster.

func (*HelmChart) HasVar added in v0.5.4

func (c *HelmChart) HasVar(key, value string) bool

func (*HelmChart) Install

func (c *HelmChart) Install() error

Install adds the chart repo and installs the helm chart.

func (*HelmChart) Logs

func (c *HelmChart) Logs() error

Logs fetches the logs from all pods managed by this release and prints them out.

func (*HelmChart) Setup

func (c *HelmChart) Setup(cfg *Config) error

Setup stores the config in an internal field to get access to the k8s api in orderto fetch logs.

func (*HelmChart) Uninstall

func (c *HelmChart) Uninstall() error

Uninstall removes the chart aswell as the repo.

type HelmServer added in v0.5.4

type HelmServer struct {
	ChartDir      string
	ChartRevision string
	// contains filtered or unexported fields
}

func (*HelmServer) Install added in v0.5.4

func (s *HelmServer) Install() error

func (*HelmServer) Logs added in v0.5.4

func (s *HelmServer) Logs() error

func (*HelmServer) Setup added in v0.5.4

func (s *HelmServer) Setup(config *Config) error

func (*HelmServer) Uninstall added in v0.5.4

func (s *HelmServer) Uninstall() error

type MutationFunc added in v0.4.0

type MutationFunc func(eso *ESO)

func WithCRDs added in v0.5.4

func WithCRDs() MutationFunc

By default ESO is installed without CRDs when using WithCRDs() the CRDs will be installed before and uninstalled after use.

func WithControllerClass added in v0.4.0

func WithControllerClass(class string) MutationFunc

func WithNamespace added in v0.4.0

func WithNamespace(namespace string) MutationFunc

func WithNamespaceScope added in v0.4.0

func WithNamespaceScope(namespace string) MutationFunc

func WithReleaseName added in v0.4.0

func WithReleaseName(name string) MutationFunc

func WithServiceAccount added in v0.4.0

func WithServiceAccount(saName string) MutationFunc

func WithoutCertController added in v0.5.0

func WithoutCertController() MutationFunc

func WithoutWebhook added in v0.5.0

func WithoutWebhook() MutationFunc

type OperatorInitResponse added in v0.3.3

type OperatorInitResponse struct {
	UnsealKeysB64 []string `json:"unseal_keys_b64"`
	RootToken     string   `json:"root_token"`
}

type StringTuple

type StringTuple struct {
	Key   string
	Value string
}

type Vault

type Vault struct {
	Namespace   string
	PodName     string
	VaultClient *vault.Client
	VaultURL    string

	RootToken          string
	VaultServerCA      []byte
	ServerCert         []byte
	ServerKey          []byte
	VaultClientCA      []byte
	ClientCert         []byte
	ClientKey          []byte
	JWTPubkey          []byte
	JWTPrivKey         []byte
	JWTToken           string
	JWTRole            string
	JWTPath            string
	JWTK8sPath         string
	KubernetesAuthPath string
	KubernetesAuthRole string

	AppRoleSecret string
	AppRoleID     string
	AppRolePath   string
	// contains filtered or unexported fields
}

func NewVault

func NewVault(namespace string) *Vault

func (*Vault) Install

func (l *Vault) Install() error

func (*Vault) Logs added in v0.3.3

func (l *Vault) Logs() error

func (*Vault) Setup added in v0.3.3

func (l *Vault) Setup(cfg *Config) error

func (*Vault) Uninstall added in v0.3.3

func (l *Vault) Uninstall() error

Jump to

Keyboard shortcuts

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