-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci-helm] Deploy the DSS using Helm (#983)
* [ci] Update the CI to deploy the DSS using the helm chart * Comments
- Loading branch information
Showing
9 changed files
with
138 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,41 @@ | ||
# This module is expected to be applied by the Github CI user. By default, only the user has permission to | ||
# connect to the cluster. This file gathers resources to grant access to AWS administrators. | ||
// This module is expected to be applied by the Github CI user. By default, only the user who created the cluster | ||
// has permission to connect to the cluster. This file gathers resources to grant access to AWS administrators. | ||
|
||
resource "kubernetes_config_map_v1_data" "aws-auth" { | ||
metadata { | ||
name = "aws-auth" | ||
namespace = "kube-system" | ||
} | ||
resource "local_file" "aws-auth-config-map" { | ||
content = yamlencode({ | ||
apiVersion = "v1" | ||
kind = "ConfigMap" | ||
metadata = { | ||
name = "aws-auth" | ||
namespace = "kube-system" | ||
} | ||
data = { | ||
mapRoles = yamlencode([ | ||
{ | ||
groups = [ | ||
"system:bootstrappers", | ||
"system:nodes" | ||
] | ||
rolearn = module.terraform-aws-dss.iam_role_node_group_arn | ||
username = "system:node:{{EC2PrivateDNSName}}" | ||
}, | ||
{ | ||
groups = [ | ||
"system:masters" | ||
] | ||
rolearn = var.aws_iam_administrator_role | ||
username = "interuss-aws-administrator" | ||
}, | ||
{ | ||
groups = [ | ||
"system:masters" | ||
] | ||
rolearn = var.aws_iam_ci_role | ||
username = "interuss-ci" | ||
} | ||
]) | ||
} | ||
}) | ||
|
||
force = true # EKS provisions this file by default. | ||
|
||
data = { | ||
mapRoles = yamlencode([ | ||
{ | ||
groups = [ | ||
"system:bootstrappers", | ||
"system:nodes" | ||
] | ||
rolearn = module.terraform-aws-kubernetes.iam_role_node_group_arn | ||
username = "system:node:{{EC2PrivateDNSName}}" | ||
}, | ||
{ | ||
groups = [ | ||
"system:masters" | ||
] | ||
rolearn = var.aws_iam_administrator_role | ||
username = "interuss-aws-administrator" | ||
}, | ||
{ | ||
groups = [ | ||
"system:masters" | ||
] | ||
rolearn = var.aws_iam_ci_role | ||
username = "interuss-ci" | ||
} | ||
]) | ||
} | ||
filename = "${module.terraform-aws-dss.workspace_location}/aws_auth_config_map.yml" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
output "generated_files_location" { | ||
value = module.terraform-commons-dss.generated_files_location | ||
value = module.terraform-aws-dss.generated_files_location | ||
} | ||
|
||
output "workspace_location" { | ||
value = module.terraform-aws-dss.workspace_location | ||
} | ||
|
||
output "cluster_context" { | ||
value = module.terraform-aws-dss.cluster_context | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,3 @@ | ||
provider "aws" { | ||
region = "us-east-1" | ||
} | ||
|
||
data "aws_eks_cluster_auth" "kubernetes_cluster" { | ||
name = var.cluster_name | ||
depends_on = [module.terraform-aws-kubernetes] | ||
} | ||
|
||
data "aws_eks_cluster" "kubernetes_cluster" { | ||
name = var.cluster_name | ||
depends_on = [module.terraform-aws-kubernetes] | ||
} | ||
|
||
provider kubernetes { | ||
host = data.aws_eks_cluster.kubernetes_cluster.endpoint | ||
cluster_ca_certificate = base64decode(data.aws_eks_cluster.kubernetes_cluster.certificate_authority[0].data) | ||
token = data.aws_eks_cluster_auth.kubernetes_cluster.token | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters