Skip to content

Commit

Permalink
Add ability to specify dnsPolicy given type 'ClusterFirstWithHostNet'…
Browse files Browse the repository at this point in the history
… is generally required when utilizing hostNetwork=true which is generally not cluster default

Signed-off-by: Michael Whyte <[email protected]>
  • Loading branch information
whytem committed Jan 22, 2024
1 parent ce2bb47 commit 93c14f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/dapr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ The Helm chart has the follow configuration options that can be supplied:
| `dapr_sidecar_injector.kubeClusterDomain` | Domain for this kubernetes cluster. If not set, will auto-detect the cluster domain through the `/etc/resolv.conf` file `search domains` content. | `cluster.local` |
| `dapr_sidecar_injector.ignoreEntrypointTolerations` | JSON array of Kubernetes tolerations. If pod contains any of these tolerations, it will ignore the Docker image ENTRYPOINT for Dapr sidecar. | `[{\"effect\":\"NoSchedule\",\"key\":\"alibabacloud.com/eci\"},{\"effect\":\"NoSchedule\",\"key\":\"azure.com/aci\"},{\"effect\":\"NoSchedule\",\"key\":\"aws\"},{\"effect\":\"NoSchedule\",\"key\":\"huawei.com/cci\"}]` |
| `dapr_sidecar_injector.hostNetwork` | Enable hostNetwork mode. This is helpful when working with overlay networks such as Calico CNI and admission webhooks fail | `false` |
| `dapr_sidecar_injector.dnsPolicy` | Option to explictly set `dnsPolicy` attribute of Dapr Sidecar Injector Deployment (e.g. `Default`, `ClusterFirst`, `ClusterFirstWithHostNet`, etc.). Helpful to set to `ClusterFirstWithHostNet` when hostNetwork mode is enabled to eliminate DNS resolution issues | `""` |
| `dapr_sidecar_injector.healthzPort` | The port used for health checks. Helpful in combination with hostNetwork to avoid port collisions | `8080` |
| `dapr_sidecar_injector.deploymentAnnotations` | Custom annotations for Dapr Sidecar Injector Deployment | `{}` |
| `dapr_sidecar_injector.service.annotations` | Custom annotations for "dapr-sidecar-injector" Service resource | `{}` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
{{- if .Values.hostNetwork }}
hostNetwork: true
{{- end }}
{{- if .Values.dnsPolicy }}
dnsPolicy: {{ .Values.dnsPolicy }}
{{- end }}
serviceAccountName: dapr-injector
containers:
- name: dapr-sidecar-injector
Expand Down
1 change: 1 addition & 0 deletions charts/dapr/charts/dapr_sidecar_injector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ resources: {}
kubeClusterDomain: cluster.local
ignoreEntrypointTolerations: "[{\\\"effect\\\":\\\"NoSchedule\\\",\\\"key\\\":\\\"alibabacloud.com/eci\\\"},{\\\"effect\\\":\\\"NoSchedule\\\",\\\"key\\\":\\\"azure.com/aci\\\"},{\\\"effect\\\":\\\"NoSchedule\\\",\\\"key\\\":\\\"aws\\\"},{\\\"effect\\\":\\\"NoSchedule\\\",\\\"key\\\":\\\"huawei.com/cci\\\"}]"
hostNetwork: false
dnsPolicy: ""
healthzPort: 8080

livenessProbe:
Expand Down

0 comments on commit 93c14f4

Please sign in to comment.