Skip to content

Commit ad437ce

Browse files
rsmittytalos-bot
authored andcommitted
fix: make sure secrets are cluster owned
This PR fixes a bug where certain secrets should be cluster scoped b/c they get reused for bootstrap data generation when new machines scale up/down. Signed-off-by: Spencer Smith <[email protected]>
1 parent 35b952a commit ad437ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

controllers/secrets.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (r *TalosConfigReconciler) writeInputSecret(ctx context.Context, scope *Tal
6969
clusterv1.ClusterLabelName: scope.Cluster.Name,
7070
},
7171
OwnerReferences: []metav1.OwnerReference{
72-
*metav1.NewControllerRef(scope.Config, bootstrapv1alpha3.GroupVersion.WithKind("TalosConfig")),
72+
*metav1.NewControllerRef(scope.Cluster, bootstrapv1alpha3.GroupVersion.WithKind("Cluster")),
7373
},
7474
},
7575
Data: map[string][]byte{
@@ -98,7 +98,7 @@ func (r *TalosConfigReconciler) writeK8sCASecret(ctx context.Context, scope *Tal
9898
clusterv1.ClusterLabelName: scope.Cluster.Name,
9999
},
100100
OwnerReferences: []metav1.OwnerReference{
101-
*metav1.NewControllerRef(scope.Config, bootstrapv1alpha3.GroupVersion.WithKind("TalosConfig")),
101+
*metav1.NewControllerRef(scope.Cluster, bootstrapv1alpha3.GroupVersion.WithKind("Cluster")),
102102
},
103103
},
104104
Data: map[string][]byte{

0 commit comments

Comments
 (0)