File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
10
10
11
11
kamajiv1alpha1 "github.com/clastix/kamaji/api/v1alpha1"
12
12
"github.com/pkg/errors"
13
+ corev1 "k8s.io/api/core/v1"
13
14
"k8s.io/client-go/util/retry"
14
15
capiv1beta1 "sigs.k8s.io/cluster-api/api/v1beta1"
15
16
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -42,6 +43,16 @@ func (r *KamajiControlPlaneReconciler) createOrUpdateTenantControlPlane(ctx cont
42
43
tcp .Annotations = make (map [string ]string )
43
44
}
44
45
46
+ for k , v := range kcp .Annotations {
47
+ if k == corev1 .LastAppliedConfigAnnotation {
48
+ continue
49
+ }
50
+
51
+ tcp .Annotations [k ] = v
52
+ }
53
+
54
+ tcp .Labels = kcp .Labels
55
+
45
56
if kubeconfigSecretKey := kcp .Annotations [kamajiv1alpha1 .KubeconfigSecretKeyAnnotation ]; kubeconfigSecretKey != "" {
46
57
tcp .Annotations [kamajiv1alpha1 .KubeconfigSecretKeyAnnotation ] = kubeconfigSecretKey
47
58
} else {
You can’t perform that action at this time.
0 commit comments