Skip to content

Commit

Permalink
🔧 Update MWAA's Kubernetes configuration (#4497)
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Woffenden <jacob.woffenden@digital.justice.gov.uk>
  • Loading branch information
Jacob Woffenden authored Jun 10, 2024
1 parent c9beeb2 commit 2104fd7
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 100 deletions.
Original file line number Diff line number Diff line change
@@ -1,46 +1,79 @@
{
"clusters": [
{
"cluster": {
"server": "https://59429428EBABBB9F911A173D7B8E8179.gr7.eu-west-1.eks.amazonaws.com",
"certificate-authority-data": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM1ekNDQWMrZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJeU1ETXlNakU0TkRReE4xb1hEVE15TURNeE9URTRORFF4TjFvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTXhPCnl2aE1wZjRZSjM1aGZaOHNlVXMwMzR2ckJVa25weGdDNGJHVnU5dTMwejdXSysyb2k5VFV2WjVoSzF4VitCcUoKQndSUFlwVkgwUHJQUjBYZUJpS3ZrTTNuN0plSG8rWXoxZXl1OWJXeGhmbHhqb25Xb1FMTlBGNEVkUWcyR3dIMQpwbEwyNmwyZ0s0VzVYcERRZVNJV1VsUVFmbWE2NW4zd0dlbGttdUpySzJqMkJEZEFCK2pMRGZzV2oxSGlyTlBBCkdlOGpRam9zRWF5bUVWQTQ4d3U4UExQNUZCempnR2VNd2xaLzNWWER5YVNaM3pGeDhIdFhBNUtHNHM3Rk5OMEkKaWFPbTFNc1g0TWNxS1BFQU1XbDR1RUN2aTl5Q2dXbUtERU5BVk9HTFVvTGc0c28yZVRoL3MweUJJV0svdG0yVQpnbTVLam5MbFBrYmRER25VM0NFQ0F3RUFBYU5DTUVBd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0hRWURWUjBPQkJZRUZJSk1VbUNUS2ptb0huMy90dk1OMmtsZUUvS25NQTBHQ1NxR1NJYjMKRFFFQkN3VUFBNElCQVFCekxFQ09NeWxZamg0ejBuOWpGOThEUGhoanBpejJPTVFxcG1aQndNV29UTFVDWmRGSApKWWpDQnB6R3ROQ1RxZDNnUHlQQ1lKdmt6bzhxR0hYcVVBTjJIRmx4STgzRHA5WFhMSExQVitqYWRQSWhmaXhICnFTQktITzBNSy8yTVprOVF6c2NFSnMzdk1kSmJxZHgvWWd3MHJXdE5LSG1oWExvYkpqK1BoTzZRY2ZXRysrTWkKTmE2M28zZkQzREtKOEZyRmtVcFlFQk00Vm1lNExrSThBVitFNXBVUGxnMGlCZHd3THhVM0F2LzRGcmNmd1U5cQpMZmlwbUlyS2owZGd0b1ovbW10WWJyLzY5UEtrbSt3VWdzSjBPN2g5bm9GdTE4N1ZNZ2U3ckk1aEZ1Q3NWS3NYCjZ1WEpET0tqVDEwVnpJcmJsblZqK05XeVpRM3lvNDkwV084NAotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=="
},
"name": "kubernetes"
}
],
"current-context": "aws",
"kind": "Config",
"contexts": [
{
"context": {
"cluster": "kubernetes",
"user": "aws"
},
"name": "aws"
}
],
"users": [
{
"user": {
"exec": {
"env": [
{
"value": "{\"apiVersion\": \"client.authentication.k8s.io/v1beta1\"}",
"name": "KUBERNETES_EXEC_INFO"
}
],
"args": [
"eks",
"get-token",
"--cluster-name",
"airflow-dev"
],
"apiVersion": "client.authentication.k8s.io/v1beta1",
"command": "aws"
}
},
"name": "aws"
}
],
"apiVersion": "v1"
}
---
apiVersion: v1
kind: Config
preferences: {}

current-context: aws

clusters:
- name: airflow-dev
cluster:
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM1ekNDQ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vWWd3MHJXdE5LSG1oWExvYkpqK1BoTzZRY2ZXRysrTWkKTmE2M28zZkQzREtKOEZyRmtVcFlFQk00Vm1lNExrSThBVitFNXBVUGxnMGlCZHd3THhVM0F2LzRGcmNmd1U5cQpMZmlwbUlyS2owZGd0b1ovbW10WWJyLzY5UEtrbSt3VWdzSjBPN2g5bm9GdTE4N1ZNZ2U3ckk1aEZ1Q3NWS3NYCjZ1WEpET0tqVDEwVnpJcmJsblZqK05XeVpRM3lvNDkwV084NAotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
server: https://59429428EBABBB9F911A173D7B8E8179.gr7.eu-west-1.eks.amazonaws.com

