key

package
v0.27.2-1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IngressControllerConfigMapName = "ingress-controller-values"
)

Variables

This section is empty.

Functions

func APIAltNames

func APIAltNames(clusterID, internalAPI string, kubeAltNames []string) []string

APIAltNames returns the alt names for API certs.

func APIDomain

func APIDomain(clusterGuestConfig v1alpha1.ClusterGuestConfig) (string, error)

APIDomain returns the API server domain for the guest cluster.

func AppUserConfigMapName

func AppUserConfigMapName(appSpec AppSpec) string

AppUserConfigMapName returns the name of the user values configmap for the given app spec.

func AppUserSecretName

func AppUserSecretName(appSpec AppSpec) string

AppUserSecretName returns the name of the user values secret for the given app spec.

func CIDRBlock

func CIDRBlock(address, prefix string) string

CIDRBlock returns a CIDR block for the given address and prefix.

func CertConfigName

func CertConfigName(clusterID string, cert certs.Cert) string

CertConfigName constructs a name for CertConfig CR using ClusterID and Cert.

func CertConfigVersionBundleVersion

func CertConfigVersionBundleVersion(customObject v1alpha1.CertConfig) string

CertConfigVersionBundleVersion returns version bundle version for given CertConfig.

func ClusterConfigMapName

func ClusterConfigMapName(clusterGuestConfig v1alpha1.ClusterGuestConfig) string

ClusterConfigMapName returns the cluster name used in the configMap generated for this tenant cluster.

func ClusterID

func ClusterID(clusterGuestConfig v1alpha1.ClusterGuestConfig) string

ClusterID returns cluster ID for given guest cluster config.

func ClusterOrganization

func ClusterOrganization(clusterGuestConfig v1alpha1.ClusterGuestConfig) string

ClusterOrganization returns the org for given guest cluster config.

func CordonUntilDate

func CordonUntilDate() string

CordonUntilDate sets the date that chartconfig CRs should be cordoned until when they are migrated to app CRs.

func DNSIP

func DNSIP(clusterIPRange string) (string, error)

DNSIP returns the IP of the DNS service given a cluster IP range.

func DNSZone

func DNSZone(clusterGuestConfig v1alpha1.ClusterGuestConfig) string

DNSZone returns common domain for guest cluster.

func EncryptionKeySecretName

func EncryptionKeySecretName(clusterGuestConfig v1alpha1.ClusterGuestConfig) string

EncryptionKeySecretName generates name for a Kubernetes secret based on information in given v1alpha1.ClusterGuestConfig.

func IsDeleted

func IsDeleted(objectMeta metav1.ObjectMeta) bool

IsDeleted returns true if the Kubernetes resource has been marked for deletion.

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func KubeConfigClusterName

func KubeConfigClusterName(clusterGuestConfig v1alpha1.ClusterGuestConfig) string

KubeConfigClusterName returns the cluster name used in the kubeconfig generated for this tenant cluster.

func KubeConfigSecretName

func KubeConfigSecretName(clusterGuestConfig v1alpha1.ClusterGuestConfig) string

KubeConfigSecretName returns the name of secret resource for a tenant cluster

func MasterServiceDomain

func MasterServiceDomain(clusterGuestConfig v1alpha1.ClusterGuestConfig) string

MasterServiceDomain returns the domain of the master service for the given guest cluster.

func VersionBundles

func VersionBundles(clusterGuestConfig v1alpha1.ClusterGuestConfig) []versionbundle.Bundle

VersionBundles returns slice of versionbundle.Bundles for given guest cluster config.

Types

type AppSpec

type AppSpec struct {
	App     string
	AppName string
	Catalog string
	Chart   string
	// Whether app is installed for clusterapi clusters only.
	ClusterAPIOnly bool
	// ConfigMapName overrides the name, otherwise the cluster values configmap
	// is used.
	ConfigMapName      string
	ConfigMapNamespace string
	// Whether app is installed for legacy clusters only.
	// InCluster determines if the app CR should use in cluster. Otherwise the
	// cluster kubeconfig is specified.
	InCluster       bool
	LegacyOnly      bool
	Namespace       string
	UseUpgradeForce bool
	Version         string
}

AppSpec is used to define app custom resources.

type ChartSpec

type ChartSpec struct {
	AppName           string
	ChartName         string
	ConfigMapName     string
	UserConfigMapName string
}

ChartSpec is used to define chartconfig custom resources.

func CommonChartSpecs

func CommonChartSpecs() []ChartSpec

CommonChartSpecs returns charts installed for all providers. Note: When adding chart specs you also need to add the chart name to the desired state tests in the chartconfig and configmap services.

Jump to

Keyboard shortcuts

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