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

kapp reports incorrect diff for a resource having no annotation and spec updated by a webhook #946

Open
prembhaskal opened this issue Apr 30, 2024 · 0 comments
Labels
bug This issue describes a defect or unexpected behavior carvel accepted This issue should be considered for future work and that the triage process has been completed priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@prembhaskal
Copy link
Member

prembhaskal commented Apr 30, 2024

What steps did you take:
[A clear and concise description steps and any files that can be used to reproduce the problem.]
I deployed a package install resource with below yaml

---
apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageInstall
metadata:
  name: pkg-demo
spec:
  packageRef:
    refName: simple-app.corp.com
    versionSelection:
      constraints: 1.0.1
  values:
  - secretRef:
      name: pkg-demo-values

A webhook adds below fields in the resources

spec.defaultNamespace: some-namespace
spec.serviceAccountName: some-sa

What happened:

When I deploy the same file again, kapp reports the fields added by webhook in the diff

Target cluster 'https://pni-stable.stacks.bluesky.tmc-dev.cloud.vmware.com/org/7b5a3524-a142-468e-98e5-9044ec534643/project/997b9b08-6baa-4224-85ff-f36fb7da6660/clustergroup/test-run'

@@ update packageinstall/pkg-demo (packaging.carvel.dev/v1alpha1) namespace: default @@
  ...
  spec:
-   defaultNamespace: unusable-namespace
    packageRef:
      refName: simple-app.corp.com
  ...
        constraints: 1.0.1
-   serviceAccountName: pkg-installs-sa
    values:
    - secretRef:

Changes

Namespace  Name      Kind            Age  Op      Op st.  Wait to    Rs       Ri  
default    pkg-demo  PackageInstall  11s  update  -       reconcile  ongoing  Waiting for generation 1 to be  
                                                                              observed  

Op:      0 create, 0 delete, 1 update, 0 noop, 0 exists
Wait to: 1 reconcile, 0 delete, 0 noop

What did you expect:
kapp should not report any diff for fields added by a webhook since there is no change in the resource.

Anything else you would like to add:
[Additional information that will assist in solving the issue.]

Environment:

  • kapp version (use kapp --version):
    kapp version 0.59.0

  • OS (e.g. from /etc/os-release):
    mac os

  • Kubernetes version (use kubectl version)


Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

@prembhaskal prembhaskal added bug This issue describes a defect or unexpected behavior carvel triage This issue has not yet been reviewed for validity labels Apr 30, 2024
@prembhaskal prembhaskal changed the title kapp reports incorrect diff for a resource with no annotation and spec is updated by a webhook kapp reports incorrect diff for a resource having no annotation and spec updated by a webhook Apr 30, 2024
@praveenrewar praveenrewar added carvel accepted This issue should be considered for future work and that the triage process has been completed and removed carvel triage This issue has not yet been reviewed for validity labels Apr 30, 2024
@renuy renuy moved this to Prioritized Backlog in Carvel May 24, 2024
@renuy renuy moved this from Prioritized Backlog to Unprioritized in Carvel May 24, 2024
@renuy renuy added the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes a defect or unexpected behavior carvel accepted This issue should be considered for future work and that the triage process has been completed priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
Status: Unprioritized
Development

No branches or pull requests

3 participants