gardener: github.com/gardener/gardener/test/integration/framework Index | Files | Directories

package framework

import "github.com/gardener/gardener/test/integration/framework"

Index

Package Files

common.go dump.go errors.go garden_operation.go helm_utils.go plant_operations.go scheduler_operations.go shoot_maintenance_operations.go shoot_operations.go types.go utils.go worker_operations.go

Constants

const (

    // IntegrationTestPrefix is the default prefix that will be used for test shoots if none other is specified
    IntegrationTestPrefix = "itest-"
    // WorkerNamePrefix is the default prefix that will be used for Shoot workers
    WorkerNamePrefix = "worker-"
)

Variables

var (
    // ErrNoRepositoriesFound no repositories found in repository file
    ErrNoRepositoriesFound = errors.New("no repositories found in repository file")

    // ErrNoInternalIPsForNodeWasFound no internal IPs were found for node
    ErrNoInternalIPsForNodeWasFound = errors.New("no internal IPs were found for node")

    // ErrNoRunningPodsFound no running pods were found
    ErrNoRunningPodsFound = errors.New("no running pods were found")
)
var (

    // TemplateDir relative path for helm templates dir
    TemplateDir = filepath.Join("..", "..", "resources", "templates")
)

func AddWorker Uses

func AddWorker(shoot *gardencorev1beta1.Shoot, cloudProfile *gardencorev1beta1.CloudProfile, machineImage gardencorev1beta1.MachineImage, workerZone *string) error

AddWorker adds a valid default worker to the shoot for the given machineImage and CloudProfile.

func AddWorkerForName Uses

func AddWorkerForName(shoot *gardencorev1beta1.Shoot, cloudProfile *gardencorev1beta1.CloudProfile, machineImageName *string, workerZone *string) error

AddWorkerForName adds a valid worker to the shoot for the given machine image name. Returns an error if the machine image cannot be found in the CloudProfile.

func ApplyFilters Uses

func ApplyFilters(event corev1.Event, filters ...EventFilterFunc) bool

ApplyFilters checks if one of the EventFilters filters the current event

func ChooseRegionAndZoneWithNoSeed Uses

func ChooseRegionAndZoneWithNoSeed(regions []gardencorev1beta1.Region, seeds []gardencorev1beta1.Seed) (*gardencorev1beta1.Region, error)

ChooseRegionAndZoneWithNoSeed chooses a region within the cloud provider of the shoot were no seed is deployed and that is allowed by the cloud profile

func CreatePlantTestArtifacts Uses

func CreatePlantTestArtifacts(plantTestYamlPath string) (*gardencorev1beta1.Plant, error)

CreatePlantTestArtifacts creates a plant object which is read from the resources directory

func CreateShootTestArtifacts Uses

func CreateShootTestArtifacts(shootTestYamlPath string, prefix *string, projectNamespace, shootRegion, cloudProfile, secretbinding, providerType, k8sVersion, externalDomain *string, clearDNS bool, clearExtensions bool) (string, *gardencorev1beta1.Shoot, error)

CreateShootTestArtifacts creates a shoot object from the given path and sets common attributes (test-individual settings like workers have to be handled by each test).

func EnsureDirectories Uses

func EnsureDirectories(helm Helm) error

EnsureDirectories creates the repository directory which holds the repositories.yaml config file

func Exists Uses

func Exists(path string) (bool, error)

Exists checks if a path exists

func GetDeploymentReplicas Uses

func GetDeploymentReplicas(ctx context.Context, client client.Client, namespace, name string) (*int32, error)

GetDeploymentReplicas gets the spec.Replicas count from a deployment

func GetObjectFromSecret Uses

func GetObjectFromSecret(ctx context.Context, k8sClient kubernetes.Interface, namespace, secretName, objectKey string) (string, error)

GetObjectFromSecret returns object from secret

func GetProjectRootPath Uses

func GetProjectRootPath() string

GetProjectRootPath gets the root path of the project relative to the integration test folder

func NewClientFromServiceAccount Uses

func NewClientFromServiceAccount(ctx context.Context, k8sClient kubernetes.Interface, account *corev1.ServiceAccount) (kubernetes.Interface, error)

NewClientFromServiceAccount returns a kubernetes client for a service account.

func ParseFileAsProviderConfig Uses

func ParseFileAsProviderConfig(filepath string) (*gardencorev1beta1.ProviderConfig, error)

