Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.

[elasticsearch] Make ingress hosts optional#1003

Closed
wouterdegeus wants to merge 2 commits intoelastic:masterfrom
wouterdegeus:wdegeus/elasticsearch-ingress-host-optional
Closed

[elasticsearch] Make ingress hosts optional#1003
wouterdegeus wants to merge 2 commits intoelastic:masterfrom
wouterdegeus:wdegeus/elasticsearch-ingress-host-optional

Conversation

@wouterdegeus
Copy link
Copy Markdown

This PR allows the ingress hosts definition to be made empty, which is useful for POC situations where we really don't care about hostnames, for example in GKE using an internal loadbalancer with container native loadbalancing:

service:
  annotations:
    cloud.google.com/neg: '{"ingress": true}'

ingress:
  enabled: true
  annotations:
    kubernetes.io/ingress.class: "gce-internal"
  path: /
  hosts:

Without this PR the chart would generate an ingress without rules given above config, which is not accepted by kubernetes.
With this PR it generates a proper ingress template without a hostname tied to it.

  • [ x] Chart version not bumped (the versions are all bumped and released at the same time)
  • [ x] README.md updated with any new values or changes
  • [x ] Updated template tests in ${CHART}/tests/*.py
  • Updated integration tests in ${CHART}/examples/*/test/goss.yaml

Signed-off-by: Wouter de Geus <wouterdegeus@binx.io>
Signed-off-by: Wouter de Geus <wouterdegeus@binx.io>
@elasticmachine
Copy link
Copy Markdown
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@jmlrt jmlrt added elasticsearch enhancement New feature or request labels Jan 6, 2021
@jmlrt
Copy link
Copy Markdown
Member

jmlrt commented Jan 6, 2021

Hi @wouterdegeus,
Thanks for opening this PR.
We'll try to review it soon. Please be patient.

@jmlrt
Copy link
Copy Markdown
Member

jmlrt commented Jan 6, 2021

Related to #536

@jmlrt
Copy link
Copy Markdown
Member

jmlrt commented Feb 3, 2021

jenkins test this please

@jmlrt
Copy link
Copy Markdown
Member

jmlrt commented Feb 3, 2021

Hi @wouterdegeus,

Since #994, you can create an ingress with empty hosts using the following values:

ingress:
  enabled: true
  annotations:
    cloud.google.com/neg: '{"ingress": true}'
  hosts:
    - host: ''
      paths:
        - path: /

I tested it and had exactly the same ingress generated as using your PR.

Can you confirm this is working for your use case?

@wouterdegeus
Copy link
Copy Markdown
Author

Just tested, this works indeed!

@jmlrt
Copy link
Copy Markdown
Member

jmlrt commented Feb 4, 2021

Just tested, this works indeed!

Awesome 👍
Closing your PR then.

@jmlrt jmlrt closed this Feb 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

elasticsearch enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants