You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project uses sdk-konnect-go for some of the underlying types in CRDs.
Some of definitions of those types cannot be reused as fields generated from OpenAPI spec do not have much sense in Kubernetes world. For example ServiceInput, contains
// Array of `CA Certificate` object UUIDs that are used to build the trust store while verifying upstream server's TLS certificate. If set to `null` when Nginx default is respected. If default CA list in Nginx are not specified and TLS verification is enabled, then handshake with upstream server will always fail (because no CA are trusted).
CaCertificates []string `json:"ca_certificates,omitempty"`
field which can be used to set Service's CA certificates via a UUID slice. This wouldn't work well in Kubernetes as users are expecting in cluster references. So instead of the above we'd want to make this field an array of in-cluster references to CACertificate objects.
Without this being solved, we have to use a copy paste version of those types with stripped fields, i.e.
Problem statement
This project uses
sdk-konnect-go
for some of the underlying types in CRDs.Some of definitions of those types cannot be reused as fields generated from OpenAPI spec do not have much sense in Kubernetes world. For example
ServiceInput
, containsfield which can be used to set Service's CA certificates via a UUID slice. This wouldn't work well in Kubernetes as users are expecting in cluster references. So instead of the above we'd want to make this field an array of in-cluster references to CACertificate objects.
Without this being solved, we have to use a copy paste version of those types with stripped fields, i.e.
kubernetes-configuration/api/configuration/v1alpha1/kongservice_types.go
Lines 65 to 109 in a721d9e
Possible solutions
Add a post generation step which would change the struct types into interfaces, and then generate:
Add a post generation "copy paste" step that would provide a k8s flavored functions which would basically do
Anything else
Related slack thread: https://kongstrong.slack.com/archives/C011RQPHDC7/p1731951022019939?thread_ts=1731624171.431279&cid=C011RQPHDC7
The text was updated successfully, but these errors were encountered: