Documentation ¶
Index ¶
- Constants
- func AddOrUpdateRegistryCacheExtension(shoot *gardencorev1beta1.Shoot, caches []v1alpha1.RegistryCache)
- func HasRegistryCacheExtension(shoot *gardencorev1beta1.Shoot) bool
- func RemoveRegistryCacheExtension(shoot *gardencorev1beta1.Shoot)
- func VerifyRegistryCache(parentCtx context.Context, log logr.Logger, shootClient kubernetes.Interface, ...)
- func VerifyRegistryConfigurationsAreRemoved(ctx context.Context, log logr.Logger, shootClient kubernetes.Interface, ...)
- func WaitUntilRegistryConfigurationsAreApplied(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 []v1alpha1.RegistryCache)
AddOrUpdateRegistryCacheExtension adds or updates registry-cache extension with the given caches 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 RemoveRegistryCacheExtension ¶
func RemoveRegistryCacheExtension(shoot *gardencorev1beta1.Shoot)
RemoveRegistryCacheExtension removes registry caches extensions from given Shoot.
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 VerifyRegistryConfigurationsAreRemoved ¶
func VerifyRegistryConfigurationsAreRemoved(ctx context.Context, log logr.Logger, shootClient kubernetes.Interface, expectSystemdUnitDeletion bool, upstreams []string)
VerifyRegistryConfigurationsAreRemoved 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.
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 WaitUntilRegistryConfigurationsAreApplied ¶
func WaitUntilRegistryConfigurationsAreApplied(ctx context.Context, log logr.Logger, shootClient kubernetes.Interface)
WaitUntilRegistryConfigurationsAreApplied 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.