carvel-dev / carvel-dev/kapp

Missing annotation objects are not treated deterministically

Open
#190 9 comments 0 reactions 0 assignees View on GitHub
bug carvel accepted
Dominant language
Go
Stars
1.1k
Forks
134
PR merge metrics
No merged PRs in 30d

Description

**What steps did you take:**
1. Deploy a resource without an `annotations` block like so:

```yaml
---
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
name: validation.webhook.kpack.io
webhooks:
- admissionReviewVersions:
- v1beta1
clientConfig:
service:
name: kpack-webhook
namespace: kpack
failurePolicy: Fail
sideEffects: None
name: validation.webhook.kpack.io
```

2. Now deploy it again with a diff

```
+ ...
+ 2, 2 metadata:
+ 3 - annotations: {}
+ 4, 3 creationTimestamp: "2020-11-16T15:31:49Z"
+ 5, 4 generation: 388
```

**What happened:**
A diff is always created for this resource even though it has not changed.

**What did you expect:**
The kapp deployment should be idempotent. It seems like kapp removes the kapp specific annotations but leaves behind a empty annotations object which causes a deployment to always trigger again.

**Additional Information:**
Automation in our deployments and reproducable deploys are important to us as we deploy with kapp often. This bug creates a lot of noise in some of our deployments and we do not want to have to change our manifest to fit a format that kapp likes.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.