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

Remove .Values.service check before setting serviceName #512

Closed
wants to merge 3 commits into from
Closed

Remove .Values.service check before setting serviceName #512

wants to merge 3 commits into from

Conversation

tweedge
Copy link

@tweedge tweedge commented Mar 9, 2020

It appears that {{-if .Values.service }} is evaluating falsely here, preventing a required value in Helm 3 from being set (serviceName), and making this change resolves #497 without any other modifications to the template. Other StatefulSet definitions that are known to work (at a basic level) with Helm 3, such as elasticsearch/templates/statefulset.yaml#L16, do not implement this check.

It seems that making this change allows for additional Helm 3 compatibility without breaking anything in Helm 2, though correct me if I'm wrong there - I don't have anything running Helm 2.

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

^ Checked off all of the above as this change impacts none of them.

Increases Helm 3 compatibility, in line with other StatefulSet definitions that are known to work (at a basic level) with Helm 3, such as helm-charts/elasticsearch/templates/statefulset.yaml#L16
@elasticmachine
Copy link
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?

@cla-checker-service
Copy link

cla-checker-service bot commented Mar 9, 2020

💚 CLA has been signed

@tweedge
Copy link
Author

tweedge commented Mar 9, 2020

Just signed the Contributor Agreement.

@jmlrt
Copy link
Member

jmlrt commented Mar 9, 2020

cla/check

@jmlrt
Copy link
Member

jmlrt commented Mar 9, 2020

jenkins test this please

Copy link
Member

@jmlrt jmlrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tweedge, thanks for this PR.

template-testing is failing.

Can you update Logstash tests?

@tweedge
Copy link
Author

tweedge commented Mar 9, 2020

Looking - thanks!

@tweedge
Copy link
Author

tweedge commented Mar 9, 2020

Updated test & checked that no other serviceName checks are performed. I'm not entirely sure why this check was present, so I'm interested to see if Helm 2 functional testing works 100% as expected.

@jmlrt
Copy link
Member

jmlrt commented Mar 9, 2020

jenkins test this please

@tweedge
Copy link
Author

tweedge commented Mar 9, 2020

Looks like no dice on Logstash + ES 6, per Jenkins. Though this is for Logstash + ES 7, so I don't know if that's acceptable or not.

@tweedge tweedge requested a review from jmlrt March 9, 2020 21:10
@jmlrt
Copy link
Member

jmlrt commented Mar 11, 2020

@tweedge Logstash 6 test is failing for some strange reason (hostname is helm-logstash-six-logstash-0.svc.cluster.local with you PR while it is helm-logstash-six-logstash-0 without your PR).

Note that with this change, Service is no more optional as we shouldn't have a serviceName in StatefulSet without a Service.

Can you update Service and the related doc, tests and values to make it mandatory?

We'll see if that fix the strange Logstash 6 behavior.

@jmlrt
Copy link
Member

jmlrt commented Mar 18, 2020

jenkins test this please

@jmlrt jmlrt added enhancement New feature or request project:helm3 labels Mar 19, 2020
@aidan-melen
Copy link

Thanks for working on this. Any updates on the last test?

@botelastic
Copy link

botelastic bot commented Jun 25, 2020

This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. To track this PR (even if closed), please open a corresponding issue if one does not already exist.

@jmlrt
Copy link
Member

jmlrt commented Jun 29, 2020

Hi @tweedge, @aidan-melen,
After deeper investigation, having an headless service is mandatory for statefulsets.
I created #695 to handle it and should merge it soon. This will replace this PR and fix #497.

I'm closing this one. Thanks for your help 👍

@jmlrt jmlrt closed this Jun 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install fails with immediate error
4 participants