Documentation ¶
Index ¶
- Constants
- func AddOrUpdateRegistryCacheExtension(shoot *gardencorev1beta1.Shoot, caches []registryv1alpha3.RegistryCache)
- func AddOrUpdateRegistryMirrorExtension(shoot *gardencorev1beta1.Shoot, mirrors []mirrorv1alpha1.MirrorConfiguration)
- func HasRegistryCacheExtension(shoot *gardencorev1beta1.Shoot) bool
- func RemoveExtension(shoot *gardencorev1beta1.Shoot, extensionType string)
- func VerifyHostsTOMLFilesCreatedForAllNodes(ctx context.Context, log logr.Logger, shootClient kubernetes.Interface, ...)
- func VerifyHostsTOMLFilesDeletedForAllNodes(ctx context.Context, log logr.Logger, shootClient kubernetes.Interface, ...)
- func VerifyHostsTOMLFilesDeletedForNode(ctx context.Context, rootPodExecutor framework.RootPodExecutor, ...)
- func VerifyRegistryCache(parentCtx context.Context, log logr.Logger, shootClient kubernetes.Interface, ...)
- func VerifyRegistryCacheConfigurationsAreRemoved(ctx context.Context, log logr.Logger, shootClient kubernetes.Interface, ...)
- func WaitUntilRegistryCacheConfigurationsAreApplied(ctx context.Context, log logr.Logger, shootClient kubernetes.Interface)
Constants ¶
const ( // DockerNginx1230ImageWithDigest corresponds to the nginx:1.23.0 image. DockerNginx1230ImageWithDigest = "docker.io/library/nginx@sha256:db345982a2f2a4257c6f699a499feb1d79451a1305e8022f16456ddc3ad6b94c" // DockerNginx1240ImageWithDigest corresponds to the nginx:1.24.0 image. DockerNginx1240ImageWithDigest = "docker.io/library/nginx@sha256:066476749f229923b9de29cc9a0738ea2d45923b16a2b388449ea549673f97d8" // DockerNginx1250ImageWithDigest corresponds to the nginx:1.25.0 image. DockerNginx1250ImageWithDigest = "docker.io/library/nginx@sha256:b997b0db9c2bc0a2fb803ced5fb9ff3a757e54903a28ada3e50412cc3ab7822f" // ArtifactRegistryNginx1176ImageWithDigest corresponds to the europe-docker.pkg.dev/gardener-project/releases/3rd/nginx:1.17.6 image (copy of docker.io/library/nginx:1.17.6). ArtifactRegistryNginx1176ImageWithDigest = "" /* 129-byte string literal not displayed */ // RegistryK8sNginx1154ImageWithDigest corresponds to the registry.k8s.io/e2e-test-images/nginx:1.15-4 image. RegistryK8sNginx1154ImageWithDigest = "registry.k8s.io/e2e-test-images/nginx@sha256:db048754ae68ae337d8fa96494c96d2a1204c3320f5dcf7e8e71085adec85da6" // PublicEcrAwsNginx1199ImageWithDigest corresponds to the public.ecr.aws/nginx/nginx:1.19.9 image. PublicEcrAwsNginx1199ImageWithDigest = "public.ecr.aws/nginx/nginx@sha256:f248a8862fa9b21badbe043518f52f143946e2dc705300e8534f8ca624a291b2" )
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 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 VerifyHostsTOMLFilesDeletedForNode ¶ added in v0.6.0
func VerifyHostsTOMLFilesDeletedForNode(ctx context.Context, rootPodExecutor framework.RootPodExecutor, upstreams []string, nodeName string)
VerifyHostsTOMLFilesDeletedForNode verifies that hosts.toml files for the given upstreams are deleted for a Node.
Note that for a Shoot cluster provider-local adds hosts.toml files for localhost:5001, gcr.io, eu.gcr.io, ghcr.io, registry.k8s.io, quay.io and europe-docker.pkg.dev. Hence, when a registry cache is removed for one of the above upstreams, then provider-local's hosts.toml file will still exist.
func VerifyRegistryCache ¶
func VerifyRegistryCache(parentCtx context.Context, log logr.Logger, shootClient kubernetes.Interface, upstream, nginxImageWithDigest string)
VerifyRegistryCache verifies that a registry cache works as expected.
The verification consists of the following steps:
- It deploys an nginx Pod with the given image.
- It waits until the Pod is running.
- It verifies that the image is present in the registry's scheduler-state.json file. This is a verification that the image pull happened via the registry cache (and the containerd didn't fall back to the upstream).
func VerifyRegistryCacheConfigurationsAreRemoved ¶ added in v0.6.0
func VerifyRegistryCacheConfigurationsAreRemoved(ctx context.Context, log logr.Logger, shootClient kubernetes.Interface, expectSystemdUnitDeletion bool, upstreams []string)
VerifyRegistryCacheConfigurationsAreRemoved verifies that configure-containerd-registries.service systemd unit gets deleted (if expectSystemdUnitDeletion is true) and the hosts.toml files for the given upstreams are removed. The hosts.toml file(s) and the systemd unit are deleted by the registry-configuration-cleaner DaemonSet.
func WaitUntilRegistryCacheConfigurationsAreApplied ¶ added in v0.6.0
func WaitUntilRegistryCacheConfigurationsAreApplied(ctx context.Context, log logr.Logger, shootClient kubernetes.Interface)
WaitUntilRegistryCacheConfigurationsAreApplied waits until the configure-containerd-registries.service systemd unit gets inactive on the Nodes. The unit will be in active state until it configures all registry caches.
Types ¶
This section is empty.