helm

package
v0.0.0-...-601a7b6 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Copyright © 2021 Rasa Technologies GmbH

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.

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 ErrorTimeoutWaitForCondition

func ErrorTimeoutWaitForCondition(err error) error

ErrorTimeoutWaitForCondition wraps the "timed out waiting for the condition" error returned by helm. If an error is different it returns the original message.

func ValuesHostNetworkRasaX

func ValuesHostNetworkRasaX() map[string]interface{}

ValuesHostNetworkRasaX returns helm values that set hostNetwork to 'true' for Rasa X deployment.

func ValuesPostgreSQLNodePort

func ValuesPostgreSQLNodePort() map[string]interface{}

ValuesPostgreSQLNodePort returns helm values which set the postgresql service type to NodePort.

func ValuesRabbitMQNodePort

func ValuesRabbitMQNodePort() map[string]interface{}

ValuesRabbitMQNodePort returns helm values which set the rabbitmq service type to NodePort.

func ValuesRasaXNodePort

func ValuesRasaXNodePort() map[string]interface{}

ValuesRasaXNodePort returns helm values which set the rasa-x service type to NodePort.

func ValuesSetRasaXHost

func ValuesSetRasaXHost(host string) map[string]interface{}

ValuesSetRasaXHost returns helm values which set the RASA_X_HOST env variable for the rasa-x deployment.

func ValuesSetRasaXHostAliases

func ValuesSetRasaXHostAliases(ipAddress string) map[string]interface{}

ValuesSetRasaXHostAliases returns helm vales which set hostAliases for the rasa-x deployment.

Types

type Helm

type Helm struct {
	// Settings describes all of the environment settings.
	Settings *cli.EnvSettings

	// ActionConfig injects the dependencies that all actions share.
	ActionConfig *action.Configuration

	// Namespace is a namespace name that is used for the current client.
	Namespace string

	// PVCName defines a persistent volume claim name that is used to create a PVC.
	PVCName string

	// KubernetesBackendType defines a Kubernetes cluster type.
	KubernetesBackendType types.KubernetesBackendType

	// Repositories store slices of helm repository that used used by the client.
	Repositories []types.RepositorySpec

	// Configuration defines configuration for the client.
	Configuration *types.HelmConfigurationSpec

	// Spinner stores a spinner client.
	Spinner *status.SpinnerMessage

	// Log defines logger.
	Log logr.Logger

	// RasaXChartName defines a helm chart name to be used.
	RasaXChartName string

	// Values store helm values that are used by the client.
	Values map[string]interface{}

	// CloudProvider stores information about a cloud provider.
	CloudProvider *cloud.Provider

	// Flags stores command flags and their values.
	Flags *types.RasaCtlFlags
	// contains filtered or unexported fields
}

Helm represents a helm client.

func (*Helm) GetAllValues

func (h *Helm) GetAllValues() (map[string]interface{}, error)

GetAllValues returns all values for the active helm release.

func (*Helm) GetConfiguration

func (h *Helm) GetConfiguration() *types.HelmConfigurationSpec

GetConfiguration returns the Helm.Configuration field.

func (*Helm) GetNamespace

func (h *Helm) GetNamespace() string

GetNamespace returns namespace name.

func (*Helm) GetStatus

func (h *Helm) GetStatus() (*release.Release, error)

GetStatus returns a helm relese status.

func (*Helm) GetValues

func (h *Helm) GetValues() map[string]interface{}

GetValues returns values used by the client.

func (*Helm) Install

func (h *Helm) Install() error

Install prepares and executes the installation.

func (*Helm) IsDeployed

func (h *Helm) IsDeployed() (bool, error)

IsDeployed checks if a given helm release is deployed. Return 'true' if release is found.

func (*Helm) ReadValuesFile

func (h *Helm) ReadValuesFile() error

ReadValuesFiles reads the value file and store values in the Helm.Values object.

func (*Helm) SetConfiguration

func (h *Helm) SetConfiguration(config *types.HelmConfigurationSpec)

SetConfiguration sets the Helm.Configuration field.

func (*Helm) SetKubernetesBackendType

func (h *Helm) SetKubernetesBackendType(backend types.KubernetesBackendType)

SetKubernetesBackendType sets the Helm.KubernetesBackendType field.

func (*Helm) SetNamespace

func (h *Helm) SetNamespace(namespace string) error

SetNamespace sets namespace for initialized client.

func (*Helm) SetPersistanceVolumeClaimName

func (h *Helm) SetPersistanceVolumeClaimName(name string)

SetPersistanceVolumeClaimName sets the Helm.PVCName field.

func (*Helm) SetValues

func (h *Helm) SetValues(values map[string]interface{})

SetValues sets values for the client.

func (*Helm) Uninstall

func (h *Helm) Uninstall() error

Uninstall prepares and executes the uninstall.

func (*Helm) Upgrade

func (h *Helm) Upgrade() error

Upgrade prepares and executes the upgrade.

type Interface

type Interface interface {
	SetNamespace(namespace string) error
	GetNamespace() string
	Install() error
	Uninstall() error
	Upgrade() error
	ReadValuesFile() error
	GetAllValues() (map[string]interface{}, error)
	IsDeployed() (bool, error)
	GetStatus() (*release.Release, error)
	SetConfiguration(config *types.HelmConfigurationSpec)
	GetConfiguration() *types.HelmConfigurationSpec
	GetValues() map[string]interface{}
	SetValues(values map[string]interface{})
	SetKubernetesBackendType(backend types.KubernetesBackendType)
	SetPersistanceVolumeClaimName(name string)
}

func New

func New(client *Helm) (Interface, error)

New initializes a new helm client.

Directories

Path Synopsis
Package fake is a generated GoMock package.
Package fake is a generated GoMock package.

Jump to

Keyboard shortcuts

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