itzg / minecraft-server-charts

MIT License
279 stars 144 forks source link

Allow optional definition of ingress #222

Closed drewburr closed 3 months ago

drewburr commented 3 months ago

Removes the requirement of setting ingress.enabled: false for extraPorts. For example, an item in extraPorts[] needing no ingress currently requires:

extraPorts:
  - name: map
    protocol: TCP
    ingress:
      enabled: false
    ...

If ingress is omitted, the following error is thrown:

Error: template: minecraft-toiletbowl/charts/minecraft/templates/extraports-ing.yaml:3:26: executing "minecraft-toiletbowl/charts/minecraft/templates/extraports-ing.yaml" at <.ingress.enabled>: nil pointer evaluating interface {}.enabled

With this update, we can safely omit the ingress object entirely:

extraPorts:
  - name: map
    protocol: TCP
    ...
drewburr commented 3 months ago

Thanks! Can you also bump the chart's minor version? (PR/merge process currently requires it 😞)

Good catch! Thanks for the heads up, I'll keep this in mind in the future