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

helm diff --three-way-merge upgrade not detecting kubernetes manual change #455

Open
ceastman-r7 opened this issue Apr 26, 2023 · 1 comment

Comments

@ceastman-r7
Copy link

this is a redacted version of the values.yaml:

apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
  labels:
    app.kubernetes.io/managed-by: Helm
  name: allowedrepos-aws
spec:
  background: true
  rules:
  - match:
      any:
      - resources:
          kinds:
          - Pod
          namespaces:
          - kube-system
    name: aws-repos
    validate:
      deny:
        conditions:
          all:
          - key: '{{ images.[containers, initContainers, ephemeralContainers][].*.registry[]
              }}'
            operator: AnyNotIn
            value:
            - xyz.*.amazonaws.com
      message: All images in this Pod must come from an authorized repository.
  validationFailureAction: enforce

this is the manual change I made that the --three-way-merge does not detect:

apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
  labels:
    app.kubernetes.io/managed-by: Helm
  name: allowedrepos-aws
spec:
  background: true
  rules:
  - match:
      any:
      - resources:
          kinds:
          - Pod
          namespaces:
          - kube-system
    name: aws-repos
    validate:
      deny:
        conditions:
          all:
          - key: '{{ images.[containers, initContainers, ephemeralContainers][].*.registry[]
              }}'
            operator: AnyNotIn
            value:
            - xyz.*.amazonaws.com
      message: All images in this Pod must come from an authorized repository.
  validationFailureAction: audit

notice the change in the value for validationFailureAction

the detailed exit code is 0

@drcrees
Copy link

drcrees commented Apr 26, 2024

I am seeing this as well on version 3.9.5 with three-way-merge and normalize manifests enabled.

I had manually updated a Deployment resource to include a nodeSelector and helm-diff did not detect it.

EDIT:
#176 (comment)

This is likely just how it works with Helm 3

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