Skip to content

Commit

Permalink
Address PR review feedback (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
ialidzhikov committed Nov 29, 2024
1 parent 2d0cdb3 commit d0097d7
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ rules:
- resources.gardener.cloud
resources:
- managedresources
# TODO(dimitar-kostadinov): Remove managedresources/status after v0.12.0.
# TODO(dimitar-kostadinov): Remove managedresources/status after May 2025.
- managedresources/status
verbs:
- get
Expand All @@ -52,7 +52,7 @@ rules:
- update
- patch
- delete
# TODO(dimitar-kostadinov): Remove the below rule for managedresources/status after v0.12.0.
# TODO(dimitar-kostadinov): Remove the below rule for managedresources/status after May 2025.
- apiGroups:
- resources.gardener.cloud
resources:
Expand Down
2 changes: 1 addition & 1 deletion example/controller-registration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: ControllerDeployment
metadata:
name: extension-registry-cache
helm:
rawChart: H4sIAAAAAAAAA+0da2/bOLKf9St47i62PVTyM0nPQA+XTbJtsG1iJLncHRaLgJYYmxtJ1JGSU2/b++03JPWWbdlO1n2sBkVsU+RwSM4MZ4ZDdYK5Q3zCTfI+JL6gzDc5mVAR8rlpY3tK2k8eDB2Ag7099QlQ/lTfu/1Bt7fX29+X5d393n7/Cdp7eNf1EIkQc4SecMbCVfXqnn+lMKldf2tKXI9OfMbJln3IBd4fDJauPyx7cf17nUGv8wR1HnWkS+BPvv5P0QiHIeG+QCFDepnR/ZT4aBxR16H+BAXYvsMTIizjKbqaUoFEFASMh/AFWMNFE5eNkYdDewq1XyBOXBzSGYF24TRXjn0HEPhkAk+Zj54FnNzS98RB9xTq/eW5hc59d46Yr1pKklBAOHKpTyzDOr68uQyBNkBxxDwPEFwfXSKHcmFYExq21V9NvmGNf+dt9TcpmE7a8k/yU8z8doZoDOOLAnRLXSKMv1riPoC/Y3wHf0MPvv8Pql5jTlkk0OnxCXQYcPYbsU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RgAntqNJZvG2s7sq58qT0MovAjbb6F9HBt1Yh2nzvtCj1KXlp9q2N1zDEYUlYXljLBMdSn4/F/09H69nepBhpooIEGGmiggQYaaOAx4P8+Q4pRAHgAAA==
values:
image:
tag: v0.13.0-dev
Expand Down
22 changes: 9 additions & 13 deletions pkg/component/registrycaches/registry_caches.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,21 +194,16 @@ func (r *registryCaches) CASecretName() string {
return r.caSecretName
}

func (r *registryCaches) computeResourcesData(ctx context.Context, secrets map[string]*corev1.Secret) (map[string][]byte, error) {
func (r *registryCaches) computeResourcesData(ctx context.Context, generatedSecrets map[string]*corev1.Secret) (map[string][]byte, error) {
var objects []client.Object

remappedSecrets := make(map[string]*corev1.Secret, len(secrets))
for _, secret := range secrets {
remappedSecrets[secret.Labels["name"]] = secret
}

for _, cache := range r.values.Caches {
tlsSecretName := strings.ReplaceAll(cache.Upstream, ":", "-") + "-tls"

secret, ok := remappedSecrets[tlsSecretName]
tlsSecretName := secrets.TLSSecretNameForUpstream(cache.Upstream)
secret, ok := generatedSecrets[tlsSecretName]
if !ok {
return nil, fmt.Errorf("secret for upstream %s not found", cache.Upstream)
}

cacheObjects, err := r.computeResourcesDataForRegistryCache(ctx, &cache, secret)
if err != nil {
return nil, fmt.Errorf("failed to compute resources for upstream %s: %w", cache.Upstream, err)
Expand Down Expand Up @@ -290,7 +285,7 @@ func (r *registryCaches) computeResourcesDataForRegistryCache(ctx context.Contex
}
utilruntime.Must(kubernetesutils.MakeUnique(configSecret))

secretTLS := &corev1.Secret{
tlsSecret := &corev1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: name + "-tls",
Namespace: metav1.NamespaceSystem,
Expand All @@ -299,7 +294,7 @@ func (r *registryCaches) computeResourcesDataForRegistryCache(ctx context.Contex
Type: corev1.SecretTypeOpaque,
Data: secret.Data,
}
utilruntime.Must(kubernetesutils.MakeUnique(secretTLS))
utilruntime.Must(kubernetesutils.MakeUnique(tlsSecret))

statefulSet := &appsv1.StatefulSet{
ObjectMeta: metav1.ObjectMeta{
Expand Down Expand Up @@ -437,7 +432,8 @@ source /entrypoint.sh /etc/distribution/config.yml
Name: registryCertsVolumeName,
VolumeSource: corev1.VolumeSource{
Secret: &corev1.SecretVolumeSource{
SecretName: secretTLS.Name,
SecretName: tlsSecret.Name,
DefaultMode: ptr.To[int32](0640),
},
},
},
Expand Down Expand Up @@ -519,7 +515,7 @@ source /entrypoint.sh /etc/distribution/config.yml

return []client.Object{
configSecret,
secretTLS,
tlsSecret,
statefulSet,
vpa,
}, nil
Expand Down
1 change: 1 addition & 0 deletions pkg/component/registrycaches/registry_caches_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ spec:
secretName: ` + configSecretName + `
- name: certs-volume
secret:
defaultMode: 416
secretName: ` + tlsSecretName + `
updateStrategy: {}
volumeClaimTemplates:
Expand Down
10 changes: 7 additions & 3 deletions pkg/controller/cache/actuator.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (a *actuator) Reconcile(ctx context.Context, logger logr.Logger, ex *extens
return fmt.Errorf("failed to decode provider config: %w", err)
}

// TODO(dimitar-kostadinov): Clean up this invocation after March 2025.
// TODO(dimitar-kostadinov): Clean up this invocation after May 2025.
{
if err := a.removeServicesFromManagedResourceStatus(ctx, namespace); err != nil {
return fmt.Errorf("failed to remove Services from the ManagedResource status: %w", err)
Expand Down Expand Up @@ -266,15 +266,19 @@ func (a *actuator) updateProviderStatus(ctx context.Context, ex *extensionsv1alp

// removeServicesFromManagedResourceStatus removes all resources with kind=Service from the ManagedResources .status.resources field.
//
// TODO(dimitar-kostadinov): Clean up this function after March 2025.
// TODO(dimitar-kostadinov): Clean up this function after May 2025.
func (a *actuator) removeServicesFromManagedResourceStatus(ctx context.Context, namespace string) error {
mr := &resourcesv1alpha1.ManagedResource{
ObjectMeta: metav1.ObjectMeta{
Name: "extension-registry-cache",
Namespace: namespace,
},
}
if err := a.client.Get(ctx, client.ObjectKeyFromObject(mr), mr); err != nil && !apierrors.IsNotFound(err) {
if err := a.client.Get(ctx, client.ObjectKeyFromObject(mr), mr); err != nil {
if apierrors.IsNotFound(err) {
return nil
}

return err
}

Expand Down
9 changes: 8 additions & 1 deletion pkg/secrets/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ func ConfigsFor(services []corev1.Service) []extensionssecretsmanager.SecretConf
Options: []secretsmanager.GenerateOption{secretsmanager.Persist()},
},
}

for _, service := range services {
upstream := service.Annotations[constants.UpstreamAnnotation]
name := strings.ReplaceAll(upstream, ":", "-") + "-tls"
name := TLSSecretNameForUpstream(upstream)

configs = append(configs, extensionssecretsmanager.SecretConfigWithOptions{
Config: &secretutils.CertificateSecretConfig{
Expand All @@ -54,5 +55,11 @@ func ConfigsFor(services []corev1.Service) []extensionssecretsmanager.SecretConf
Options: []secretsmanager.GenerateOption{secretsmanager.SignedByCA(CAName, secretsmanager.UseOldCA)},
})
}

return configs
}

// TLSSecretNameForUpstream returns a TLS Secret name for a given upstream.
func TLSSecretNameForUpstream(upstream string) string {
return strings.ReplaceAll(upstream, ":", "-") + "-tls"
}
30 changes: 30 additions & 0 deletions pkg/secrets/config_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Gardener contributors
//
// SPDX-License-Identifier: Apache-2.0

package secrets_test

import (
"testing"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/gardener/gardener-extension-registry-cache/pkg/secrets"
)

func TestSecrets(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Secrets")
}

var _ = Describe("Secrets", func() {

DescribeTable("#TLSSecretNameForUpstream",
func(upstream, expected string) {
Expect(secrets.TLSSecretNameForUpstream(upstream)).To(Equal(expected))
},
Entry("upstream without port", "my-registry.io", "my-registry.io-tls"),
Entry("upstream ends with port", "my-registry.io:5000", "my-registry.io-5000-tls"),
)
})
2 changes: 1 addition & 1 deletion pkg/utils/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func GetUpstreamURL(upstream string) string {
return "https://" + upstream
}

// GetLabels returns a map with 'app' and 'upstream-host' labels
// GetLabels returns a map with 'app' and 'upstream-host' labels.
func GetLabels(name, upstreamLabel string) map[string]string {
return map[string]string{
"app": name,
Expand Down
18 changes: 12 additions & 6 deletions pkg/webhook/cache/ensurer.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (e *ensurer) EnsureCRIConfig(ctx context.Context, gctx gcontext.GardenConte
return fmt.Errorf("failed to get the cluster resource: %w", err)
}

if !e.mutate(cluster) {
if !e.shouldMutate(cluster) {
return nil
}

Expand Down Expand Up @@ -95,7 +95,7 @@ func (e *ensurer) EnsureAdditionalFiles(ctx context.Context, gctx gcontext.Garde
return fmt.Errorf("failed to get the cluster resource: %w", err)
}

if !e.mutate(cluster) {
if !e.shouldMutate(cluster) {
return nil
}

Expand All @@ -110,9 +110,13 @@ func (e *ensurer) EnsureAdditionalFiles(ctx context.Context, gctx gcontext.Garde
Namespace: cluster.ObjectMeta.Name,
},
}

if err := e.client.Get(ctx, client.ObjectKeyFromObject(caSecret), caSecret); err != nil {
return fmt.Errorf("failed to get secret CA bundle '%s': %w", client.ObjectKeyFromObject(caSecret), err)
return fmt.Errorf("failed to get CA bundle secret '%s': %w", client.ObjectKeyFromObject(caSecret), err)
}

caBundle, ok := caSecret.Data["bundle.crt"]
if !ok {
return fmt.Errorf("failed to find 'bundle.crt' key in the CA bundle secret '%s'", client.ObjectKeyFromObject(caSecret))
}

*new = extensionswebhook.EnsureFileWithPath(*new, extensionsv1alpha1.File{
Expand All @@ -121,26 +125,28 @@ func (e *ensurer) EnsureAdditionalFiles(ctx context.Context, gctx gcontext.Garde
Content: extensionsv1alpha1.FileContent{
Inline: &extensionsv1alpha1.FileContentInline{
Encoding: "b64",
Data: base64.StdEncoding.EncodeToString(caSecret.Data["bundle.crt"]),
Data: base64.StdEncoding.EncodeToString(caBundle),
},
},
})

return nil
}

func (e *ensurer) mutate(cluster *extensionscontroller.Cluster) bool {
func (e *ensurer) shouldMutate(cluster *extensionscontroller.Cluster) bool {
if cluster.Shoot.DeletionTimestamp != nil {
e.logger.Info("Shoot has a deletion timestamp set, skipping the OperatingSystemConfig mutation", "shoot", client.ObjectKeyFromObject(cluster.Shoot))
return false
}

// If hibernation is enabled for Shoot, then the .status.providerStatus field of the registry-cache Extension can be missing (on Shoot creation)
// or outdated (if for hibernated Shoot a new registry is added). Hence, we skip the OperatingSystemConfig mutation when hibernation is enabled.
// When Shoot is waking up, then .status.providerStatus will be updated in the Extension and the OperatingSystemConfig will be mutated according to it.
if v1beta1helper.HibernationIsEnabled(cluster.Shoot) {
e.logger.Info("Hibernation is enabled for Shoot, skipping the OperatingSystemConfig mutation", "shoot", client.ObjectKeyFromObject(cluster.Shoot))
return false
}

return true
}

Expand Down

0 comments on commit d0097d7

Please sign in to comment.