Skip to content

Commit

Permalink
Merge pull request #287 from leanix/bugfix/missing-namespace-cronjob
Browse files Browse the repository at this point in the history
Update logging to exclude secrets
  • Loading branch information
timmeyerLeanIX authored Jun 12, 2023
2 parents b6715b5 + 2cf845a commit 5342458
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/kubernetes/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ import (
// Deployments gets the list of deployments in a namespace
func (k *API) Deployments(namespace string) (*v1.DeploymentList, error) {
deployments, err := k.Client.AppsV1().Deployments(namespace).List(context.Background(), metav1.ListOptions{})
logger.Infof("list of workload deployments: %v", deployments)
if err != nil {
return nil, err
}
for _, deployment := range deployments.Items {
logger.Infof("Deployment: name=%s, namespace=%s, labels=%v", deployment.Name, deployment.Namespace, deployment.Labels)
}
return deployments, nil
}

0 comments on commit 5342458

Please sign in to comment.