Adds a `scheduler-k3s:preview <app>` command that renders a unified diff between the manifests currently stored in the live Helm release for an app and the manifests that the next deploy would roll out. The diff is produced entirely via the Helm Go SDK that scheduler-k3s already uses, with no external `helm` binary or `helm-diff` plugin install required. The underlying diff and parse logic is vendored from `databus23/helm-diff` (Apache 2.0) into a new internal package, trimmed of three-way-merge, release-ownership tracking, and the non-default output formatters. The chart-construction half of `TriggerSchedulerDeploy` has been extracted into a reusable `BuildAppChart` helper so deploy and preview share the same chart materialization without duplicating template logic. Secret values are redacted by default in preview output; `--show-secrets` and `--show-secrets-decoded` flags match the upstream `helm diff` UX. Only the main app helm release is compared in this iteration; auxiliary releases for config vars, image-pull secrets, and TLS certificates are out of scope and documented as such.
1.2 KiB
1.2 KiB
NOTICE
Files in this directory are derived from
github.com/databus23/helm-diff,
which is distributed under the Apache License 2.0. See LICENSE for the
full text.
Source files merged into this package:
diff/diff.godiff/report.gomanifest/parse.go
Modifications:
- Merged the upstream
diffandmanifestpackages into a singlehelmdiffpackage; references tomanifest.MappingResultare now bareMappingResult. - Removed three-way-merge support (the upstream
manifest/generate.goandmanifest/util.gofiles), which imported Helm v4 and other dependencies not used by Dokku. - Removed
manifest.ParseObject, which depended onk8s.io/apimachinery/pkg/runtime. - Removed release-ownership tracking (
ManifestsOwnership,OwnershipDiff,Releases,reIndexForRelease). - Removed the simple, JSON, structured, dyff, and template output formatters and
the upstream
diff/structured.goanddiff/constant.gofiles. Only the default unified-diff ("diff") output format remains. setupReportFormatis hard-wired tosetupDiffReport.ReportEntry.Structuredand the*Options.StructuredOutput()method removed.