Skip to content

Enable conditional rendering for service definitions#856

Merged
robholland merged 3 commits intotemporalio:mainfrom
lake-dunamu:patch-1
Apr 1, 2026
Merged

Enable conditional rendering for service definitions#856
robholland merged 3 commits intotemporalio:mainfrom
lake-dunamu:patch-1

Conversation

@lake-dunamu
Copy link
Copy Markdown
Contributor

What was changed

Added {{- if or (not (hasKey $serviceValues "enabled")) $serviceValues.enabled }} conditional check inside the {{- range }} loop for the non-headless Service block in templates/server-service.yaml.

Why?

The non-headless Service block for frontend and internal-frontend had no enabled check, so Service resources were created regardless of the enabled flag. The headless Service block already uses {{- if $serviceValues.enabled }}. This change makes the non-headless block consistent while using an opt-out pattern — services without an explicit enabled key are rendered by default, and only those with enabled: false are skipped.

Checklist

  • Closes [Bug] server-service.yaml does not respect enabled: false for individual services #855
  • How was this tested:
    • helm template with server.internal-frontend.enabled: false → internal-frontend Service not rendered.
    • helm template with server.internal-frontend.enabled: true → Service rendered as expected.
    • helm template without enabled key set → Service rendered by default (opt-out behavior).
    • Verified other services are unaffected.
  • Any docs updates needed?
    • No.

@lake-dunamu lake-dunamu requested a review from a team as a code owner March 4, 2026 06:30
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 4, 2026

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@lake-dunamu
Copy link
Copy Markdown
Contributor Author

lake-dunamu commented Mar 31, 2026

@robholland could you PTAL?

We need this fix because our security policy requires removing all endpoints for disabled services, and currently the non-headless Service is still created even with enabled: false.

@robholland
Copy link
Copy Markdown
Contributor

Looks good, please add a test to charts/temporal/tests/server_service_test.yaml.

@robholland robholland self-assigned this Apr 1, 2026
@lake-dunamu
Copy link
Copy Markdown
Contributor Author

Looks good, please add a test to charts/temporal/tests/server_service_test.yaml.

@robholland Done. Thanks!

@robholland robholland merged commit dfca6bb into temporalio:main Apr 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] server-service.yaml does not respect enabled: false for individual services

3 participants