FusionAuth/charts

Search port required even when search is set to database

Closed this issue · 4 comments

When using search: engine: database the chart enforces that port be an integer. It should not validate this field since the comment above says:

search.port -- Port to use when connecting to elasticsearch. Ignored when search.engine is NOT elasticsearch

Error: UPGRADE FAILED: values don't meet the specifications of the schema(s) in the following chart(s):
fusionauth:
- search.port: Invalid type. Expected: integer, given: string

Relevant block in my values.yaml

  search:
    # search.engine -- Defines backend for fusionauth search capabilities. Valid values for engine are 'elasticsearch' or 'database'.
    engine: database
    # search.engine -- Protocol to use when connecting to elasticsearch. Ignored when search.engine is NOT elasticsearch
    protocol: ""
    # search.host -- Hostname or ip to use when connecting to elasticsearch. Ignored when search.engine is NOT elasticsearch
    host: ""
    # search.port -- Port to use when connecting to elasticsearch. Ignored when search.engine is NOT elasticsearch
    port:
    # search.user -- Username to use with basic auth when connecting to elasticsearch. Ignored when search.engine is NOT elasticsearch
    # user: ""
    # search.password -- Password to use with basic auth when connecting to elasticsearch. Ignored when search.engine is NOT elasticsearch
    # password: ""

Hmm.. why are you explicitly setting it to an empty value instead of just leaving it alone? I don't think the validation is capable of allowing invalid types for values even if you aren't using them.

Ok, going with port: 0 works.

It does work, but what I'm asking is why modify it from the default at all?

Like, your values.yaml could just say:

search:
  engine: database