Aofei Sheng

Results 93 comments of Aofei Sheng

> @aofei Is there any log showing that a container was built using this configuration? There's no CI run for this yet. However, it can be verified locally by running:...

We've also encountered this bug in our project. So I did some investigation and would like to share my findings and a proposed solution. GORM uses `**T` type as the...

Also worth noting, the [`database/sql.Scanner.Scan`](https://pkg.go.dev/database/sql#Scanner.Scan)'s doc explicitly states that `nil` will be used to represent NULL values: ``` // The src value will be of one of the following types:...

> How is this handled in the generated OpenAPI spec? Yeah, I was wrong. `json.RawMessage` will be represented as a `string` type in the generated OpenAPI spec: helmcharts.helm.cattle.io ```yaml spec:...

Cert-manager has something similar. Their [webhook `Issuer`](https://cert-manager.io/docs/configuration/acme/dns01/webhook/) has a `config` field that supports arbitrary YAML. But instead of using `runtime.RawExtension`, it uses [`k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON`](https://pkg.go.dev/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1#JSON). ([webhook `Issuer` related code in cert-manager](https://github.com/cert-manager/cert-manager/blob/e422df52852d420bcb547c9094525eb279073631/internal/apis/acme/types_issuer.go#L526-L549)) I...

From my testing, the biggest problem with `runtime.RawExtension` is that it requires the `+kubebuilder:pruning:PreserveUnknownFields` annotation to work, which is not supported by helm-controller. So `k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON` should be what we're looking...