Documentation ¶
Index ¶
- Constants
- func AddRegistryCacheExtension(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 ( // DockerNginx1130ImageWithDigest corresponds to the nginx:1.13.0 image. DockerNginx1130ImageWithDigest = "docker.io/library/nginx@sha256:12d30ce421ad530494d588f87b2328ddc3cae666e77ea1ae5ac3a6661e52cde6" // DockerNginx1140ImageWithDigest corresponds to the nginx:1.14.0 image. DockerNginx1140ImageWithDigest = "docker.io/library/nginx@sha256:8b600a4d029481cc5b459f1380b30ff6cb98e27544fc02370de836e397e34030" // DockerNginx1150ImageWithDigest corresponds to the nginx:1.15.0 image. DockerNginx1150ImageWithDigest = "docker.io/library/nginx@sha256:62a095e5da5f977b9f830adaf64d604c614024bf239d21068e4ca826d0d629a4" // EuGcrNginx1176ImageWithDigest corresponds to the eu.gcr.io/gardener-project/3rd/nginx:1.17.6 image. EuGcrNginx1176ImageWithDigest = "eu.gcr.io/gardener-project/3rd/nginx@sha256:3efdd8ec67f2eb4e96c6f49560f20d6888242f1376808b84ed0ceb064dceae11" // 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" )
Variables ¶
This section is empty.
Functions ¶
func AddRegistryCacheExtension ¶
func AddRegistryCacheExtension(shoot *gardencorev1beta1.Shoot, caches []v1alpha1.RegistryCache)
AddRegistryCacheExtension adds 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, upstreams []string)
VerifyRegistryConfigurationsAreRemoved verifies that configure-containerd-registries.service systemd unit gets deleted and the hosts.toml files for the given upstreams are removed. The hosts.toml file and the systemd unit are deleted by a DaemonSet by the registry-cache extension.
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 and quay.io. 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 active on the Nodes. The unit will be in activating state until it configures all registry caches.
Types ¶
This section is empty.