ParseFileAsProviderConfig parses a file as a ProviderConfig

func ParseFileAsWorkers Uses

func ParseFileAsWorkers(filepath string) ([]gardencorev1beta1.Worker, error)

ParseFileAsWorkers parses a file as a Worker configuration

func ReadObject Uses

func ReadObject(file string, into apimachineryRuntime.Object) error

ReadObject loads the contents of file and decodes it as an object.

func ScaleGardenerControllerManager Uses

func ScaleGardenerControllerManager(setupContextTimeout time.Duration, client client.Client, desiredReplicas *int32) (*int32, error)

ScaleGardenerControllerManager scales the gardener-controller-manager to the desired replicas

func ScaleGardenerScheduler Uses

func ScaleGardenerScheduler(setupContextTimeout time.Duration, client client.Client, desiredReplicas *int32) (*int32, error)

ScaleGardenerScheduler scales the gardener-scheduler to the desired replicas

func SetProviderConfigsFromFilepath Uses

func SetProviderConfigsFromFilepath(shoot *gardencorev1beta1.Shoot, infrastructureConfigPath, controlPlaneConfigPath, networkingConfigPath, workersConfigPath *string) error

SetProviderConfigsFromFilepath parses the infrastructure, controlPlane and networking provider-configs and sets them on the shoot

func ShootCreationCompleted Uses

func ShootCreationCompleted(newShoot *gardencorev1beta1.Shoot) bool

ShootCreationCompleted checks if a shoot is successfully reconciled.

func WaitUntilDeploymentScaled Uses

func WaitUntilDeploymentScaled(ctx context.Context, client client.Client, namespace, name string, desiredReplicas int32) error

WaitUntilDeploymentScaled waits until the deployment has the desired replica count in the status

type EventFilterFunc Uses

type EventFilterFunc func(event corev1.Event) bool

EventFilterFunc is a function to filter events

type GardenerTestOperation Uses

type GardenerTestOperation struct {
    Logger       logrus.FieldLogger
    GardenClient kubernetes.Interface
    SeedClient   kubernetes.Interface
    ShootClient  kubernetes.Interface

    Seed         *gardencorev1beta1.Seed
    CloudProfile *gardencorev1beta1.CloudProfile
    Shoot        *gardencorev1beta1.Shoot
    Project      *gardencorev1beta1.Project
}

GardenerTestOperation holds all required instances for doing a test operation

func NewGardenTestOperation Uses

func NewGardenTestOperation(k8sGardenClient kubernetes.Interface, logger logrus.FieldLogger) (*GardenerTestOperation, error)

NewGardenTestOperation initializes a new test operation from a gardener kubernetes interface

func NewGardenTestOperationWithShoot Uses

func NewGardenTestOperationWithShoot(ctx context.Context, k8sGardenClient kubernetes.Interface, logger logrus.FieldLogger, shoot *gardencorev1beta1.Shoot) (*GardenerTestOperation, error)

NewGardenTestOperationWithShoot initializes a new test operation from created shoot Objects that can be used to issue commands against seeds and shoots

func (*GardenerTestOperation) AddShoot Uses

func (o *GardenerTestOperation) AddShoot(ctx context.Context, shoot *gardencorev1beta1.Shoot) error

AddShoot sets the shoot and its seed for the GardenerOperation.

func (*GardenerTestOperation) AfterEach Uses

func (o *GardenerTestOperation) AfterEach(ctx context.Context)

AfterEach greps all necessary logs and state of the cluster if the test failed

func (*GardenerTestOperation) DashboardAvailable Uses

func (o *GardenerTestOperation) DashboardAvailable(ctx context.Context) error

DashboardAvailable checks if the kubernetes dashboard is available

func (*GardenerTestOperation) DeployChart Uses

func (o *GardenerTestOperation) DeployChart(ctx context.Context, namespace, chartRepoDestination, chartNameToDeploy string, values map[string]interface{}) error

DeployChart deploys it on the test shoot

func (*GardenerTestOperation) DownloadChartArtifacts Uses

func (o *GardenerTestOperation) DownloadChartArtifacts(ctx context.Context, helm Helm, chartRepoDestination, chartNameToDownload, chartVersionToDownload string) error

DownloadChartArtifacts downloads a helm chart from helm stable repo url available in resources/repositories

func (*GardenerTestOperation) DownloadKubeconfig Uses

func (o *GardenerTestOperation) DownloadKubeconfig(ctx context.Context, client kubernetes.Interface, namespace, name, downloadPath string) error

