Skip to content

Commit

Permalink
dnsForKubernetesHost
Browse files Browse the repository at this point in the history
  • Loading branch information
pegtrifork committed Jan 8, 2024
1 parent ba670af commit d52a47e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/flink-job/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.10.0
version: 0.10.1

dependencies:
- name: image-automation
Expand Down
3 changes: 2 additions & 1 deletion charts/flink-job/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# flink-job

![Version: 0.10.0](https://img.shields.io/badge/Version-0.10.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 0.10.1](https://img.shields.io/badge/Version-0.10.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A Helm chart for handling Cheetah Data Platform Flink jobs

Expand Down Expand Up @@ -227,6 +227,7 @@ Read more about Flink and highly available job-managers [here](https://nightlies
| ingress.annotations | object | `{}` | Extra Ingress annotations |
| ingress.tlsSecret | string | `""` | Add TLS certificates from an existing secret |
| ingress.selfSigned | bool | `false` | Create a self-signed TLS secret |
| dnsForKubernetesHost | bool | `true` | Whether to set KUBERNETES_SERVICE_HOST=kubernetes.default.svc.cluster.local instead of relying on the kubernetes provided value For use in an environment where egress to kubeAPI is managed via DNS rather than IP addresses |
| localNetworkConfiguration.enabled | bool | `false` | Whether to generate Netic LocalNetworkConfig allowing traffic between job and taskmanager. For use in a deny-all environment |
| image-automation.enabled | bool | `false` | Whether to enable the image-automation subchart. Image-automation is not possible when using image-sha as a tagging strategy. Any other configuration given here, is passed to it |

Expand Down
2 changes: 2 additions & 0 deletions charts/flink-job/ci/full-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ taskManager:
podAnnotations:
task-manager: "true"

kubernetesServiceHost: false

jobManager:
replicas: 1
resource:
Expand Down
7 changes: 7 additions & 0 deletions charts/flink-job/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,10 @@ Set a key=value in a dictionary, if the key is not defined
{{- define "flink-job.nameWithimageHash" -}}
{{ include "flink-job.fullname" . }}{{ (sha256sum (nospace (toString .Values.image))) | trunc 10 }}
{{- end -}}


{{- define "flink-job.dnsForKubernetesHostEnv" -}}
{{- if $.Values.dnsForKubernetesHost -}}
{{ (dict "name" "KUBERNETES_SERVICE_HOST" "value" "kubernetes.default.svc.cluster.local" | toYaml) }}
{{- end }}
{{- end -}}
8 changes: 6 additions & 2 deletions charts/flink-job/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ taskManager:
{{- with (concat .Values.ports .Values.taskManager.ports) }}
{{- toYaml . | nindent 8 -}}
{{- end }}
{{- with (concat .Values.env .Values.taskManager.env) }}
{{- with (compact (concat .Values.env .Values.taskManager.env (list (include "flink-job.dnsForKubernetesHostEnv" . | fromYaml)))) }}
env:
{{- toYaml . | nindent 8 -}}
{{- end }}
Expand Down Expand Up @@ -322,7 +322,7 @@ jobManager:
{{- with (concat .Values.ports .Values.jobManager.ports) }}
{{- toYaml . | nindent 8 -}}
{{- end }}
{{- with (concat .Values.env .Values.jobManager.env) }}
{{- with (compact (concat .Values.env .Values.jobManager.env (list (include "flink-job.dnsForKubernetesHostEnv" . | fromYaml)))) }}
env:
{{- toYaml . | nindent 8 -}}
{{- end }}
Expand Down Expand Up @@ -458,6 +458,10 @@ ingress:
# -- Create a self-signed TLS secret
selfSigned: false

# -- Whether to set KUBERNETES_SERVICE_HOST=kubernetes.default.svc.cluster.local instead of relying on the kubernetes provided value
# For use in an environment where egress to kubeAPI is managed via DNS rather than IP addresses
dnsForKubernetesHost: true

localNetworkConfiguration:
# -- Whether to generate Netic LocalNetworkConfig allowing traffic between job and taskmanager.
# For use in a deny-all environment
Expand Down

0 comments on commit d52a47e

Please sign in to comment.