garden

package
v1.7.1-0...-23dd39d Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BootstrapCluster

func BootstrapCluster(ctx context.Context, k8sGardenClient kubernetes.Interface, gardenNamespace string, secretLister kubecorev1listers.SecretLister) error

BootstrapCluster bootstraps the Garden cluster and deploys various required manifests.

func ReadGardenSecrets

func ReadGardenSecrets(ctx context.Context, rd client.Reader, seedLister gardencorelisters.SeedLister, namespace string) (map[string]*corev1.Secret, error)

ReadGardenSecrets reads the Kubernetes Secrets from the Garden cluster which are independent of Shoot clusters. The Secret objects are stored on the Controller in order to pass them to created Garden objects later.

func ReadGardenSecretsFromLister

func ReadGardenSecretsFromLister(ctx context.Context, secretLister kubecorev1listers.SecretLister, seedLister gardencorelisters.SeedLister, namespace string) (map[string]*corev1.Secret, error)

ReadGardenSecretsFromLister reads the Kubernetes Secrets from the Garden cluster which are independent of Shoot clusters. The Secret objects are stored on the Controller in order to pass them to created Garden objects later.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder is an object that builds Garden objects.

func NewBuilder

func NewBuilder() *Builder

NewBuilder returns a new Builder.

func (*Builder) Build

func (b *Builder) Build(ctx context.Context) (*Garden, error)

Build initializes a new Garden object.

func (*Builder) WithDefaultDomains

func (b *Builder) WithDefaultDomains(defaultDomains []*Domain) *Builder

WithDefaultDomains sets the defaultDomainsFunc attribute at the Builder.

func (*Builder) WithDefaultDomainsFromSecrets

func (b *Builder) WithDefaultDomainsFromSecrets(secrets map[string]*corev1.Secret) *Builder

WithDefaultDomains sets the defaultDomainsFunc attribute at the Builder based on the given secrets map.

func (*Builder) WithInternalDomain

func (b *Builder) WithInternalDomain(internalDomain *Domain) *Builder

WithInternalDomain sets the internalDomainFunc attribute at the Builder.

func (*Builder) WithInternalDomainFromSecrets

func (b *Builder) WithInternalDomainFromSecrets(secrets map[string]*corev1.Secret) *Builder

WithInternalDomainFromSecrets sets the internalDomainFunc attribute at the Builder based on the given secrets map.

func (*Builder) WithProject

func (b *Builder) WithProject(project *gardencorev1beta1.Project) *Builder

WithProject sets the projectFunc attribute at the Builder.

func (*Builder) WithProjectFromReader

func (b *Builder) WithProjectFromReader(reader client.Reader, namespace string) *Builder

WithProjectFromReader sets the projectFunc attribute after fetching it from the lister.

type Domain

type Domain struct {
	Domain         string
	Provider       string
	SecretData     map[string][]byte
	IncludeDomains []string
	ExcludeDomains []string
	IncludeZones   []string
	ExcludeZones   []string
}

Domain contains information about a domain configured in the garden cluster.

func DomainIsDefaultDomain

func DomainIsDefaultDomain(domain string, defaultDomains []*Domain) *Domain

DomainIsDefaultDomain identifies whether the given domain is a default domain.

func GetDefaultDomains

func GetDefaultDomains(secrets map[string]*corev1.Secret) ([]*Domain, error)

GetDefaultDomains finds all the default domain secrets within the given map and returns a list of objects that contains all relevant information about the default domains.

func GetInternalDomain

func GetInternalDomain(secrets map[string]*corev1.Secret) (*Domain, error)

GetInternalDomain finds the internal domain secret within the given map and returns the object that contains all relevant information about the internal domain.

type Garden

type Garden struct {
	Project        *gardencorev1beta1.Project
	DefaultDomains []*Domain
	InternalDomain *Domain
}

Garden is an object containing Garden cluster specific data.

Jump to

Keyboard shortcuts

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