DownloadKubeconfig downloads the shoot Kubeconfig

func (*GardenerTestOperation) DumpState Uses

func (o *GardenerTestOperation) DumpState(ctx context.Context)

DumpState greps all necessary logs and state of the cluster if the test failed

func (*GardenerTestOperation) GetDashboardPodIP Uses

func (o *GardenerTestOperation) GetDashboardPodIP(ctx context.Context) (string, error)

GetDashboardPodIP gets the dashboard IP

func (*GardenerTestOperation) GetElasticsearchLogs Uses

func (o *GardenerTestOperation) GetElasticsearchLogs(ctx context.Context, elasticsearchNamespace, podName string, client kubernetes.Interface) (*SearchResponse, error)

GetElasticsearchLogs gets logs for <podName> from the elasticsearch instance in <elasticsearchNamespace>

func (*GardenerTestOperation) GetFirstRunningPodWithLabels Uses

func (o *GardenerTestOperation) GetFirstRunningPodWithLabels(ctx context.Context, labelsMap labels.Selector, namespace string, client kubernetes.Interface) (*corev1.Pod, error)

GetFirstRunningPodWithLabels fetches the first running pod with the desired set of labels <labelsMap>

func (*GardenerTestOperation) GetPodsByLabels Uses

func (o *GardenerTestOperation) GetPodsByLabels(ctx context.Context, labelsSelector labels.Selector, c kubernetes.Interface, namespace string) (*corev1.PodList, error)

GetPodsByLabels fetches all pods with the desired set of labels <labelsMap>

func (*GardenerTestOperation) HTTPGet Uses

func (o *GardenerTestOperation) HTTPGet(ctx context.Context, url string) (*http.Response, error)

HTTPGet performs an HTTP GET request with context

func (*GardenerTestOperation) KibanaDashboardAvailable Uses

func (o *GardenerTestOperation) KibanaDashboardAvailable(ctx context.Context) error

KibanaDashboardAvailable checks if Kibana instance in shoot seed namespace is available

func (*GardenerTestOperation) PodExecByLabel Uses

func (o *GardenerTestOperation) PodExecByLabel(ctx context.Context, podLabels labels.Selector, podContainer, command, namespace string, client kubernetes.Interface) (io.Reader, error)

PodExecByLabel executes a command inside pods filtered by label

func (*GardenerTestOperation) ShootSeedNamespace Uses

func (o *GardenerTestOperation) ShootSeedNamespace() string

ShootSeedNamespace gets the shoot namespace in the seed

func (*GardenerTestOperation) WaitUntilDaemonSetIsRunning Uses

func (o *GardenerTestOperation) WaitUntilDaemonSetIsRunning(ctx context.Context, daemonSetName, daemonSetNamespace string, c kubernetes.Interface) error

WaitUntilDaemonSetIsRunning waits until the daemon set with <daemonSetName> is running

func (*GardenerTestOperation) WaitUntilDeploymentIsRunning Uses

func (o *GardenerTestOperation) WaitUntilDeploymentIsRunning(ctx context.Context, deploymentName, deploymentNamespace string, c kubernetes.Interface) error

WaitUntilDeploymentIsRunning waits until the deployment with <deploymentName> is running

func (*GardenerTestOperation) WaitUntilDeploymentsWithLabelsIsReady Uses

func (o *GardenerTestOperation) WaitUntilDeploymentsWithLabelsIsReady(ctx context.Context, deploymentLabels labels.Selector, namespace string, client kubernetes.Interface) error

WaitUntilDeploymentsWithLabelsIsReady wait until pod with labels <podLabels> is running

func (*GardenerTestOperation) WaitUntilElasticsearchReceivesLogs Uses

func (o *GardenerTestOperation) WaitUntilElasticsearchReceivesLogs(ctx context.Context, elasticsearchNamespace, podName string, expected uint64, client kubernetes.Interface) error

WaitUntilElasticsearchReceivesLogs waits until the elasticsearch instance in <elasticsearchNamespace> receives <expected> logs from <podName>

func (*GardenerTestOperation) WaitUntilGuestbookAppIsAvailable Uses

func (o *GardenerTestOperation) WaitUntilGuestbookAppIsAvailable(ctx context.Context, guestbookAppUrls []string) error

WaitUntilGuestbookAppIsAvailable waits until the guestbook app is available and ready to serve requests

