You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
flux2/cmd/flux
Florian Forster 72a948e8a9
flux diff artifact: Print the differences in human readable form.
I was hoping to use `flux diff artifact` as part of a CI pipeline to show the
difference between the merge request and the currently deployed artifact. The
existing implementation doesn't work for us, since it only compares the
checksums.

This commit changes the output produced by `flux diff artifact` to a list of
changes in human readable form. The code is using the `dyff` package to produce
a semantic diff of the YAML files. That means, for example, that changes in the
order of map fields are ignored, while changes in the order of lists are not.

Example output:

```
$ ./bin/flux diff artifact "oci://${IMAGE}" --path=example-service/

spec.replicas  (apps/v1/Deployment/example-service-t205j6/backend-production)
  ± value change
    - 1
    + 7

✗ "oci://registry.gitlab.com/${REDACTED}/example-service-t205j6/deploy:production" and "example-service/" differ
```

The new `--brief` / `-q` flag enables users to revert to the previous behavior
of only printing a has changed/has not changed line.

Signed-off-by: Florian Forster <fforster@gitlab.com>
9 months ago
..
testdata Recursively build and diff Kustomizations 9 months ago
alert.go Update all the references of NC v1beta2 to v1beta3 2 years ago
alert_provider.go Update all the references of NC v1beta2 to v1beta3 2 years ago
bootstrap.go Add `--ssh-hostkey-algos` flag to bootstrap command 1 year ago
bootstrap_bitbucket_server.go Generate image pull secret at bootstrap 1 year ago
bootstrap_git.go Add `--ssh-hostkey-algos` flag to bootstrap command 1 year ago
bootstrap_gitea.go Generate image pull secret at bootstrap 1 year ago
bootstrap_github.go Generate image pull secret at bootstrap 1 year ago
bootstrap_gitlab.go Introduce visibility flag for bootstrap gitlab 11 months ago
build.go add a preview note for all non-bootstrap commands 2 years ago
build_artifact.go fix build_artifact.go typo 2 years ago
build_artifact_test.go tests: only provide template values when used 2 years ago
build_kustomization.go Recursively build and diff Kustomizations 9 months ago
build_kustomization_test.go Recursively build and diff Kustomizations 9 months ago
check.go Set Kubernetes 1.28 as min required version 1 year ago
check_test.go Add /v2 suffix to module name in preparation of 2.0.0 release 2 years ago
cluster_info.go show cluster instance name and version in flux check and flux version 2 years ago
cluster_info_test.go Update dependencies to Kubernetes v1.28.6 1 year ago
completion.go add a preview note for all non-bootstrap commands 2 years ago
completion_bash.go add a preview note for all non-bootstrap commands 2 years ago
completion_fish.go add a preview note for all non-bootstrap commands 2 years ago
completion_powershell.go add a preview note for all non-bootstrap commands 2 years ago
completion_zsh.go add a preview note for all non-bootstrap commands 2 years ago
create.go check readiness using kstatus 2 years ago
create_alert.go Update all the references of NC v1beta2 to v1beta3 2 years ago
create_alertprovider.go Update all the references of NC v1beta2 to v1beta3 2 years ago
create_helmrelease.go Add support for creating HR with .spec.ChartRef 1 year ago
create_helmrelease_test.go Add support for creating HR with .spec.ChartRef 1 year ago
create_image.go add a preview note for all non-bootstrap commands 2 years ago
create_image_policy.go misc: remove unused bits of code 2 years ago
create_image_repository.go add a preview note for all non-bootstrap commands 2 years ago
create_image_update.go Update image-automation-controller API to v1beta2 1 year ago
create_kustomization.go Update `HelmRelease` API to v2 1 year ago
create_receiver.go check readiness using kstatus 2 years ago
create_secret.go add a preview note for all non-bootstrap commands 2 years ago
create_secret_git.go add flag `--ca-crt-file` to `flux create secret git` 2 years ago
create_secret_git_test.go add flag `--ca-crt-file` to `flux create secret git` 2 years ago
create_secret_helm.go Mark `source helm` commands as GA 1 year ago
create_secret_helm_test.go Add create oci secret command 3 years ago
create_secret_notation.go Add command for creating notation configuration secrets 1 year ago
create_secret_notation_test.go build(deps): bump notation-go to v1.2.1 9 months ago
create_secret_oci.go add a preview note for all non-bootstrap commands 2 years ago
create_secret_oci_test.go Add create oci secret command 3 years ago
create_secret_tls.go add deprecation warning per secret key field and constant 2 years ago
create_secret_tls_test.go add support for Kubernetes TLS keys for `flux create secret tls` 2 years ago
create_source.go add a preview note for all non-bootstrap commands 2 years ago
create_source_bucket.go check readiness using kstatus 2 years ago
create_source_chart.go Add `(create|delete|export) source chart` commands 1 year ago
create_source_chart_test.go Add `(create|delete|export) source chart` commands 1 year ago
create_source_git.go check readiness using kstatus 2 years ago
create_source_git_test.go check readiness using kstatus 2 years ago
create_source_helm.go Mark `source helm` commands as GA 1 year ago
create_source_helm_test.go Add OCI support to `create source helm` 3 years ago
create_source_oci.go Update Helm Source APIs to v1 (GA) 1 year ago
create_source_oci_test.go Add flags for issuer/subject OCI signature verification 1 year ago
create_tenant.go add a preview note for all non-bootstrap commands 2 years ago
create_test.go validate that object name adheres to RFC 1123 for flux create commands 3 years ago
delete.go add a preview note for all non-bootstrap commands 2 years ago
delete_alert.go Update all the references of NC v1beta2 to v1beta3 2 years ago
delete_alertprovider.go Update all the references of NC v1beta2 to v1beta3 2 years ago
delete_helmrelease.go Mark `HelmRelease` commands as GA 1 year ago
delete_image.go add a preview note for all non-bootstrap commands 2 years ago
delete_image_policy.go add a preview note for all non-bootstrap commands 2 years ago
delete_image_repository.go add a preview note for all non-bootstrap commands 2 years ago
delete_image_update.go Update image-automation-controller API to v1beta2 1 year ago
delete_kustomization.go add a preview note for all non-bootstrap commands 2 years ago
delete_receiver.go add a preview note for all non-bootstrap commands 2 years ago
delete_source.go add a preview note for all non-bootstrap commands 2 years ago
delete_source_bucket.go add a preview note for all non-bootstrap commands 2 years ago
delete_source_chart.go Add `(create|delete|export) source chart` commands 1 year ago
delete_source_git.go add a preview note for all non-bootstrap commands 2 years ago
delete_source_helm.go Migrate `flux uninstall` to Helm Source API v1 1 year ago
delete_source_oci.go add a preview note for all non-bootstrap commands 2 years ago
diff.go add a preview note for all non-bootstrap commands 2 years ago
diff_artifact.go flux diff artifact: Print the differences in human readable form. 9 months ago
diff_artifact_test.go feat: diff artifact capability added 3 years ago
diff_kustomization.go Recursively build and diff Kustomizations 9 months ago
diff_kustomization_test.go Recursively build and diff Kustomizations 9 months ago
docgen.go Revert "Fix broken "edit this page" links in Flux CLI section" 3 years ago
envsubst.go Add `flux envsubst` command 1 year ago
envsubst_test.go Add `flux envsubst` command 1 year ago
events.go Update `HelmRelease` API to v2 1 year ago
events_test.go Update tests to GA APIs 1 year ago
export.go add a preview note for all non-bootstrap commands 2 years ago
export_alert.go Update all the references of NC v1beta2 to v1beta3 2 years ago
export_alertprovider.go Update all the references of NC v1beta2 to v1beta3 2 years ago
export_helmrelease.go Mark `HelmRelease` commands as GA 1 year ago
export_image.go add a preview note for all non-bootstrap commands 2 years ago
export_image_policy.go add a preview note for all non-bootstrap commands 2 years ago
export_image_repository.go add a preview note for all non-bootstrap commands 2 years ago
export_image_update.go Update image-automation-controller API to v1beta2 1 year ago
export_kustomization.go add a preview note for all non-bootstrap commands 2 years ago
export_receiver.go add a preview note for all non-bootstrap commands 2 years ago
export_secret.go misc: remove unused bits of code 2 years ago
export_source.go add a preview note for all non-bootstrap commands 2 years ago
export_source_bucket.go add a preview note for all non-bootstrap commands 2 years ago
export_source_chart.go Add `(create|delete|export) source chart` commands 1 year ago
export_source_git.go add a preview note for all non-bootstrap commands 2 years ago
export_source_helm.go Mark `source helm` commands as GA 1 year ago
export_source_oci.go add a preview note for all non-bootstrap commands 2 years ago
export_test.go Add `(create|delete|export) source chart` commands 1 year ago
get.go Properly detect unsupported API errors 2 years ago
get_alert.go Update all the references of NC v1beta2 to v1beta3 2 years ago
get_alertprovider.go Update all the references of NC v1beta2 to v1beta3 2 years ago
get_all.go Update `HelmRelease` API to v2 1 year ago
get_helmrelease.go Mark `HelmRelease` commands as GA 1 year ago
get_image.go add a preview note for all non-bootstrap commands 2 years ago
get_image_all.go Update image-automation-controller API to v1beta2 1 year ago
get_image_policy.go add a preview note for all non-bootstrap commands 2 years ago
get_image_repository.go misc: address `strings.Title` deprecation 2 years ago
get_image_update.go Update image-automation-controller API to v1beta2 1 year ago
get_kustomization.go misc: address `strings.Title` deprecation 2 years ago
get_receiver.go misc: address `strings.Title` deprecation 2 years ago
get_source.go add a preview note for all non-bootstrap commands 2 years ago
get_source_all.go Update Helm Source APIs to v1 (GA) 1 year ago
get_source_bucket.go misc: address `strings.Title` deprecation 2 years ago
get_source_chart.go Mark `source helm` commands as GA 1 year ago
get_source_git.go misc: address `strings.Title` deprecation 2 years ago
get_source_helm.go Mark `source helm` commands as GA 1 year ago
get_source_oci.go misc: address `strings.Title` deprecation 2 years ago
get_test.go Add label selector flag to get cmd 2 years ago
helmrelease.go Mark `HelmRelease` commands as GA 1 year ago
helmrelease_test.go e2e: update podinfo to version with newer APIs 2 years ago
image.go Update image-automation-controller API to v1beta2 1 year ago
image_test.go tests: rename "kubectl" `setupTestNamespace` 2 years ago
install.go Generate image pull secret at install 1 year ago
install_test.go Generate image pull secret at install 1 year ago
kustomization.go Update GitRepository Receiver, and Kustomization to v1 2 years ago
kustomization_test.go Add support for passing multiple objects to suspend/resume commands 2 years ago
list.go add a preview note for all non-bootstrap commands 2 years ago
list_artifact.go Update Kubernetes to v1.27 and Kustomize to v5.0 2 years ago
log.go Add Warningf to logger interface amd impl 4 years ago
logs.go chore: remove repetitive word 1 year ago
logs_e2e_test.go misc: `sinceSeconds` -> `sinceDuration` 2 years ago
logs_unit_test.go Make `flux logs` more lenient 2 years ago
main.go update description of kubeconfig flags 2 years ago
main_e2e_test.go check readiness using kstatus 2 years ago
main_test.go Recursively build and diff Kustomizations 9 months ago
main_unit_test.go check readiness using kstatus 2 years ago
manifests.embed.go Add missing copyright headers 4 years ago
object.go Add support for passing multiple objects to suspend/resume commands 2 years ago
pull.go add a preview note for all non-bootstrap commands 2 years ago
pull_artifact.go Print artifact source and revision only when available 2 years ago
push.go add a preview note for all non-bootstrap commands 2 years ago
push_artifact.go Add `--reproducible` flag to `flux push artifact` 1 year ago
readiness.go check readiness using kstatus 2 years ago
readiness_test.go check readiness using kstatus 2 years ago
receiver.go Update GitRepository Receiver, and Kustomization to v1 2 years ago
reconcile.go Update `HelmRelease` API to v2 1 year ago
reconcile_helmrelease.go Fix reconcile helmrelease command description 10 months ago
reconcile_image.go add a preview note for all non-bootstrap commands 2 years ago
reconcile_image_repository.go non-reconciliable & readiness of static objects 2 years ago
reconcile_image_updateauto.go Update image-automation-controller API to v1beta2 1 year ago
reconcile_kustomization.go non-reconciliable & readiness of static objects 2 years ago
reconcile_receiver.go non-reconciliable & readiness of static objects 2 years ago
reconcile_source.go add a preview note for all non-bootstrap commands 2 years ago
reconcile_source_bucket.go non-reconciliable & readiness of static objects 2 years ago
reconcile_source_chart.go Migrate `flux events` to Helm Source API v1 1 year ago
reconcile_source_git.go non-reconciliable & readiness of static objects 2 years ago
reconcile_source_helm.go Update Helm Source APIs to v1 (GA) 1 year ago
reconcile_source_oci.go non-reconciliable & readiness of static objects 2 years ago
reconcile_with_source.go Mark `source helm` commands as GA 1 year ago
resume.go non-reconciliable & readiness of static objects 2 years ago
resume_alert.go Update all the references of NC v1beta2 to v1beta3 2 years ago
resume_alertprovider.go Update all the references of NC v1beta2 to v1beta3 2 years ago
resume_helmrelease.go Mark `HelmRelease` commands as GA 1 year ago
resume_image.go add a preview note for all non-bootstrap commands 2 years ago
resume_image_repository.go Add examples for resuming/suspending multiple objects 2 years ago
resume_image_updateauto.go Update image-automation-controller API to v1beta2 1 year ago
resume_kustomization.go Add examples for resuming/suspending multiple objects 2 years ago
resume_receiver.go Add examples for resuming/suspending multiple objects 2 years ago
resume_source.go add a preview note for all non-bootstrap commands 2 years ago
resume_source_bucket.go Add examples for resuming/suspending multiple objects 2 years ago
resume_source_chart.go Update Helm Source APIs to v1 (GA) 1 year ago
resume_source_git.go Add examples for resuming/suspending multiple objects 2 years ago
resume_source_helm.go Update Helm Source APIs to v1 (GA) 1 year ago
resume_source_oci.go Add examples for resuming/suspending multiple objects 2 years ago
source.go Update Helm Source APIs to v1 (GA) 1 year ago
source_oci_test.go e2e: update podinfo to version with newer APIs 2 years ago
stats.go Update `HelmRelease` API to v2 1 year ago
status.go check readiness using kstatus 2 years ago
suspend.go Add support for passing multiple objects to suspend/resume commands 2 years ago
suspend_alert.go Update all the references of NC v1beta2 to v1beta3 2 years ago
suspend_alertprovider.go Update all the references of NC v1beta2 to v1beta3 2 years ago
suspend_helmrelease.go Mark `HelmRelease` commands as GA 1 year ago
suspend_image.go add a preview note for all non-bootstrap commands 2 years ago
suspend_image_repository.go Add examples for resuming/suspending multiple objects 2 years ago
suspend_image_updateauto.go Update image-automation-controller API to v1beta2 1 year ago
suspend_kustomization.go Add examples for resuming/suspending multiple objects 2 years ago
suspend_receiver.go Add examples for resuming/suspending multiple objects 2 years ago
suspend_source.go add a preview note for all non-bootstrap commands 2 years ago
suspend_source_bucket.go Add examples for resuming/suspending multiple objects 2 years ago
suspend_source_chart.go Update Helm Source APIs to v1 (GA) 1 year ago
suspend_source_git.go Add examples for resuming/suspending multiple objects 2 years ago
suspend_source_helm.go Update Helm Source APIs to v1 (GA) 1 year ago
suspend_source_oci.go Add examples for resuming/suspending multiple objects 2 years ago
tag.go add a preview note for all non-bootstrap commands 2 years ago
tag_artifact.go Update Kubernetes to v1.27 and Kustomize to v5.0 2 years ago
trace.go Update `HelmRelease` API to v2 1 year ago
trace_test.go Update `HelmRelease` API to v2 1 year ago
tree.go add a preview note for all non-bootstrap commands 2 years ago
tree_kustomization.go Update `HelmRelease` API to v2 1 year ago
tree_kustomization_test.go Update Go to v1.17 3 years ago
uninstall.go Properly detect unexpected arguments 1 year ago
version.go show cluster instance name and version in flux check and flux version 2 years ago
version_test.go Fix controller version info 2 years ago
version_utils.go Add /v2 suffix to module name in preparation of 2.0.0 release 2 years ago
version_utils_test.go Update Go to v1.17 3 years ago