common

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// GithubRegistryJitesoftAlpine3189Image is the ghcr.io/jitesoft/alpine:3.18.9 image.
	GithubRegistryJitesoftAlpine3189Image = "ghcr.io/jitesoft/alpine:3.18.9"
	// GithubRegistryJitesoftAlpine3194Image is the ghcr.io/jitesoft/alpine:3.19.4 image.
	GithubRegistryJitesoftAlpine3194Image = "ghcr.io/jitesoft/alpine:3.19.4"
	// GithubRegistryJitesoftAlpine3203Image is the ghcr.io/jitesoft/alpine:3.20.3 image.
	GithubRegistryJitesoftAlpine3203Image = "ghcr.io/jitesoft/alpine:3.20.3"
	// GitlabRegistryJitesoftAlpine31710Image is the registry.gitlab.com/jitesoft/dockerfiles/alpine:3.17.10 image.
	GitlabRegistryJitesoftAlpine31710Image = "registry.gitlab.com/jitesoft/dockerfiles/alpine:3.17.10"

	// ArtifactRegistryNginx1176Image is the europe-docker.pkg.dev/gardener-project/releases/3rd/nginx:1.17.6 image (copy of docker.io/library/nginx:1.17.6).
	ArtifactRegistryNginx1176Image = "europe-docker.pkg.dev/gardener-project/releases/3rd/nginx:1.17.6"
	// RegistryK8sNginx1154Image is the registry.k8s.io/e2e-test-images/nginx:1.15-4 image.
	RegistryK8sNginx1154Image = "registry.k8s.io/e2e-test-images/nginx:1.15-4"
)

Variables

This section is empty.

Functions

func AddOrUpdateRegistryCacheExtension added in v0.3.0

func AddOrUpdateRegistryCacheExtension(shoot *gardencorev1beta1.Shoot, caches []registryv1alpha3.RegistryCache)

AddOrUpdateRegistryCacheExtension adds or updates registry-cache extension with the given caches to the given Shoot.

func AddOrUpdateRegistryMirrorExtension added in v0.6.0

func AddOrUpdateRegistryMirrorExtension(shoot *gardencorev1beta1.Shoot, mirrors []mirrorv1alpha1.MirrorConfiguration)

AddOrUpdateRegistryMirrorExtension adds or updates registry-mirror extension with the given mirrors to the given Shoot.

func HasRegistryCacheExtension

func HasRegistryCacheExtension(shoot *gardencorev1beta1.Shoot) bool

HasRegistryCacheExtension returns whether the Shoot has an extension of type registry-cache.

func RemoveExtension added in v0.6.0

func RemoveExtension(shoot *gardencorev1beta1.Shoot, extensionType string)

RemoveExtension removes the extension with the given type from given Shoot.

func SleepInfinity added in v0.11.0

func SleepInfinity(pod *corev1.Pod) *corev1.Pod

SleepInfinity is MutatePodFn that keeps the container running indefinitely.

func VerifyHostsTOMLFilesCreatedForAllNodes added in v0.6.0

func VerifyHostsTOMLFilesCreatedForAllNodes(ctx context.Context, log logr.Logger, shootClient kubernetes.Interface, upstreamToHostsTOML map[string]string)

VerifyHostsTOMLFilesCreatedForAllNodes verifies that hosts.toml files for the given upstreams are created for all Nodes with the given hosts.toml file content.

func VerifyHostsTOMLFilesDeletedForAllNodes added in v0.6.0

func VerifyHostsTOMLFilesDeletedForAllNodes(ctx context.Context, log logr.Logger, shootClient kubernetes.Interface, upstreams []string)

VerifyHostsTOMLFilesDeletedForAllNodes verifies that hosts.toml files for the given upstreams are deleted from all Nodes.

func VerifyRegistryCache

func VerifyRegistryCache(parentCtx context.Context, log logr.Logger, shootClient kubernetes.Interface, image string, mutateFns ...MutatePodFn)

VerifyRegistryCache verifies that a registry cache works as expected.

The verification consists of the following steps:

  1. It deploys a Pod with the given image.
  2. It waits until the Pod is running.
  3. It verifies that the image is present in the registry's volume. This is a verification that the image pull happened via the registry cache (and the containerd didn't fall back to the upstream).

Types

type MutatePodFn added in v0.11.0

type MutatePodFn func(pod *corev1.Pod) *corev1.Pod

MutatePodFn is an optional function to change the Pod specification depending on the image used.

Jump to

Keyboard shortcuts

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