func (*GardenerTestOperation) WaitUntilPodIsRunning Uses

func (o *GardenerTestOperation) WaitUntilPodIsRunning(ctx context.Context, podName, podNamespace string, c kubernetes.Interface) error

WaitUntilPodIsRunning waits until the pod with <podName> is running

func (*GardenerTestOperation) WaitUntilPodIsRunningWithLabels Uses

func (o *GardenerTestOperation) WaitUntilPodIsRunningWithLabels(ctx context.Context, labels labels.Selector, podNamespace string, c kubernetes.Interface) error

WaitUntilPodIsRunningWithLabels waits until the pod with <podLabels> is running

func (*GardenerTestOperation) WaitUntilStatefulSetIsRunning Uses

func (o *GardenerTestOperation) WaitUntilStatefulSetIsRunning(ctx context.Context, statefulSetName, statefulSetNamespace string, c kubernetes.Interface) error

WaitUntilStatefulSetIsRunning waits until the stateful set with <statefulSetName> is running

type Helm Uses

type Helm string

Helm is the home for the HELM repo

func (Helm) CacheIndex Uses

func (h Helm) CacheIndex(name string) string

CacheIndex returns the path to an index for the given named repository.

func (Helm) Path Uses

func (h Helm) Path(elem ...string) string

Path returns Helm path with elements appended.

func (Helm) Repository Uses

func (h Helm) Repository() string

Repository returns the path to the local repository.

func (Helm) RepositoryFile Uses

func (h Helm) RepositoryFile() string

RepositoryFile returns the path to the repositories.yaml file.

func (Helm) String Uses

func (h Helm) String(elem ...string) string

Path returns the home for the helm repo with.

type HelmAccess Uses

type HelmAccess struct {
    HelmPath Helm
}

HelmAccess is a struct that holds the helm home

type PlantTest Uses

type PlantTest struct {
    GardenClient kubernetes.Interface
    Plant        *gardencorev1beta1.Plant

    //PlantSecret                   *v1.Secret
    Logger *logrus.Logger
    // contains filtered or unexported fields
}

PlantTest represents an instance of shoot tests which entails all necessary data

func NewPlantTest Uses

func NewPlantTest(kubeconfig string, kubeconfigPathExternalCluster string, plant *gardencorev1beta1.Plant, logger *logrus.Logger) (*PlantTest, error)

NewPlantTest creates a new plantGardenerTest object, given an already created plant (created after parsing a plant YAML) and a path to a kubeconfig of an external cluster

func (*PlantTest) CreatePlant Uses

func (s *PlantTest) CreatePlant(ctx context.Context, secret *corev1.Secret) error

CreatePlant Creates a plant from a plant Object

func (*PlantTest) CreatePlantSecret Uses

func (s *PlantTest) CreatePlantSecret(ctx context.Context, kubeConfigContent []byte) (*corev1.Secret, error)

CreatePlantSecret creates a new Secret for the Plant

func (*PlantTest) DeletePlant Uses

func (s *PlantTest) DeletePlant(ctx context.Context) error

DeletePlant deletes the test plant

func (*PlantTest) GetPlant Uses

func (s *PlantTest) GetPlant(ctx context.Context) (*gardencorev1beta1.Plant, error)

GetPlant gets the test plant

func (*PlantTest) GetPlantSecret Uses

func (s *PlantTest) GetPlantSecret(ctx context.Context) (*corev1.Secret, error)

GetPlantSecret retrieves the Secret of the Plant. Returns the Secret.

func (*PlantTest) UpdatePlantSecret Uses

func (s *PlantTest) UpdatePlantSecret(ctx context.Context, updatedPlantSecret *corev1.Secret) error

UpdatePlantSecret updates the Secret of the Plant

func (*PlantTest) WaitForPlantToBeCreated Uses

func (s *PlantTest) WaitForPlantToBeCreated(ctx context.Context) error

WaitForPlantToBeCreated waits for the plant to be created

func (*PlantTest) WaitForPlantToBeDeleted Uses

func (s *PlantTest) WaitForPlantToBeDeleted(ctx context.Context) error

WaitForPlantToBeDeleted waits for the plant to be deleted

func (*PlantTest) WaitForPlantToBeReconciledSuccessfully Uses

func (s *PlantTest) WaitForPlantToBeReconciledSuccessfully(ctx context.Context) error

WaitForPlantToBeReconciledSuccessfully waits for the plant to be reconciled with a status indicating success

