Skip to content

feat: Configurable webhook port and hostNetwork in helm - #681

Open
josh-ferrell wants to merge 6 commits into
temporalio:mainfrom
josh-ferrell:feat/twc-host-network-helm-chart
Open

josh-ferrell wants to merge 6 commits into
temporalio:mainfrom
josh-ferrell:feat/twc-host-network-helm-chart

Conversation

@josh-ferrell

Copy link
Copy Markdown

What was changed

This change allows the end-user to

  • run the temporal-worker-controller pod on the node's host network
  • configure the webhook port utilized
  • configure the kube-rbac-proxy port utilized
  • configure the health probe address
  • configure the temporal-worker-controller pod's DNS policy

Why?

In clusters using a custom CNI solution it may be necessary to utilize the host network to allow communication from the k8s API to the temporal worker controller webhook. When using the host network it is necessary to ensure you are using unique ports that are no currently in-use by other services. The configuration of the pod's DNS policy is sometimes necessary as well.

Checklist

  1. Closes [Feature Request] Configure temporal-worker-controller to use hostNetwork #680

  2. How was this tested:

  • Deployed temporal-worker-controller 1.13.0 with patched image to an EKS cluster running Cilium in overlay mode. .metrics.port was set to 10808, .metrics.healthPort was set to 18081, .webhook.port was set to 10809 and .hostNetwork was set to true. A WorkerResourceTemplate creation was attempted and succeeded where it previously failed.
  • Deployed temporal-worker-controller 1.3.0 with patched image to an EKS cluster running aws-vpc-cni with native routing. No changes to .metrics.port, .metrics.healthPort,.webhook.port or .hostNetwork. WorkerResourceTemplate creation, deletion and updates continued to work as expected.
  1. Any docs updates needed?
    I did not see any documentation specific to this on docs.temporal.io. I do not believe a docs update is needed.

@josh-ferrell
josh-ferrell requested review from a team, eniko-dif and jlegrone as code owners October 26, 2026 19:14
@josh-ferrell
josh-ferrell force-pushed the feat/twc-host-network-helm-chart branch from a85b756 to 2acd0dd Compare October 26, 2026 19:15
@CLAassistant

CLAassistant commented Oct 26, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@jaypipes jaypipes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@josh-ferrell nice work on this and thank you! The only thing I believe you need to do is add the enum block to the values.schema.json file (see comment inline). Otherwise, lgtm.

Comment thread cmd/main.go Resolved
Comment thread .github/workflows/helm-validate.yml Resolved
@jaypipes

Copy link
Copy Markdown
Collaborator

@josh-ferrell quick ping on this. did you catch my review comments?

Signed-off-by: Josh Ferrell <josh.ferrell@gmail.com>
Signed-off-by: Josh Ferrell <josh.ferrell@gmail.com>
@josh-ferrell
josh-ferrell force-pushed the feat/twc-host-network-helm-chart branch from e069562 to 7c0f99c Compare November 20, 2026 16:20
@josh-ferrell

Copy link
Copy Markdown
Author

@jaypipes Sorry for the delay on response here. I've addressed all the suggestions. Let me know if this looks ok to you.

@jaypipes jaypipes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice :) Thank you @josh-ferrell

},
"dnsPolicy": {
"description": "`dnsPolicy` determines the manner in which DNS resolution happens in the cluster.\nIn case of `hostNetwork: true`, usually, the `dnsPolicy` is suitable to be `ClusterFirstWithHostNet`.\nFor further reference: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy.",
"type": "string",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@josh-ferrell lol, the linter is complaining that this line should be below the enum:

go run ./hack/helm-values-schema
wrote helm/temporal-worker-controller/values.schema.json
diff --git a/helm/temporal-worker-controller/values.schema.json b/helm/temporal-worker-controller/values.schema.json
index b98b4c0..96b15cd 100644
--- a/helm/temporal-worker-controller/values.schema.json
+++ b/helm/temporal-worker-controller/values.schema.json
@@ -62,12 +62,12 @@
     },
     "dnsPolicy": {
       "description": "`dnsPolicy` determines the manner in which DNS resolution happens in the cluster.\nIn case of `hostNetwork: true`, usually, the `dnsPolicy` is suitable to be `ClusterFirstWithHostNet`.\nFor further reference: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy.",
-      "type": "string",
       "enum": [
         "ClusterFirst",
         "ClusterFirstWithHostNet",
         "Default"
-      ]
+      ],
+      "type": "string"
     },
     "extraEnv": {
       "description": "extraEnv adds Kubernetes EnvVar entries to the manager container. Each entry\nneeds a name and either a literal value or a valueFrom source\n(secretKeyRef / configMapKeyRef). The Go runtime, gRPC (Temporal SDK), and\nnet/http (controller-runtime / client-go) honor standard proxy variables.\n\nUse extraVolumes/extraVolumeMounts together with SSL_CERT_FILE to trust a\nprivate CA. The controller verifies the Temporal server certificate against\nthe system trust store; Go reads SSL_CERT_FILE.\n\nextraEnv:\n  - name: HTTP_PROXY\n    value: \"[http://proxy.corp.example.com:8080\](http://proxy.corp.example.com:8080/)"\n  - name: HTTPS_PROXY\n    value: \"[http://proxy.corp.example.com:8080\](http://proxy.corp.example.com:8080/)"\n  - name: NO_PROXY\n    value: \"localhost,127.0.0.1,.svc,.cluster.local,10.0.0.0/8\"\n  - name: SSL_CERT_FILE\n    value: /etc/ssl/custom-ca/ca.crt\n  - name: API_TOKEN\n    valueFrom:\n      secretKeyRef:\n        name: controller-secrets\n        key: api-token",
Error: Process completed with exit code 1.

Comment thread cmd/main.go Resolved
@jaypipes jaypipes added this to the vNext milestone Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Configure temporal-worker-controller to use hostNetwork

3 participants