Files
Jose Diaz-Gonzalez 496ede44b7 feat: add scheduler-k3s:preview subcommand
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.
2026-06-02 20:28:31 -04:00

29 lines
1.2 KiB
Markdown

# NOTICE
Files in this directory are derived from
[github.com/databus23/helm-diff](https://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.go`
- `diff/report.go`
- `manifest/parse.go`
Modifications:
- Merged the upstream `diff` and `manifest` packages into a single `helmdiff`
package; references to `manifest.MappingResult` are now bare `MappingResult`.
- Removed three-way-merge support (the upstream `manifest/generate.go` and
`manifest/util.go` files), which imported Helm v4 and other dependencies not
used by Dokku.
- Removed `manifest.ParseObject`, which depended on `k8s.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.go` and `diff/constant.go` files. Only the
default unified-diff (`"diff"`) output format remains.
- `setupReportFormat` is hard-wired to `setupDiffReport`.
- `ReportEntry.Structured` and the `*Options.StructuredOutput()` method removed.