func (*PlantTest) WaitForPlantToBeReconciledWithUnknownStatus Uses

func (s *PlantTest) WaitForPlantToBeReconciledWithUnknownStatus(ctx context.Context) error

WaitForPlantToBeReconciledWithUnknownStatus waits for the plant to be reconciled, setting the expected status 'unknown'

type SchedulerGardenerTest Uses

type SchedulerGardenerTest struct {
    ShootGardenerTest      *ShootGardenerTest
    CloudProfile           *gardencorev1beta1.CloudProfile
    SchedulerConfiguration *config.SchedulerConfiguration
    Seeds                  []gardencorev1beta1.Seed
}

SchedulerGardenerTest represents an instance of scheduler tests which contains a shoot test & adds the scheduler configuration

func NewGardenSchedulerTest Uses

func NewGardenSchedulerTest(ctx context.Context, shootGardenTest *ShootGardenerTest, hostKubeconfigPath string) (*SchedulerGardenerTest, error)

NewGardenSchedulerTest creates a new SchedulerGardenerTest by retrieving the ConfigMap containing the Scheduler Configuration & parsing the Scheduler Configuration

func (*SchedulerGardenerTest) ChooseRegionAndZoneWithNoSeed Uses

func (s *SchedulerGardenerTest) ChooseRegionAndZoneWithNoSeed() (*gardencorev1beta1.Region, error)

ChooseRegionAndZoneWithNoSeed determines all available Zones from the Shoot and the CloudProfile and then delegates the choosing of a region were no seed is deployed

func (*SchedulerGardenerTest) ChooseSeedWhereTestShootIsNotDeployed Uses

func (s *SchedulerGardenerTest) ChooseSeedWhereTestShootIsNotDeployed(shoot *gardencorev1beta1.Shoot) (*gardencorev1beta1.Seed, error)

ChooseSeedWhereTestShootIsNotDeployed determines a Seed different from the shoot's seed using the same Provider(e.g aws) If none can be found, it returns an error

func (*SchedulerGardenerTest) CreateShoot Uses

func (s *SchedulerGardenerTest) CreateShoot(ctx context.Context) (*gardencorev1beta1.Shoot, error)

CreateShoot Creates a shoot from a shoot Object

func (*SchedulerGardenerTest) GenerateInvalidSeed Uses

func (s *SchedulerGardenerTest) GenerateInvalidSeed() (*gardencorev1beta1.Seed, error)

GenerateInvalidSeed generates a seed with an invalid dummy name

func (*SchedulerGardenerTest) GenerateInvalidShoot Uses

func (s *SchedulerGardenerTest) GenerateInvalidShoot() (*gardencorev1beta1.Shoot, error)

GenerateInvalidShoot generates a shoot with an invalid dummy name

func (*SchedulerGardenerTest) ScheduleShoot Uses

func (s *SchedulerGardenerTest) ScheduleShoot(ctx context.Context, shoot *gardencorev1beta1.Shoot, seed *gardencorev1beta1.Seed) error

ScheduleShoot set the Spec.Cloud.Seed of a shoot to the specified seed. This is the request the Gardener Scheduler executes after a scheduling decision.

func (*SchedulerGardenerTest) WaitForShootToBeScheduled Uses

func (s *SchedulerGardenerTest) WaitForShootToBeScheduled(ctx context.Context) error

WaitForShootToBeScheduled waits for the shoot to be scheduled successfully

func (*SchedulerGardenerTest) WaitForShootToBeUnschedulable Uses

func (s *SchedulerGardenerTest) WaitForShootToBeUnschedulable(ctx context.Context) error

WaitForShootToBeUnschedulable waits for the shoot to be unschedulable. This is indicated by Events created by the scheduler on the shoot

type SearchResponse Uses

type SearchResponse struct {
    Hits struct {
        Total uint64 `json:"total"`
    } `json:"hits"`
}

SearchResponse represents the response from a search query to elasticsearch

type ShootGardenerTest Uses

type ShootGardenerTest struct {
    GardenClient kubernetes.Interface

    Shoot        *gardencorev1beta1.Shoot
    CloudProfile *gardencorev1beta1.CloudProfile
    Logger       *logrus.Logger
}

ShootGardenerTest represents an instance of shoot tests which entails all necessary data

func NewShootGardenerTest Uses

func NewShootGardenerTest(kubeconfig string, shoot *gardencorev1beta1.Shoot, logger *logrus.Logger) (*ShootGardenerTest, error)