- name: analytical-platform-compute-development
cluster:
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURCVENDQWUyZ0F3SUJBZ0lJUmx2QVNELzBvaHd3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TkRBMU1UTXhNVFUxTVRCYUZ3MHpOREExTVRFeE1qQXdNVEJhTUJVeApFekFSQmdOVkJBTVRDbXQxWW1WeWJtVjBaWE13Z2dFaU1BMEdDU3FHU0liM0RRRUJBUVVBQTRJQkR3QXdnZ0VLCkFvSUJBUUN5T2FqMlljdTFkQTVjRU5XbWo3b3oxY1k5bFBCNVpLMU8vZHF4QVlHSzRYYnZRR3p4VC9xdU1sRy8KVnJUS1k0dWdMdTUreWdQZ253WWcraGcwSms4ZHIrWnkxWUVQQnRITklwOXowSTNOcyt2NlF6WVlXUHBhMkE3Twp0YXdSdTNmSUs5S1EzY09QQmRzZXpTZld1QXpqVmZaYi9yd0ZBdjk4aExGbzJqNG9SaSs4OUYvRU9NUFFLS1lCClkwYnYyeGVjWk01S0NHSTVudEVZSkxFUXBhLzgrMWxlcW1tMERWSjk5b0EwcCt6N3BKOGxyUm9vejVkVS9XbUIKMGRiVzNQWDNJR3hvVC85UnFDMkZ4YjZDZURqOXZQTE5CaDV0RVowclUxUjU4cTZVV05oMTRKNlhxRlNOY2l6SApsYVp0aFE1VldmbDc0SmNoUnoweUY4UUFITlNMQWdNQkFBR2pXVEJYTUE0R0ExVWREd0VCL3dRRUF3SUNwREFQCkJnTlZIUk1CQWY4RUJUQURBUUgvTUIwR0ExVWREZ1FXQkJRU3htM1VyZXRDaGREVGZnUng0QmNHSTBKQjN6QVYKQmdOVkhSRUVEakFNZ2dwcmRXSmxjbTVsZEdWek1BMEdDU3FHU0liM0RRRUJDd1VBQTRJQkFRQlRyV3QweUpXQQpjeGZFUkhzZ1BnZGUvdjhNdHQrU2lzUWRYSGdnamFUT25VMWlKVCtWbEhzKy8rU25HUmJpT0d0TEFxR1JkaXZyClBOOWx2QitvVm02Tk52eXhUQ1ltZVpwcnF1VTU3MWJHQjliY0h4SFFXTEt6cEpwMlNxR0ZJamZkOHhXdFBuREUKa3h4Vk8vSzVubFNnUXVIaHRlbDR0SElNRVBndHp2bDJ1NVF2Q0Vod1cwNzhqQiszeWo0YjZjV1hJUU1uUm0ydgpkajdLZTJ0eXhBd2JOMkFlbTN4NGVicllUWVlMNjBLVUVwblZWZ1RLeWxVcjhXd2k4ZXNpc0ZqaW4rUW96Tit1CmdHZ0pQVjc4NzRTRjhGajhWWEN2VFdEdkhRekRZZGkwcDZjb0ZsS254V0dOL00vdHA2ZHEzOFhHdmt2L2F1VjIKV05scDJ3NDFZemlGCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
server: https://1972AFFBD0701A0D1FD291E34F7D1287.gr7.eu-west-2.eks.amazonaws.com

- name: analytical-platform-compute-test
cluster:
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURCVENDQWUyZ0F3SUJBZ0lJUTUwdTVGL2hLbkF3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TkRBMU1UTXhNVFUwTkRoY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SUxud3NMKytuTEhGNgpjOU56a3B4SFVvZ2NvOUNha3V3bXJQUEFWK1BYQTJxZFlpeUUzclpZQVQzdXdrVEVFVGI2K1NybFp3NmFNd3FRCjlub1R0S0Z1Sjg2UGRxcUsrd09hRHpqYXZVMlhoQmZ6WjY1OGVDVmwwWDVJVkN0TTBRT1pHWFFaL01NVGFPZmMKeVYrWUowb2lZSXI3Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
server: https://9FAFCA50C4DA68A8E75FD21EA53A4F2B.sk1.eu-west-2.eks.amazonaws.com

users:
- name: airflow-dev
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
command: aws
args:
- "eks"
- "get-token"
- "--cluster-name"
- "airflow-dev"
- "--region"
- "eu-west-1"

- name: analytical-platform-compute-development
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
command: aws
args:
- "eks"
- "get-token"
- "--cluster-name"
- "analytical-platform-compute-development"
- "--region"
- "eu-west-2"

- name: analytical-platform-compute-test
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
command: aws
args:
- "eks"
- "get-token"
- "--cluster-name"
- "analytical-platform-compute-test"
- "--region"
- "eu-west-2"

contexts:
- name: aws # `cluster_context="aws"` is used within DAGs
context:
cluster: airflow-dev
user: airflow-dev

- name: analytical-platform-compute-development
context:
cluster: analytical-platform-compute-development
user: analytical-platform-compute-development

- name: analytical-platform-compute-test
context:
cluster: analytical-platform-compute-test
user: analytical-platform-compute-test

Original file line number Diff line number Diff line change
@@ -1,46 +1,56 @@
{
"clusters": [
{
"cluster": {
"server": "https://FC3F7A88508676A30DCAFE7B2619B544.gr7.eu-west-1.eks.amazonaws.com",
"certificate-authority-data": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM1ekNDQWMrZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJeU1ETXlNVEUzT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oZUNScms1M25HdmFBdwoyREt2VHo5VnlpejBrY0tMaXpvZDBrb1pnL0k1eHV0Z3lndXBMYkZSd1NONzYxSmxGSloraDhHNTN3cmNCR3pQCjdrbFU1WjJqUVNlU0FPa0EvT3pTc0xUaVE0MEtxS2R1WXAyTQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=="
},
"name": "kubernetes"
}
],
"contexts": [
{
"context": {
"cluster": "kubernetes",
"user": "aws"
},
"name": "aws"
}
],
"current-context": "aws",
"kind": "Config",
"apiVersion": "v1",
"users": [
{
"user": {
"exec": {
"env": [
{
"value": "{\"apiVersion\": \"client.authentication.k8s.io/v1beta1\"}",
"name": "KUBERNETES_EXEC_INFO"
}
],
"args": [
"eks",
"get-token",
"--cluster-name",
"airflow-prod"
],
"apiVersion": "client.authentication.k8s.io/v1beta1",
"command": "aws"
}
},
"name": "aws"
}
]
}
---
apiVersion: v1
kind: Config
preferences: {}

current-context: aws

clusters:
- name: airflow-prod
cluster:
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM1ekNDQWMrZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJeU1ETXlNVEUzTXpBeU5Wb1hEVE15TURNeE9ERTNNekF5TlZvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBS1RUCmZpdERrdDU1cDdaakpPV0Z5aTlvM2JjVWZTMDFMdVdoamJXSWZmYVBTcGRCVWdFcUxUc2NSZ3oxVTU1aG1ucnoKODFWbnVmSjg2NTZvRm45ZXl2UHRQblZvU2d6ODBhcU45VFdiRXNuWGVCaTlhUWRPbFdhQ25tK2ZMd0FFSmJlKwo0N3U3WW1ITjlITlNaYURtQS9XdFhSc3M5OFVaVUxadi9ZTngzaXhnK0NWSWNSay9tUFVVVDU2cmxYK25KSDQ0CmQveGxPTWhObGtBdVVobmJqNGMzSXhFd1p3eXdXeVNpaWVObkU2TVlOekZzbi8wMU9yU0J3RG9VWGhielhJZGkKVndGUFhaK084T3hlS3VGMnpsTVlCU0RESWhPNm12Z0drSDhWalVVZTYraXlNTWVhMFBnL0lXMXVGdzB1bHpUNwpGWStzZDQ3Wk53MTdOcjVTSWVzQ0F3RUFBYU5DTUVBd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0hRWURWUjBPQkJZRUZNWXNlcGFDekVqa21QUndWM3hTNlliNEkzczhNQTBHQ1NxR1NJYjMKRFFFQkN3VUFBNElCQVFBajRlYi83SUMxUlNRWkNqenBhNnJFSWhUYlpsMXE4NitzL0tnR0FIbXYrZVZCamc0RgowZWJHUEVzZ3NRTDlpSmdnN1I1LzUvN2tVbmZDVVpFSVpLQ2RacFR0akduVzRucXFIUHcyaEU1czdEQUpSRHJZCnA2UkU2NzlSOUVMVTNoSmU1b0tROWR1bmttMjlQbVdpaG15WWs2akhYM010VjgvVjFkR3JPeU44a2FHc1pJY0YKZG8za280U2dGUk9Wd1dxaTdMQkhsVlMzTTA1Nmt0clJnY3R0TmQvUFA5UjRSb2crVjVoZUNScms1M25HdmFBdwoyREt2VHo5VnlpejBrY0tMaXpvZDBrb1pnL0k1eHV0Z3lndXBMYkZSd1NONzYxSmxGSloraDhHNTN3cmNCR3pQCjdrbFU1WjJqUVNlU0FPa0EvT3pTc0xUaVE0MEtxS2R1WXAyTQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
server: https://FC3F7A88508676A30DCAFE7B2619B544.gr7.eu-west-1.eks.amazonaws.com

- name: analytical-platform-compute-production
cluster:
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURCVENDQWUyZ0F3SUJBZ0lJSE9JT2lBSHBzYk13RFFZSktvWklodmN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CtlTFUKTHV4RHVZMkRSeFBoRWJHR0xzVFkyNlJZaHd6WXRJRTg1UEVoTUZWQjhtVEw5VEZoZ01nTyswSStIT21YRCtKcwpUcElNczYveFdIbkYzNkpxUk9vNlhNYnh6WGk1czJ3TG5XTFJvcFliVkhmNzZpdkZ1N2dLUzZwR2ZGYk5LSkRrCmhJa1JkSldSNFRhSkkwem05VG9GU3RqcFNzUWN2T1hsSjBTdHliL3dmRWpMemZpZ3g1N0JsQVNxdHRVY25lUzgKeEIybVVKUTFUT0dLCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
server: https://801920EDEF91E3CAB03E04C03A2DE2BB.yl4.eu-west-2.eks.amazonaws.com

users:
- name: airflow-prod
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
command: aws
args:
- "eks"
- "get-token"
- "--cluster-name"
- "airflow-prod"
- "--region"
- "eu-west-1"

- name: analytical-platform-compute-production
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
command: aws
args:
- "eks"
- "get-token"
- "--cluster-name"
- "analytical-platform-compute-production"
- "--region"
- "eu-west-2"

contexts:
- name: aws # `cluster_context="aws"` is used within DAGs
context:
cluster: airflow-prod
user: airflow-prod

- name: analytical-platform-compute-production
context:
cluster: analytical-platform-compute-production
user: analytical-platform-compute-production

Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,14 @@ data "aws_iam_policy_document" "airflow_dev_execution_role_policy" {
}
}
statement {
sid = ""
effect = "Allow"
actions = ["eks:DescribeCluster"]
resources = ["arn:aws:eks:eu-west-1:${var.account_ids["analytical-platform-data-production"]}:cluster/airflow-dev"]
sid = ""
effect = "Allow"
actions = ["eks:DescribeCluster"]
resources = [
"arn:aws:eks:eu-west-1:${var.account_ids["analytical-platform-data-production"]}:cluster/airflow-dev",
"arn:aws:eks:eu-west-2:${var.account_ids["analytical-platform-compute-development"]}:cluster/analytical-platform-compute-development",
"arn:aws:eks:eu-west-2:${var.account_ids["analytical-platform-compute-test"]}:cluster/analytical-platform-compute-test"
]
}
}

Expand Down Expand Up @@ -394,10 +398,13 @@ data "aws_iam_policy_document" "airflow_prod_execution_role_policy" {
}
}
statement {
sid = ""
effect = "Allow"
actions = ["eks:DescribeCluster"]
resources = ["arn:aws:eks:eu-west-1:${var.account_ids["analytical-platform-data-production"]}:cluster/airflow-prod"]
sid = ""
effect = "Allow"
actions = ["eks:DescribeCluster"]
resources = [
"arn:aws:eks:eu-west-1:${var.account_ids["analytical-platform-data-production"]}:cluster/airflow-prod",
"arn:aws:eks:eu-west-2:${var.account_ids["analytical-platform-compute-production"]}:cluster/analytical-platform-compute-production"
]
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
##################################################

account_ids = {
analytical-platform-compute-development = "381491960855"
analytical-platform-compute-production = "992382429243"
analytical-platform-compute-test = "767397661611"
analytical-platform-data-production = "593291632749"
analytical-platform-development = "525294151996"
analytical-platform-management-production = "042130406152"
Expand Down

0 comments on commit 2104fd7

Please sign in to comment.