utils

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertLabels

func ConvertLabels(labelSelector *metav1.LabelSelector) (labels.Selector, error)

ConvertLabels converts label selector to lables.Selector

func DownloadChart

func DownloadChart(configMap *corev1.ConfigMap,
	secret *corev1.Secret,
	chartsDir string,
	s *appv1.HelmRelease) (chartDir string, err error)

DownloadChart downloads the charts

func DownloadChartFromGitHub

func DownloadChartFromGitHub(configMap *corev1.ConfigMap, secret *corev1.Secret, destRepo string, s *appv1.HelmRelease) (chartDir string, err error)

DownloadChartFromGitHub downloads a chart into the charsDir

func DownloadChartFromHelmRepo

func DownloadChartFromHelmRepo(configMap *corev1.ConfigMap,
	secret *corev1.Secret,
	destRepo string,
	s *appv1.HelmRelease) (chartDir string, err error)

DownloadChartFromHelmRepo downloads a chart into the chartDir

func DownloadGitHubRepo

func DownloadGitHubRepo(configMap *corev1.ConfigMap,
	secret *corev1.Secret,
	destRepo string,
	urls []string, branch string) (commitID string, err error)

DownloadGitHubRepo downloads a github repo into the charsDir

func GetAccessToken

func GetAccessToken(secret *corev1.Secret) string

GetAccessToken retrieve the accessToken

func GetConfigMap

func GetConfigMap(client client.Client, parentNamespace string, configMapRef *corev1.ObjectReference) (configMap *corev1.ConfigMap, err error)

GetConfigMap search the config map containing the helm repo client configuration.

func GetHelmRepoClient

func GetHelmRepoClient(parentNamespace string, configMap *corev1.ConfigMap) (rest.HTTPClient, error)

GetHelmRepoClient returns an *http.client to access the helm repo

func GetPassword

func GetPassword(secret *corev1.Secret) string

GetPassword retrieve the password

func GetSecret

func GetSecret(client client.Client, parentNamespace string, secretRef *corev1.ObjectReference) (secret *corev1.Secret, err error)

GetSecret returns the secret to access the helm-repo

func IsOwned

func IsOwned(owner metav1.ObjectMeta, ownee metav1.ObjectMeta) bool

func LabelsChecker

func LabelsChecker(labelSelector *metav1.LabelSelector, ls map[string]string) bool

LabelsChecker checks labels against a labelSelector

Types

This section is empty.

Jump to

Keyboard shortcuts

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