NewShootGardenerTest creates a new shootGardenerTest object, given an already created shoot (created after parsing a shoot YAML)

func (*ShootGardenerTest) AnnotateShoot Uses

func (s *ShootGardenerTest) AnnotateShoot(ctx context.Context, annotations map[string]string) error

AnnotateShoot adds shoot annotation(s)

func (*ShootGardenerTest) CreateShoot Uses

func (s *ShootGardenerTest) CreateShoot(ctx context.Context) (*gardencorev1beta1.Shoot, error)

CreateShoot Creates a shoot from a shoot Object and waits until it is successfully reconciled

func (*ShootGardenerTest) CreateShootResource Uses

func (s *ShootGardenerTest) CreateShootResource(ctx context.Context, shootToCreate *gardencorev1beta1.Shoot) (*gardencorev1beta1.Shoot, error)

CreateShootResource creates a shoot from a shoot Object

func (*ShootGardenerTest) DeleteShoot Uses

func (s *ShootGardenerTest) DeleteShoot(ctx context.Context) error

DeleteShoot deletes the test shoot

func (*ShootGardenerTest) DeleteShootAndWaitForDeletion Uses

func (s *ShootGardenerTest) DeleteShootAndWaitForDeletion(ctx context.Context) error

DeleteShootAndWaitForDeletion deletes the test shoot and waits until it cannot be found any more

func (*ShootGardenerTest) GetShoot Uses

func (s *ShootGardenerTest) GetShoot(ctx context.Context) (*gardencorev1beta1.Shoot, error)

GetShoot gets the test shoot

func (*ShootGardenerTest) HibernateShoot Uses

func (s *ShootGardenerTest) HibernateShoot(ctx context.Context) error

HibernateShoot hibernates the test shoot

func (*ShootGardenerTest) RemoveShootAnnotation Uses

func (s *ShootGardenerTest) RemoveShootAnnotation(ctx context.Context, annotationKey string) error

RemoveShootAnnotation removes an annotation with key <annotationKey> from a shoot object

func (*ShootGardenerTest) SetupShootWorker Uses

func (s *ShootGardenerTest) SetupShootWorker(workerZone *string) error

SetupShootWorker prepares the Shoot with one worker with provider specific volume. Clears the currently configured workers.

func (*ShootGardenerTest) UpdateShoot Uses

func (s *ShootGardenerTest) UpdateShoot(ctx context.Context, shoot *gardencorev1beta1.Shoot, update UpdateShootFunc) (*gardencorev1beta1.Shoot, error)

UpdateShoot Updates a shoot from a shoot Object and waits for its reconciliation

func (*ShootGardenerTest) WaitForShootToBeCreated Uses

func (s *ShootGardenerTest) WaitForShootToBeCreated(ctx context.Context) error

WaitForShootToBeCreated waits for the shoot to be created

func (*ShootGardenerTest) WaitForShootToBeDeleted Uses

func (s *ShootGardenerTest) WaitForShootToBeDeleted(ctx context.Context) error

WaitForShootToBeDeleted waits for the shoot to be deleted

func (*ShootGardenerTest) WaitForShootToBeReconciled Uses

func (s *ShootGardenerTest) WaitForShootToBeReconciled(ctx context.Context) error

WaitForShootToBeReconciled waits for the shoot to be successfully reconciled

func (*ShootGardenerTest) WakeUpShoot Uses

func (s *ShootGardenerTest) WakeUpShoot(ctx context.Context) error

WakeUpShoot wakes up the test shoot from hibernation

type ShootMaintenanceTest Uses

type ShootMaintenanceTest struct {
    ShootGardenerTest *ShootGardenerTest
    CloudProfile      *gardencorev1beta1.CloudProfile
    ShootMachineImage gardencorev1beta1.ShootMachineImage
}

ShootMaintenanceTest contains all necessary data for the shoot maintenance integration test

func NewShootMaintenanceTest Uses

func NewShootMaintenanceTest(ctx context.Context, shootGardenTest *ShootGardenerTest, shootMachineImageName *string) (*ShootMaintenanceTest, error)

NewShootMaintenanceTest creates a new ShootMaintenanceTest

func (*ShootMaintenanceTest) CleanupCloudProfile Uses

func (s *ShootMaintenanceTest) CleanupCloudProfile(ctx context.Context, testMachineImage gardencorev1beta1.ShootMachineImage, testKubernetesVersions []gardencorev1beta1.ExpirableVersion) error

