From 644c3bef2600c720c29adb8113a389785199a312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Haram=20Nyg=C3=A5rd?= Date: Tue, 13 Aug 2024 14:48:00 +0200 Subject: [PATCH] add comment for image pull secret --- pkg/resourcegenerator/github/image_pull_secret.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/resourcegenerator/github/image_pull_secret.go b/pkg/resourcegenerator/github/image_pull_secret.go index 793bbb27..7b0f9aca 100644 --- a/pkg/resourcegenerator/github/image_pull_secret.go +++ b/pkg/resourcegenerator/github/image_pull_secret.go @@ -35,6 +35,8 @@ func (ips *imagePullSecret) Generate(r reconciliation.Reconciliation) error { if r.GetType() != reconciliation.NamespaceType { return fmt.Errorf("image pull secret only supports namespace type") } + // SKIPObject here is a namespace, so thats why we use GetName, not GetNamespace. + // Should NOT be called from any other controller than namespace-controller secret := corev1.Secret{ObjectMeta: metav1.ObjectMeta{Namespace: r.GetSKIPObject().GetName(), Name: "github-auth"}} secret.Type = corev1.SecretTypeDockerConfigJson