Skip to content

Commit

Permalink
Update Hive Install process to put down boundSASigningKey secret if n…
Browse files Browse the repository at this point in the history
…eeded
  • Loading branch information
tsatam committed Oct 1, 2024
1 parent be4a48a commit 1365a79
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/hive/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ func (c *clusterManager) Install(ctx context.Context, sub *api.SubscriptionDocum
if err != nil {
return err
}
boundSASigningKeySecret, err := boundSASigningKeySecret(doc.OpenShiftCluster.Properties.HiveProfile.Namespace, doc.OpenShiftCluster)
if err != nil {
return err
}

resources := []kruntime.Object{
azureCredentialSecret,
Expand All @@ -89,6 +93,13 @@ func (c *clusterManager) Install(ctx context.Context, sub *api.SubscriptionDocum
cd,
}

if boundSASigningKeySecret != nil {
resources = append(resources, boundSASigningKeySecret)
cd.Spec.BoundServiceAccountSignkingKeySecretRef = &corev1.LocalObjectReference{
Name: boundSASigningKeySecret.ObjectMeta.Name,
}
}

err = dynamichelper.Prepare(resources)
if err != nil {
return err
Expand Down

0 comments on commit 1365a79

Please sign in to comment.