Skip to content

Conversation

@mattmoor
Copy link
Member

This changes the cosigned webhook to ignore things that are being cleaned up.

As resources are cleaned up in Kubernetes (typically things with finalizers), they are first tombstoned by setting metadata.deletionTimestamp and once the finalizers have fully executed they are actually deleted.

To the webhook, these look like UPDATE operations, but are distinguishable because we can check for this field.

This also adds unit test coverage for the duckv1.Pod and duckv1.WithPod wrappers around the core validation and resolution logic.

Signed-off-by: Matt Moore [email protected]

Ticket Link

Release Note

The cosigned webhook now ignores resources that are being deleted.

This changes the `cosigned` webhook to ignore things that are being cleaned up.

As resources are cleaned up in Kubernetes (typically things with finalizers), they are first tombstoned by setting `metadata.deletionTimestamp` and once the finalizers have fully executed they are actually deleted.

To the webhook, these look like `UPDATE` operations, but are distinguishable because we can check for this field.

This also adds unit test coverage for the `duckv1.Pod` and `duckv1.WithPod` wrappers around the core validation and resolution logic.

Signed-off-by: Matt Moore <[email protected]>
@mattmoor mattmoor merged commit ff31e13 into sigstore:main Sep 26, 2021
@mattmoor mattmoor deleted the deletion-timestamp branch September 26, 2021 16:02
@github-actions github-actions bot added this to the v1.3.0 milestone Sep 26, 2021
mrjoelkamp pushed a commit to mrjoelkamp/cosign that referenced this pull request Sep 28, 2021
This changes the `cosigned` webhook to ignore things that are being cleaned up.

As resources are cleaned up in Kubernetes (typically things with finalizers), they are first tombstoned by setting `metadata.deletionTimestamp` and once the finalizers have fully executed they are actually deleted.

To the webhook, these look like `UPDATE` operations, but are distinguishable because we can check for this field.

This also adds unit test coverage for the `duckv1.Pod` and `duckv1.WithPod` wrappers around the core validation and resolution logic.

Signed-off-by: Matt Moore <[email protected]>
Signed-off-by: Joel Kamp <[email protected]>
mrjoelkamp pushed a commit to mrjoelkamp/cosign that referenced this pull request Sep 28, 2021
This changes the `cosigned` webhook to ignore things that are being cleaned up.

As resources are cleaned up in Kubernetes (typically things with finalizers), they are first tombstoned by setting `metadata.deletionTimestamp` and once the finalizers have fully executed they are actually deleted.

To the webhook, these look like `UPDATE` operations, but are distinguishable because we can check for this field.

This also adds unit test coverage for the `duckv1.Pod` and `duckv1.WithPod` wrappers around the core validation and resolution logic.

Signed-off-by: Matt Moore <[email protected]>
Signed-off-by: Joel Kamp <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants