-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🎉 Core: Support for IRSA when logging on EKS and passing role to Dest/Source Pods #19010
Changes from all commits
8eae2bb
319536d
59c1a1b
3b83418
5559164
b8be760
a128e7e
a6fbae7
4e438dc
5ba8888
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ data | |
.vscode | ||
**/gmon.out | ||
static_checker_reports/ | ||
bin/ | ||
|
||
# Logs | ||
acceptance_tests_logs/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,10 +56,12 @@ public ProcessFactory checkDockerProcessFactory( | |
public ProcessFactory checkKubernetesProcessFactory( | ||
@Named("checkWorkerConfigs") final WorkerConfigs workerConfigs, | ||
@Value("${airbyte.worker.job.kube.namespace}") final String kubernetesNamespace, | ||
@Value("${airbyte.worker.job.kube.service.account") final String kubernetesServiceAccount, | ||
@Value("${micronaut.server.port}") final Integer serverPort) | ||
throws UnknownHostException { | ||
return createKubernetesProcessFactory(workerConfigs, | ||
kubernetesNamespace, | ||
kubernetesServiceAccount, | ||
serverPort); | ||
} | ||
|
||
|
@@ -88,10 +90,12 @@ public ProcessFactory defaultDockerProcessFactory( | |
public ProcessFactory defaultKubernetesProcessFactory( | ||
@Named("defaultWorkerConfigs") final WorkerConfigs workerConfigs, | ||
@Value("${airbyte.worker.job.kube.namespace}") final String kubernetesNamespace, | ||
@Value("${airbyte.worker.job.kube.service.account") final String kubernetesServiceAccount, | ||
@Value("${micronaut.server.port}") final Integer serverPort) | ||
throws UnknownHostException { | ||
return createKubernetesProcessFactory(workerConfigs, | ||
kubernetesNamespace, | ||
kubernetesServiceAccount, | ||
serverPort); | ||
} | ||
|
||
|
@@ -122,10 +126,12 @@ public ProcessFactory discoverDockerProcessFactory( | |
public ProcessFactory discoverKubernetesProcessFactory( | ||
@Named("discoverWorkerConfigs") final WorkerConfigs workerConfigs, | ||
@Value("${airbyte.worker.job.kube.namespace}") final String kubernetesNamespace, | ||
@Value("${airbyte.worker.job.kube.service.account") final String kubernetesServiceAccount, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This value is missing from the file |
||
@Value("${micronaut.server.port}") final Integer serverPort) | ||
throws UnknownHostException { | ||
return createKubernetesProcessFactory(workerConfigs, | ||
kubernetesNamespace, | ||
kubernetesServiceAccount, | ||
serverPort); | ||
} | ||
|
||
|
@@ -154,10 +160,12 @@ public ProcessFactory replicationDockerProcessFactory( | |
public ProcessFactory replicationKubernetesProcessFactory( | ||
@Named("replicationWorkerConfigs") final WorkerConfigs workerConfigs, | ||
@Value("${airbyte.worker.job.kube.namespace}") final String kubernetesNamespace, | ||
@Value("${airbyte.worker.job.kube.service.account") final String kubernetesServiceAccount, | ||
@Value("${micronaut.server.port}") final Integer serverPort) | ||
throws UnknownHostException { | ||
return createKubernetesProcessFactory(workerConfigs, | ||
kubernetesNamespace, | ||
kubernetesServiceAccount, | ||
serverPort); | ||
} | ||
|
||
|
@@ -188,10 +196,12 @@ public ProcessFactory specDockerProcessFactory( | |
public ProcessFactory specKubernetesProcessFactory( | ||
@Named("specWorkerConfigs") final WorkerConfigs workerConfigs, | ||
@Value("${airbyte.worker.job.kube.namespace}") final String kubernetesNamespace, | ||
@Value("${airbyte.worker.job.kube.service.account") final String kubernetesServiceAccount, | ||
@Value("${micronaut.server.port}") final Integer serverPort) | ||
throws UnknownHostException { | ||
return createKubernetesProcessFactory(workerConfigs, | ||
kubernetesNamespace, | ||
kubernetesServiceAccount, | ||
serverPort); | ||
} | ||
|
||
|
@@ -211,13 +221,15 @@ private ProcessFactory createDockerProcessFactory(final WorkerConfigs workerConf | |
|
||
private ProcessFactory createKubernetesProcessFactory(final WorkerConfigs workerConfigs, | ||
final String kubernetesNamespace, | ||
final String kubernetesServiceAccount, | ||
final Integer serverPort) | ||
throws UnknownHostException { | ||
final KubernetesClient fabricClient = new DefaultKubernetesClient(); | ||
final String localIp = InetAddress.getLocalHost().getHostAddress(); | ||
final String kubeHeartbeatUrl = localIp + ":" + serverPort; | ||
return new KubeProcessFactory(workerConfigs, | ||
kubernetesNamespace, | ||
kubernetesServiceAccount, | ||
fabricClient, | ||
kubeHeartbeatUrl, | ||
false); | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -119,6 +119,8 @@ spec: | |||||
valueFrom: | ||||||
fieldRef: | ||||||
fieldPath: metadata.namespace | ||||||
- name: JOB_KUBE_NAMESPACE | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is probably a typo and should be JOB_KUBE_SERVICE_ACCOUNT right?
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR has been migrated, @mjstel if you can please re-add your suggestion to the new PR so your authorship is preserved: https://github.com/airbytehq/airbyte-platform/pull/177/files#r1120705574 |
||||||
value: "{{ .Values.global.jobs.kube.service_account }}" | ||||||
{{- if $.Values.global.jobs.kube.annotations }} | ||||||
- name: JOB_KUBE_ANNOTATIONS | ||||||
valueFrom: | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a dedicated variable for the orchestrator SA and well as the one added in order to have something like:
.withServiceAccount(isOrchestrator ? orchestratorServiceAccount : serviceAccount)
. If we go that way, we need to make sure that the default value is"airbyte-admin"
.