CleanupCloudProfile tries to update the CloudProfile with retries to make sure the machine image version & kubernetes version introduced during the integration test is being removed

func (*ShootMaintenanceTest) CreateShoot Uses

func (s *ShootMaintenanceTest) CreateShoot(ctx context.Context) (*gardencorev1beta1.Shoot, error)

CreateShoot creates a Shoot Resource

func (*ShootMaintenanceTest) TryUpdateCloudProfileForKubernetesVersionMaintenance Uses

func (s *ShootMaintenanceTest) TryUpdateCloudProfileForKubernetesVersionMaintenance(ctx context.Context, shoot *gardencorev1beta1.Shoot, targetVersion string, expirationDateInNearFuture *metav1.Time) error

TryUpdateCloudProfileForKubernetesVersionMaintenance tries to update the images of the Cloud Profile

func (*ShootMaintenanceTest) TryUpdateCloudProfileForMaintenance Uses

func (s *ShootMaintenanceTest) TryUpdateCloudProfileForMaintenance(ctx context.Context, shoot *gardencorev1beta1.Shoot, testMachineImage gardencorev1beta1.ShootMachineImage, expirationDate *metav1.Time) error

TryUpdateCloudProfileForMaintenance tries to update the images of the Cloud Profile

func (*ShootMaintenanceTest) TryUpdateShootForKubernetesMaintenance Uses

func (s *ShootMaintenanceTest) TryUpdateShootForKubernetesMaintenance(ctx context.Context, shootToUpdate *gardencorev1beta1.Shoot) error

TryUpdateShootForKubernetesMaintenance tries to update the maintenance section of the shoot spec regarding the Kubernetes version

func (*ShootMaintenanceTest) TryUpdateShootForMachineImageMaintenance Uses

func (s *ShootMaintenanceTest) TryUpdateShootForMachineImageMaintenance(ctx context.Context, shootToUpdate *gardencorev1beta1.Shoot, updateMachineImage bool, workers []gardencorev1beta1.Worker) error

TryUpdateShootForMachineImageMaintenance tries to update the maintenance section of the shoot spec regarding the machine image

func (*ShootMaintenanceTest) WaitForExpectedKubernetesVersionMaintenance Uses

func (s *ShootMaintenanceTest) WaitForExpectedKubernetesVersionMaintenance(ctx context.Context, targetVersion string, kubernetesVersionUpdateRequired bool, deadline time.Time) error

WaitForExpectedKubernetesVersionMaintenance polls a shoot until the given deadline is exceeded. Checks if the shoot's kubernetes version equals the targetVersion and if an kubernetes version update is required.

func (*ShootMaintenanceTest) WaitForExpectedMachineImageMaintenance Uses

func (s *ShootMaintenanceTest) WaitForExpectedMachineImageMaintenance(ctx context.Context, targetMachineImage gardencorev1beta1.ShootMachineImage, imageUpdateRequired bool, deadline time.Time) error

WaitForExpectedMachineImageMaintenance polls a shoot until the given deadline is exceeded. Checks if the shoot's machine image equals the targetImage and if an image update is required.

type UpdateShootFunc Uses

type UpdateShootFunc = func(shoot *gardencorev1beta1.Shoot) error

UpdateShootFunc represents a function that mutates the shoot to be updated

type WorkerGardenerTest Uses

type WorkerGardenerTest struct {
    ShootGardenerTest *ShootGardenerTest
    CloudProfile      *gardencorev1beta1.CloudProfile
    ShootClient       kubernetes.Interface
}

WorkerGardenerTest represents an instance of worker tests which contains a shoot test & adds the worker configuration

func NewWorkerGardenerTest Uses

func NewWorkerGardenerTest(shootGardenTest *ShootGardenerTest) (*WorkerGardenerTest, error)

NewWorkerGardenerTest creates a new NewWorkerGardenerTest

func (*WorkerGardenerTest) SetupShootWorkers Uses

func (s *WorkerGardenerTest) SetupShootWorkers(shootMachineImageName *string, shootMachineImageName2 *string, workerZone *string) error

SetupShootWorkers prepares the Shoot with multiple workers. Only supporting one optional zone.

Directories

PathSynopsis
applications

Package framework imports 60 packages (graph) and is imported by 3 packages. Updated 2020-02-18. Refresh now. Tools for package owners.