Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

normalize-manifests flag does not work #572

Open
dudicoco opened this issue Mar 7, 2024 · 22 comments
Open

normalize-manifests flag does not work #572

dudicoco opened this issue Mar 7, 2024 · 22 comments

Comments

@dudicoco
Copy link

dudicoco commented Mar 7, 2024

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
@yxxhero
Copy link
Collaborator

yxxhero commented Mar 9, 2024

@dudicoco which version is worked?

@yxxhero
Copy link
Collaborator

yxxhero commented Mar 10, 2024

@dudicoco please try upgrade your helm-diff version.

@dudicoco
Copy link
Author

@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.

@dudicoco
Copy link
Author

dudicoco commented Apr 1, 2024

@yxxhero any updates?

@yxxhero
Copy link
Collaborator

yxxhero commented Apr 1, 2024

@dudicoco I'll try to fix this issue.

@yxxhero
Copy link
Collaborator

yxxhero commented Apr 2, 2024

@yxxhero
Copy link
Collaborator

yxxhero commented Apr 4, 2024

@dudicoco any updates?

@yxxhero
Copy link
Collaborator

yxxhero commented Apr 7, 2024

@dudicoco ping

@dudicoco
Copy link
Author

@yxxhero sorry for the delay. Is there a release binary which I can test?

@yxxhero
Copy link
Collaborator

yxxhero commented Apr 14, 2024

@dudicoco you can build it by youself. if you need help. I will do.

@yxxhero
Copy link
Collaborator

yxxhero commented Apr 28, 2024

ping

@dudicoco
Copy link
Author

@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

@yxxhero
Copy link
Collaborator

yxxhero commented May 19, 2024

clone code

go build -o bin/diff main.go

@yxxhero
Copy link
Collaborator

yxxhero commented May 19, 2024

@dudicoco

@dudicoco
Copy link
Author

@yxxhero thanks, managed to build it.

Unfortunately the new version did not solve the issue.

@yxxhero
Copy link
Collaborator

yxxhero commented May 20, 2024

@dudicoco I need the log.

@dudicoco
Copy link
Author

@yxxhero please elaborate, which log?

@yxxhero
Copy link
Collaborator

yxxhero commented May 21, 2024

@yxxhero please elaborate, which log?

stdout.

@yxxhero
Copy link
Collaborator

yxxhero commented May 21, 2024

@dudicoco

@dudicoco
Copy link
Author

@yxxhero the stdout is the same as the diff in the first comment in the issue.

@yxxhero
Copy link
Collaborator

yxxhero commented May 23, 2024

@dudicoco did you see any context like this:

log.Printf("Normalizing content: \n%s", content)

@yxxhero
Copy link
Collaborator

yxxhero commented Jun 19, 2024

ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants