Skip to content
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

Fix to use http resource instead of local-exec for eks health check #321

Merged

Conversation

tei-k
Copy link
Contributor

@tei-k tei-k commented Jul 12, 2021

Description

https://scalar-labs.atlassian.net/browse/DLT-8842

ref: terraform-aws-modules/terraform-aws-eks#1339

Some resources are not deleted when destroy k8s module in terratest.

2021-07-11T15:51:05.4829239Z TestEndToEndK8s 2021-07-11T15:51:05Z command.go:158: module.kubernetes.module.scalardl_apps_pool.aws_eks_node_group.default[0]: Destruction complete after 3m16s
2021-07-11T15:51:05.4873649Z TestEndToEndK8s 2021-07-11T15:51:05Z command.go:158: module.kubernetes.kubernetes_config_map.aws_auth[0]: Destroying... [id=kube-system/aws-auth]
2021-07-11T15:51:05.5824998Z TestEndToEndK8s 2021-07-11T15:51:05Z command.go:158: 
2021-07-11T15:51:05.5842631Z TestEndToEndK8s 2021-07-11T15:51:05Z command.go:158: Error: Unauthorized

Done

Fix to use data resource for health check

Confirm

$ terraform destroy
・・・
module.kubernetes.module.scalardl_apps_pool.aws_eks_node_group.default[0]: Destruction complete after 3m20s
module.kubernetes.kubernetes_config_map.aws_auth[0]: Destroying... [id=kube-system/aws-auth]
module.kubernetes.kubernetes_config_map.aws_auth[0]: Destruction complete after 1s
module.kubernetes.module.scalardl_apps_pool.aws_iam_role.eks_node[0]: Destroying... [id=tei-k8s-x-fch-g-scalardlpool-eks-node]
module.kubernetes.module.default_node_pool.aws_iam_role.eks_node[0]: Destroying... [id=tei-k8s-x-fch-g-default-eks-node]
module.kubernetes.module.scalardl_apps_pool.aws_iam_role.eks_node[0]: Destruction complete after 3s
module.kubernetes.module.default_node_pool.aws_iam_role.eks_node[0]: Destruction complete after 3s
module.kubernetes.aws_eks_cluster.eks_cluster: Destroying... [id=tei-k8s-x-fch-g]
module.kubernetes.aws_eks_cluster.eks_cluster: Still destroying... [id=tei-k8s-x-fch-g, 10s elapsed]
module.kubernetes.aws_eks_cluster.eks_cluster: Still destroying... [id=tei-k8s-x-fch-g, 20s elapsed]                                                                                          module.kubernetes.aws_eks_cluster.eks_cluster: Still destroying... [id=tei-k8s-x-fch-g, 30s elapsed]                                                                                          module.kubernetes.aws_eks_cluster.eks_cluster: Still destroying... [id=tei-k8s-x-fch-g, 40s elapsed]                                                                                          module.kubernetes.aws_eks_cluster.eks_cluster: Still destroying... [id=tei-k8s-x-fch-g, 50s elapsed]                                                                                          module.kubernetes.aws_eks_cluster.eks_cluster: Still destroying... [id=tei-k8s-x-fch-g, 1m0s elapsed]                                                                                         module.kubernetes.aws_eks_cluster.eks_cluster: Still destroying... [id=tei-k8s-x-fch-g, 1m10s elapsed]                                                                                        module.kubernetes.aws_eks_cluster.eks_cluster: Still destroying... [id=tei-k8s-x-fch-g, 1m20s elapsed]                                                                                        module.kubernetes.aws_eks_cluster.eks_cluster: Still destroying... [id=tei-k8s-x-fch-g, 1m30s elapsed]
module.kubernetes.aws_eks_cluster.eks_cluster: Still destroying... [id=tei-k8s-x-fch-g, 1m40s elapsed]
module.kubernetes.aws_eks_cluster.eks_cluster: Still destroying... [id=tei-k8s-x-fch-g, 1m50s elapsed]
module.kubernetes.aws_eks_cluster.eks_cluster: Still destroying... [id=tei-k8s-x-fch-g, 2m0s elapsed]
module.kubernetes.aws_eks_cluster.eks_cluster: Still destroying... [id=tei-k8s-x-fch-g, 2m10s elapsed]
module.kubernetes.aws_eks_cluster.eks_cluster: Still destroying... [id=tei-k8s-x-fch-g, 2m20s elapsed]
module.kubernetes.aws_eks_cluster.eks_cluster: Still destroying... [id=tei-k8s-x-fch-g, 2m30s elapsed]
module.kubernetes.aws_eks_cluster.eks_cluster: Destruction complete after 2m38s
module.kubernetes.aws_iam_role.eks_cluster: Destroying... [id=tei-k8s-x-fch-g-eks-cluster]
module.kubernetes.aws_security_group.eks_cluster: Destroying... [id=sg-0275bdeea590c6bf5]
module.kubernetes.aws_security_group.eks_cluster: Destruction complete after 1s
module.kubernetes.aws_iam_role.eks_cluster: Destruction complete after 3s

Destroy complete! Resources: 24 destroyed.

@tei-k tei-k self-assigned this Jul 12, 2021
@tei-k tei-k added bugfix and removed improvement labels Jul 13, 2021
@tei-k tei-k changed the title Fix to use http instead of local-exec for eks health check Fix to use http resource instead of local-exec for eks health check Jul 13, 2021
@tei-k tei-k marked this pull request as ready for review July 13, 2021 02:04
@tei-k tei-k requested review from feeblefakie and ymorimo July 13, 2021 02:04
Copy link
Collaborator

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@ymorimo ymorimo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@feeblefakie feeblefakie merged commit 23cbb83 into master Jul 13, 2021
@feeblefakie feeblefakie deleted the fix-to-use-http-instead-of-local-exec-for-eks-health-check branch July 13, 2021 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants