jordigilh commented on PR #311:
URL:
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/311#issuecomment-1856521935
> > It's fixed by increasing the `maxProperty` value to 3. @tchughesiv do
you know why it was limited to 2 max in the first place? Any reason for the
validation? Can it be increased to 3?
>
> No, it should not be increased to 3. The validation is set this way
because `ServiceRef` and `JdbcUrl` should not be set simultaneously. It's an
either/or scenario. `SecretRef` is a required field.
>
> @jordigilh can you show me the platform CR you're trying to use?
The problem is that the `ServiceRef` field is not a pointer and it's a
structure, so it is populated with default values and that's good enough for
the schema validation to be considered as populated. That's why, when providing
the JDBC URL, it considers all 3 fields as populated and fails the validation.
By changing the `ServiceRef` to be a pointer, and adjusting the code to take
that into account, solves the issue without having to change the limits:
```
// Service reference to postgresql datasource. Mutually exclusive to
jdbcUrl.
// +optional
ServiceRef *PostgreSqlServiceOptions `json:"serviceRef,omitempty"`
```
You can reproduce the error by creating this test case:
https://github.com/wmedvede/techpreview2/tree/test-platform-services/platforms/jobservice_as_platform_service_postgresql
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]