mirror of
https://github.com/apache/airflow.git
synced 2026-11-04 07:12:48 +00:00
Change default for Service Links for Chart 2.0 (#67803)
* Change default for Service Links for Chart 2.0 * Change default for Service Links for Chart 2.0 * Remove nil handling and helper * Remove none test case
This commit is contained in:
1 parent
33363d5418
commit
d470fe7bfb
22 files changed
+23
-46
No files matched your search
@@ -229,7 +229,7 @@ spec:
|
||||
{{- else }}
|
||||
serviceAccountName: {{ include "worker.serviceAccountName" . }}
|
||||
{{- end }}
|
||||
{{- include "serviceLinks" . | nindent 2 }}
|
||||
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
||||
volumes:
|
||||
{{- if .Values.dags.persistence.enabled }}
|
||||
- name: dags
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
Added support for configuring ``enableServiceLinks``.
|
||||
|
||||
Warning: The default will become ``false`` in ``Chart 2.0``. If you rely on these environment variables, explicitly set ``enableServiceLinks: true``, or migrate your code to use dns based service lookups.
|
||||
@@ -0,0 +1,3 @@
|
||||
Default for ``enableServiceLinks`` changed to false.
|
||||
|
||||
Warning: The default is false in ``Chart 2.0``. If you rely on these environment variables, explicitly set ``enableServiceLinks: true``, or migrate your code to use dns based service lookups.
|
||||
@@ -938,14 +938,6 @@ DEPRECATION WARNING:
|
||||
|
||||
{{- end }}
|
||||
|
||||
{{- if (eq .Values.enableServiceLinks nil) }}
|
||||
|
||||
DEPRECATION WARNING:
|
||||
The default for `enableServiceLinks` will become False in Chart 2.0.
|
||||
If you relied on these environment variables, explicitly set ``enableServiceLinks: true``, or migrate your code to use dns based service lookups.
|
||||
|
||||
{{- end }}
|
||||
|
||||
{{- if not (or .Values.apiSecretKey .Values.apiSecretKeySecretName) }}
|
||||
#####################################################
|
||||
# WARNING: You should set a static API secret key #
|
||||
|
||||
@@ -1204,15 +1204,3 @@ Usage:
|
||||
path: namespace
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Set service links if not null.
|
||||
|
||||
Usage:
|
||||
{{ include "serviceLinks" . }}
|
||||
*/}}
|
||||
{{- define "serviceLinks" -}}
|
||||
{{- if not (eq .Values.enableServiceLinks nil) -}}
|
||||
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -106,7 +106,7 @@ spec:
|
||||
hostAliases: {{- toYaml .Values.apiServer.hostAliases | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "apiServer.serviceAccountName" . }}
|
||||
{{- include "serviceLinks" . | nindent 6 }}
|
||||
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
||||
{{- if .Values.apiServer.priorityClassName }}
|
||||
priorityClassName: {{ .Values.apiServer.priorityClassName }}
|
||||
{{- end }}
|
||||
|
||||
@@ -86,7 +86,7 @@ spec:
|
||||
tolerations: {{- toYaml $tolerations | nindent 12 }}
|
||||
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 12 }}
|
||||
serviceAccountName: {{ include "cleanup.serviceAccountName" . }}
|
||||
{{- include "serviceLinks" . | nindent 10 }}
|
||||
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
||||
imagePullSecrets: {{- include "image_pull_secrets" . | nindent 12 }}
|
||||
securityContext: {{ $securityContext | nindent 12 }}
|
||||
containers:
|
||||
|
||||
@@ -110,7 +110,7 @@ spec:
|
||||
terminationGracePeriodSeconds: {{ .Values.dagProcessor.terminationGracePeriodSeconds }}
|
||||
restartPolicy: Always
|
||||
serviceAccountName: {{ include "dagProcessor.serviceAccountName" . }}
|
||||
{{- include "serviceLinks" . | nindent 6 }}
|
||||
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
||||
securityContext: {{ $securityContext | nindent 8 }}
|
||||
imagePullSecrets: {{ include "image_pull_secrets" . | nindent 8 }}
|
||||
initContainers:
|
||||
|
||||
@@ -89,7 +89,7 @@ spec:
|
||||
tolerations: {{- toYaml $tolerations | nindent 12 }}
|
||||
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 12 }}
|
||||
serviceAccountName: {{ include "databaseCleanup.serviceAccountName" . }}
|
||||
{{- include "serviceLinks" . | nindent 10 }}
|
||||
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
||||
imagePullSecrets: {{- include "image_pull_secrets" . | nindent 12 }}
|
||||
securityContext: {{ $securityContext | nindent 12 }}
|
||||
containers:
|
||||
|
||||
@@ -79,7 +79,7 @@ spec:
|
||||
tolerations: {{- toYaml $tolerations | nindent 8 }}
|
||||
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 8 }}
|
||||
serviceAccountName: {{ include "flower.serviceAccountName" . }}
|
||||
{{- include "serviceLinks" . | nindent 6 }}
|
||||
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
||||
{{- if .Values.flower.priorityClassName }}
|
||||
priorityClassName: {{ .Values.flower.priorityClassName }}
|
||||
{{- end }}
|
||||
|
||||
@@ -86,7 +86,7 @@ spec:
|
||||
tolerations: {{- toYaml $tolerations | nindent 8 }}
|
||||
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 8 }}
|
||||
serviceAccountName: {{ include "createUserJob.serviceAccountName" . }}
|
||||
{{- include "serviceLinks" . | nindent 6 }}
|
||||
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
||||
imagePullSecrets: {{- include "image_pull_secrets" . | nindent 8 }}
|
||||
{{- if .Values.createUserJob.extraInitContainers }}
|
||||
initContainers:
|
||||
|
||||
@@ -86,7 +86,7 @@ spec:
|
||||
tolerations: {{- toYaml $tolerations | nindent 8 }}
|
||||
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 8 }}
|
||||
serviceAccountName: {{ include "migrateDatabaseJob.serviceAccountName" . }}
|
||||
{{- include "serviceLinks" . | nindent 6 }}
|
||||
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
||||
imagePullSecrets: {{- include "image_pull_secrets" . | nindent 8 }}
|
||||
{{- if .Values.migrateDatabaseJob.extraInitContainers }}
|
||||
initContainers:
|
||||
|
||||
@@ -73,7 +73,7 @@ spec:
|
||||
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 8 }}
|
||||
terminationGracePeriodSeconds: {{ .Values.otelCollector.terminationGracePeriodSeconds }}
|
||||
serviceAccountName: {{ include "otelCollector.serviceAccountName" . }}
|
||||
{{- include "serviceLinks" . | nindent 6 }}
|
||||
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
||||
{{- if .Values.otelCollector.priorityClassName }}
|
||||
priorityClassName: {{ .Values.otelCollector.priorityClassName }}
|
||||
{{- end }}
|
||||
|
||||
@@ -88,7 +88,7 @@ spec:
|
||||
tolerations: {{- toYaml $tolerations | nindent 8 }}
|
||||
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 8 }}
|
||||
serviceAccountName: {{ include "pgbouncer.serviceAccountName" . }}
|
||||
{{- include "serviceLinks" . | nindent 6 }}
|
||||
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
||||
securityContext: {{ $securityContext | nindent 8 }}
|
||||
restartPolicy: Always
|
||||
imagePullSecrets: {{- include "image_pull_secrets" . | nindent 8 }}
|
||||
|
||||
@@ -83,7 +83,7 @@ spec:
|
||||
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 8 }}
|
||||
terminationGracePeriodSeconds: {{ .Values.redis.terminationGracePeriodSeconds }}
|
||||
serviceAccountName: {{ include "redis.serviceAccountName" . }}
|
||||
{{- include "serviceLinks" . | nindent 6 }}
|
||||
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
||||
{{- if .Values.schedulerName }}
|
||||
schedulerName: {{ .Values.schedulerName }}
|
||||
{{- end }}
|
||||
|
||||
@@ -133,7 +133,7 @@ spec:
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: {{ .Values.scheduler.terminationGracePeriodSeconds }}
|
||||
serviceAccountName: {{ include "scheduler.serviceAccountName" . }}
|
||||
{{- include "serviceLinks" . | nindent 6 }}
|
||||
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
||||
{{- if and (eq (include "airflow.podLaunchingExecutor" .) "true") (not .Values.scheduler.serviceAccount.automountServiceAccountToken) }}
|
||||
automountServiceAccountToken: false
|
||||
{{- end }}
|
||||
|
||||
@@ -84,7 +84,7 @@ spec:
|
||||
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 8 }}
|
||||
terminationGracePeriodSeconds: {{ .Values.statsd.terminationGracePeriodSeconds }}
|
||||
serviceAccountName: {{ include "statsd.serviceAccountName" . }}
|
||||
{{- include "serviceLinks" . | nindent 6 }}
|
||||
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
||||
securityContext: {{ $securityContext | nindent 8 }}
|
||||
restartPolicy: Always
|
||||
imagePullSecrets: {{ include "image_pull_secrets" . | nindent 8 }}
|
||||
|
||||
@@ -127,7 +127,7 @@ spec:
|
||||
terminationGracePeriodSeconds: {{ .Values.triggerer.terminationGracePeriodSeconds }}
|
||||
restartPolicy: Always
|
||||
serviceAccountName: {{ include "triggerer.serviceAccountName" . }}
|
||||
{{- include "serviceLinks" . | nindent 6 }}
|
||||
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
||||
securityContext: {{ $securityContext | nindent 8 }}
|
||||
imagePullSecrets: {{ include "image_pull_secrets" . | nindent 8 }}
|
||||
initContainers:
|
||||
|
||||
@@ -157,7 +157,7 @@ spec:
|
||||
terminationGracePeriodSeconds: {{ .Values.workers.terminationGracePeriodSeconds }}
|
||||
restartPolicy: Always
|
||||
serviceAccountName: {{ include "worker.serviceAccountName" . }}
|
||||
{{- include "serviceLinks" . | nindent 6 }}
|
||||
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
||||
securityContext: {{ $securityContext | nindent 8 }}
|
||||
imagePullSecrets: {{ include "image_pull_secrets" . | nindent 8 }}
|
||||
initContainers:
|
||||
|
||||
@@ -527,7 +527,7 @@ class TestAirflowCommon:
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"enable_service_links",
|
||||
[None, True, False],
|
||||
[True, False],
|
||||
)
|
||||
def test_service_links(
|
||||
self,
|
||||
|
||||
@@ -227,12 +227,9 @@
|
||||
}
|
||||
},
|
||||
"enableServiceLinks": {
|
||||
"description": "Enable Kubernetes service links. The default will become false in Chart 2.0.",
|
||||
"type": [
|
||||
"boolean",
|
||||
"null"
|
||||
],
|
||||
"default": null,
|
||||
"description": "Enable Kubernetes service links. The default is false in Chart 2.0.",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"x-docsSection": "Kubernetes"
|
||||
},
|
||||
"imagePullSecrets": {
|
||||
|
||||
+1
-1
@@ -137,7 +137,7 @@ schedulerName: ~
|
||||
# Add common labels to all objects and pods defined in this chart.
|
||||
labels: {}
|
||||
# Whenever service links should be added to each pod.
|
||||
enableServiceLinks: ~
|
||||
enableServiceLinks: false
|
||||
|
||||
# List of existing Kubernetes secrets containing Base64 encoded credentials to connect to private
|
||||
# registries. Items can be either strings or {name: secret} objects.
|
||||
|
||||
Reference in new issue
Block a user