Skip to content

Commit

Permalink
fix(k8s): remove k8s manifest logs on apply (#5665)
Browse files Browse the repository at this point in the history
Kubernetes manifests often contain sensitive values, and Garden at the
moment does not offer sufficient facilities to filter them reliably
enough.
  • Loading branch information
stefreak committed Jan 25, 2024
1 parent a4d8d0b commit 466ac8c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions core/src/plugins/kubernetes/kubectl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ export async function apply({

const input = Buffer.from(encodeYamlMulti(manifests))

const manifestLogLevel = "debug" as const
log[manifestLogLevel](`Applying Kubernetes manifests:\n${input.toString()}`)

const args = ["apply"]
dryRun && args.push("--dry-run")
args.push("--output=json", "-f", "-")
Expand All @@ -146,10 +143,7 @@ export async function apply({
message: dedent`
Failed to apply Kubernetes manifests. This is the output of the kubectl command:
${e.details.output}
Use the option "--log-level ${manifestLogLevel}" to see the kubernetes manifests that we attempted to apply through "kubectl apply".
`,
${e.details.output}`,
})
}
throw e
Expand Down

0 comments on commit 466ac8c

Please sign in to comment.