-
Notifications
You must be signed in to change notification settings - Fork 0
R53 int1 #13
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
base: main
Are you sure you want to change the base?
R53 int1 #13
Changes from all commits
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 |
|---|---|---|
|
|
@@ -52,7 +52,7 @@ spec: | |
| http: | ||
| - name: bookinfo | ||
| port: 80 | ||
| hostname: bookinfo.tse.tetratelabs.io | ||
| hostname: bookinfo.$cluster_name.aws-ce.sandbox.tetrate.io | ||
|
Contributor
Author
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. $cluster_name.$external_dns_aws_dns_zone or similar to it
Contributor
Author
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. what about annotations do we need to use any https://docs.tetrate.io/service-express/integrations/route53#annotations-supported-by-the-route53-controller ? |
||
| routing: | ||
| rules: | ||
| - route: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,9 +33,32 @@ if [[ ${ACTION} = "deploy_load-balancer-controller" ]]; then | |
| cd "../../.." | ||
| fi | ||
|
|
||
| if [[ ${ACTION} = "deploy_external-dns" ]]; then | ||
| if [[ ${ACTION} = "destroy_load-balancer-controller" ]]; then | ||
|
Contributor
Author
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. it should go as a separate PR anyway, the focus is route53 controller |
||
| source ${ROOT_DIR}/k8s_auth.sh refresh | ||
| cd "${ROOT_DIR}/../addons/aws/external-dns" | ||
| cd "${ROOT_DIR}/../addons/aws/load-balancer-controller" | ||
| export AWS_K8S_CLUSTERS=$(echo ${TFVARS} | jq -c ".k8s_clusters.aws") | ||
| export AWS_K8S_CLUSTERS_COUNT=$(echo ${AWS_K8S_CLUSTERS} | jq length) | ||
| for i in $(seq 1 ${AWS_K8S_CLUSTERS_COUNT}); do | ||
| index=$(($i - 1)) | ||
| cluster_name=$(echo $AWS_K8S_CLUSTERS | jq -cr '.['$index'].name') | ||
| region=$(echo $AWS_K8S_CLUSTERS | jq -cr '.['$index'].region') | ||
| k8s_version=$(echo $AWS_K8S_CLUSTERS | jq -cr '.['$index'].version') | ||
| if [[ "$cluster_name" == "null" ]]; then | ||
| cluster_name=$NAME_PREFIX-$index-$region | ||
| fi | ||
| terraform workspace new aws-$index-$region || true | ||
| terraform workspace select aws-$index-$region | ||
| terraform init | ||
| terraform destroy ${TERRAFORM_APPLY_ARGS} -var-file="../../../terraform.tfvars.json" \ | ||
| -var=cluster_id=$index -var=region=$region | ||
| terraform workspace select default | ||
| done | ||
| cd "../../.." | ||
| fi | ||
|
|
||
| if [[ ${ACTION} = "deploy_route53-controller" ]]; then | ||
| source ${ROOT_DIR}/k8s_auth.sh refresh | ||
| cd "${ROOT_DIR}/../addons/aws/route53-controller" | ||
| export AWS_K8S_CLUSTERS=$(echo ${TFVARS} | jq -c ".k8s_clusters.aws") | ||
| export AWS_K8S_CLUSTERS_COUNT=$(echo ${AWS_K8S_CLUSTERS} | jq length) | ||
| for i in $(seq 1 ${AWS_K8S_CLUSTERS_COUNT}); do | ||
|
|
@@ -53,16 +76,16 @@ if [[ ${ACTION} = "deploy_external-dns" ]]; then | |
| terraform init | ||
| terraform apply ${TERRAFORM_APPLY_ARGS} -var-file="../../../terraform.tfvars.json" \ | ||
| -var=cluster_id=$index -var=region=$region -var=external_dns_aws_dns_zone=$external_dns_zone | ||
| terraform output ${TERRAFORM_OUTPUT_ARGS} | jq . >../../../outputs/terraform_outputs/terraform-aws-external-dns-$index-$cluster_name.json | ||
| terraform output ${TERRAFORM_OUTPUT_ARGS} | jq . >../../../outputs/terraform_outputs/terraform-aws-route53-controller-$index-$cluster_name.json | ||
| terraform workspace select default | ||
| fi | ||
| done | ||
| cd "../../.." | ||
| fi | ||
|
|
||
| if [[ ${ACTION} = "destroy_external-dns" ]]; then | ||
| if [[ ${ACTION} = "destroy_route53-controller" ]]; then | ||
| source ${ROOT_DIR}/k8s_auth.sh refresh | ||
| cd "${ROOT_DIR}/../addons/aws/external-dns" | ||
| cd "${ROOT_DIR}/../addons/aws/route53-controller" | ||
| export AWS_K8S_CLUSTERS=$(echo ${TFVARS} | jq -c ".k8s_clusters.aws") | ||
| export AWS_K8S_CLUSTERS_COUNT=$(echo ${AWS_K8S_CLUSTERS} | jq length) | ||
| for i in $(seq 1 ${AWS_K8S_CLUSTERS_COUNT}); do | ||
|
|
@@ -79,7 +102,10 @@ if [[ ${ACTION} = "destroy_external-dns" ]]; then | |
| terraform workspace select aws-$index-$region | ||
| terraform init | ||
| terraform destroy ${TERRAFORM_APPLY_ARGS} -var-file="../../../terraform.tfvars.json" \ | ||
| -var=cluster_id=$index -var=region=$region -var=external_dns_aws_dns_zone=$external_dns_zone | ||
| -var=cluster_id=$index -var=region=$region -var=external_dns_aws_dns_zone=$external_dns_zone -target=module.route53-controller.aws_iam_policy.policy_service_account \ | ||
| -target=module.route53-controller.aws_iam_role.role_service_account -target=module.route53-controller.aws_iam_role_policy_attachment.policy_attachment_service_account \ | ||
| -target=module.route53-controller.kubernetes_service_account.service_account -target=module.route53-controller.local_file.aws_cleanup \ | ||
| -target=module.route53-controller.null_resource.aws_cleanup | ||
| terraform workspace select default | ||
| fi | ||
| done | ||
|
|
||
This file was deleted.
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.
external-dns have to be removed in favour to route53 controller...