Skip to content

2.25.0.0-b298

@Deepti-yb Deepti-yb tagged this 13 Nov 14:01
Summary: The `CertificateParameters` used in creation of EIT configurations did not have any API annotations. The default expected behaviour is that this field would be optional. However, due to a strange behaviour all the fields are getting marked as required in the generated swagger.json. The generated type in the go client for an optional string is `*string` and for a required string is `string`. Since the type is `string`, the CLI can only send an empty string instead of null by leaving the field empty.  So, this caused an error in creating K8s based cert configs since we had a null check. This change marks fields with `required=false` to avoid this error.

Test Plan:
For k8s cert manager
`./yba eit k8s-cert-manager create -n dkumar-k8s-cli --root-cert-file-path ca.crt -o pretty`

For hcv
`./yba eit hashicorp-vault create -n dkumar-hcv-cli-1 --vault-address <> --token <> --role  itest --mount-path itest/ `

Reviewers: #yba-api-review, sneelakantan

Reviewed By: #yba-api-review, sneelakantan

Subscribers: yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D39956
Assets 2
Loading