Skip to content

Commit

Permalink
preserve unknown fields in vulnerabilityreport
Browse files Browse the repository at this point in the history
I built a custom operator (https://github.com/telekom-mms/trivy-dojo-report-operator)
that uses the kopf-operator (github.com/nolar/kopf/) framework.
This framework can act on kubernetes-resource creation. To detect which resources
were already worked on, kopf adds a the last state of the resource as an
annotation or status to the resource.I cannot use the annotation-feature, because
of this issue: kubernetes-sigs/kubebuilder#2556 (annotations
get too long).

So my proposal is to preseve unknown fields in the vulnerabilityreport-crd. This way
I can add a status-field which kopf then can use to store the state.
  • Loading branch information
rndmh3ro committed Aug 23, 2023
1 parent c3add5b commit 9fab92d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ spec:
- updateTimestamp
- vulnerabilities
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- report
type: object
Expand Down

0 comments on commit 9fab92d

Please sign in to comment.