Skip to content

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
akgalwas committed Sep 22, 2023
1 parent 94d5d09 commit 726027b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/controller/gardener_cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@ func (r *GardenerClusterController) getSecret(shootName string) (*corev1.Secret,
}

func (r *GardenerClusterController) createSecret(ctx context.Context, cluster infrastructuremanagerv1.GardenerCluster) error {
r.log.Info("About to create new secret")
secret, err := r.newSecret(cluster)
if err != nil {
r.log.Error(err, "failed to create secret")
return err
}

Expand All @@ -152,6 +154,8 @@ func (r *GardenerClusterController) createSecret(ctx context.Context, cluster in
func (r *GardenerClusterController) newSecret(cluster infrastructuremanagerv1.GardenerCluster) (corev1.Secret, error) {
labels := map[string]string{}

r.log.Info("Creating new secret")

for key, val := range cluster.Labels {
labels[key] = val
}
Expand Down

0 comments on commit 726027b

Please sign in to comment.