Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
Run Auditlocal, even when kubeaudit detected to run in a cluster. (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
mms-gianni authored Sep 24, 2020
1 parent 06bca1e commit f99985c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func getReport(auditors ...kubeaudit.Auditable) *kubeaudit.Report {
return report
}

if k8s.IsRunningInCluster(k8s.DefaultClient) {
if ( k8s.IsRunningInCluster(k8s.DefaultClient) && rootConfig.kubeConfig == "" ) {
report, err := auditor.AuditCluster(k8s.ClientOptions{Namespace: rootConfig.namespace})
if err != nil {
log.WithError(err).Fatal("Error auditing cluster")
Expand Down

0 comments on commit f99985c

Please sign in to comment.