Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-8933

[Community tracker] - [KUBE] Use Schemaless for Objects that can be Unmarshaled as string or struct

    XMLWordPrintable

Details

    • 2023 Week 12-14 (from Mar 20), 2023 Week 15-17 (from Apr 10)

    Description

      What would you like to be added:

      Kubernetes Kubebuilder code generator is not able to handle union tag which handles the oneOf definition that allows us to define which types a struct accepts two types, example, string and boolean.
      More information on kubernetes-sigs/controller-tools#298

      One option to overcome this problem is defining the affect struct as schemaless and delegate the workflow validation to the admission webhook.

      E..g:

      // +kubebuilder:validation:Schemaless
      // +kubebuilder:pruning:PreserveUnknownFields
      Object *CustomObj `json:"object,omitempty"`

       
      {}This way, this field can be defined as Schemaless and will accept any value.
       
      Why is this needed:
      To be able to smoothly integrate the sdk with Kubernetes.

      Attachments

        Activity

          People

            rhn-support-fspolti Filippe Spolti
            rhn-support-fspolti Filippe Spolti
            Tristan Radisson Tristan Radisson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: