normalize-manifests flag does not work
Hi,
When adding the normalize-manifests flag to the helm diff command the manifests are not getting normalized.
helm diff version 3.8.1
helm diff upgrade --allow-unreleased amazing-app my-repo/amazing-app --version 2.0.50 --suppress-secrets --normalize-manifests --namespace devops --values ./dev.yaml
devops, amazing-app, Deployment (apps) has changed:
apiVersion: apps/v1
kind: Deployment
metadata:
name: amazing-app
spec:
replicas: 1
selector:
matchLabels:
app: amazing-app
release: amazing-app
strategy:
rollingUpdate:
maxSurge: 20%
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
annotations:
prometheus.io/port: "9898"
prometheus.io/scrape: "true"
labels:
app: amazing-app
release: amazing-app
spec:
containers:
- command:
+ - --level=info
- ./podinfo
- --port=9898
- --port-metrics=9797
- --grpc-port=9999
- --grpc-service-name=backend
- --otel-service-name=backend
- - --level=info
name: amazing-app
ports:
- - containerPort: 9898
- name: http
- protocol: TCP
- containerPort: 9797
name: metrics
+ protocol: TCP
+ - containerPort: 9898
+ name: http
protocol: TCP
resources:
limits:
cpu: 256m
memory: 256Mi
requests:
cpu: 32m
memory: 64Mi
devops, amazing-app, Service (v1) has changed:
apiVersion: v1
kind: Service
metadata:
name: amazing-app
spec:
ports:
- - name: http
- port: 9898
- protocol: TCP
- name: metrics
port: 9797
+ protocol: TCP
+ - name: http
+ port: 9898
protocol: TCP
selector:
app: amazing-app
release: amazing-app
type: ClusterIP
@dudicoco which version is worked?
@dudicoco please try upgrade your helm-diff version.
@yxxhero I have not tried the feature until now so I don't know if it worked in previous versions. I have tried upgrading helm diff to v3.9.5 and still seeing the same issue.
@yxxhero any updates?
@dudicoco I'll try to fix this issue.
@dudicoco try to use https://github.com/databus23/helm-diff/tree/fix-normalize-manifests-issue , and show me the output.
@dudicoco any updates?
@dudicoco ping
@yxxhero sorry for the delay. Is there a release binary which I can test?
@dudicoco you can build it by youself. if you need help. I will do.
ping
@yxxhero sorry for the delay.
I've tried building and got the following errors:
scripts/verify-staticcheck.sh
bash: line 1: staticcheck: command not found
bash: line 1: staticcheck: command not found
bash: line 1: staticcheck: command not found
bash: line 1: staticcheck: command not found
mkdir -p bin/
go build -v -o bin/diff -ldflags="-X github.com/databus23/helm-diff/v3/cmd.Version=3.9.5"
github.com/databus23/helm-diff/v3
Error: unknown command "home" for "helm"
Run 'helm --help' for usage.
Error: unknown command "home" for "helm"
Run 'helm --help' for usage.
Error: unknown command "home" for "helm"
Run 'helm --help' for usage.
mkdir -p /plugins/helm-diff/bin
mkdir: /plugins: Read-only file system
make: *** [install] Error 1
clone code
go build -o bin/diff main.go
@dudicoco
@yxxhero thanks, managed to build it.
Unfortunately the new version did not solve the issue.
@dudicoco I need the log.
@yxxhero please elaborate, which log?
@yxxhero please elaborate, which log?
stdout.
@dudicoco
@yxxhero the stdout is the same as the diff in the first comment in the issue.
@dudicoco did you see any context like this:
log.Printf("Normalizing content: \n%s", content)
ping
Sorry for the delay @yxxhero.
I think I've misunderstood the purpose of this flag, I believe it's supposed to exclude style differences such as indentation from the output, although I didn't encounter nor could I recreate style differences even without using the flag.
Changes in list order actually should be displayed as list could be critical (for example in cmd/args).
Thank you for your help!