-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modifications for keycloak and gatekeeper OIDC
- Loading branch information
Showing
9 changed files
with
254 additions
and
29 deletions.
There are no files selected for viewing
23 changes: 15 additions & 8 deletions
23
lab/development/us-gov-east-1/vpc/platform-test-z/cluster.hcl
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,21 +1,28 @@ | ||
| # lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/cluster.hcl | ||
|
|
||
| # Set cluster specific variables. These are automatically pulled in to configure the remote state bucket in the root | ||
| # terragrunt.hcl configuration. | ||
| locals { | ||
| # Cluster specific configuration | ||
| cluster_endpoint_public_access = true | ||
| cluster_name = "platform-test-z" | ||
| created_reason = "Terragrunt Development for CICD Delivered EKS Platform" | ||
| creator = "luther.coleman.mcginty@census.gov" | ||
| cluster_mailing_list = "luther.coleman.mcginty@census.gov" | ||
| eks_instance_disk_size = 100 | ||
| eks_ng_desired_size = 3 | ||
| eks_ng_max_size = 10 | ||
| eks_ng_min_size = 1 | ||
| enable_cluster_creator_admin_permissions = true | ||
| terraform = true | ||
| terragrunt = true | ||
| tags = { | ||
| "slim:schedule" = "8:00-17:00" | ||
| "cluster:size" = "min:${local.eks_ng_min_size}-max:${local.eks_ng_max_size}-desired:${local.eks_ng_desired_size}" | ||
| } | ||
|
|
||
| # Common configuration | ||
| common_retry_args = { | ||
| commands = get_terraform_commands_that_need_locking() | ||
| arguments = ["-lock-timeout=20m"] | ||
| } | ||
|
|
||
| common_dependencies = ["../eks", "../eks-config"] | ||
|
|
||
| common_mock_eks = { | ||
| cluster_name = "mock-cluster" | ||
| oidc_provider_arn = "arn:aws-us-gov:iam::123456789012:oidc-provider/mock" | ||
| } | ||
| } |
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
81 changes: 81 additions & 0 deletions
81
lab/development/us-gov-east-1/vpc/platform-test-z/eks-gogatekeeper/terragrunt.hcl.disable
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 |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| include "root" { | ||
| path = find_in_parent_folders("root.hcl") | ||
| merge_strategy = "deep" | ||
| expose = true | ||
| } | ||
|
|
||
| terraform { | ||
| # source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-gogatekeeper.git?ref=${include.root.inputs.release_version}" | ||
| source = "../../../../../../../tfmod-gogatekeeper" | ||
| extra_arguments "retry_lock" { | ||
| commands = get_terraform_commands_that_need_locking() | ||
| arguments = ["-lock-timeout=20s"] | ||
| } | ||
| } | ||
|
|
||
| dependency "eks" { | ||
| config_path = "../eks" | ||
| mock_outputs_allowed_terraform_commands = ["init", "plan", "validate", "destroy"] | ||
| mock_outputs = { | ||
| cluster_name = "mock-cluster" | ||
| oidc_provider_arn = "arn:aws-us-gov:iam::123456789012:oidc-provider/mock" | ||
| } | ||
| } | ||
|
|
||
| dependency "eks_dns" { | ||
| config_path = "../eks-dns" | ||
| mock_outputs_allowed_terraform_commands = ["init", "plan", "validate", "destroy"] | ||
| mock_outputs = { | ||
| cluster_domain = "mock.example.com" | ||
| } | ||
| } | ||
|
|
||
| dependency "eks_grafana" { | ||
| config_path = "../eks-grafana" | ||
| mock_outputs_allowed_terraform_commands = ["init", "plan", "validate", "destroy"] | ||
| mock_outputs = { | ||
| public_endpoint = "mock.grafaba.example.com" | ||
| } | ||
| } | ||
|
|
||
| dependency "eks_keycloak" { | ||
| config_path = "../eks-keycloak" | ||
| mock_outputs_allowed_terraform_commands = ["init", "plan", "validate", "destroy"] | ||
| mock_outputs = { | ||
| public_endpoint = "mock.keycloak.example.com" | ||
| discovery_url = "mock.keycloak.example.com/auth" | ||
| client_id = "mock-client-id" | ||
| client_secret = "mock-client-secret" | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| paths = [ | ||
| "../eks", | ||
| "../eks-dns", | ||
| "../eks-grafana", | ||
| "../eks-keycloak", | ||
| "../eks-prometheus", | ||
| ] | ||
| } | ||
|
|
||
| inputs = { | ||
| # Base Cluster Config | ||
| cluster_domain = dependency.eks_dns.outputs.cluster_domain | ||
| namespace = include.root.inputs.namespaces["gogatekeeper"] | ||
| profile = include.root.inputs.aws_profile | ||
| region = include.root.inputs.aws_region | ||
|
|
||
| # Gatekeeper Config | ||
| gogatekeeper_tag = include.root.inputs.gogatekeeper_tag | ||
| gogatekeeper_chart_version = include.root.inputs.gogatekeeper_chart_version | ||
| keycloak_discovery_url = dependency.eks_keycloak.outputs.discovery_url | ||
|
|
||
| # Service Behind Gatekeeper Config | ||
| service_name = "test-gc" | ||
| upstream_url = dependency.eks_grafana.outputs.public_endpoint | ||
| redirection_url = dependency.eks_grafana.outputs.public_endpoint | ||
| client_id = dependency.eks_keycloak.outputs.client_id | ||
| client_secret = dependency.eks_keycloak.outputs.client_secret | ||
| keycloak_public_url = dependency.eks_keycloak.outputs.public_endpoint | ||
| } |
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
77 changes: 77 additions & 0 deletions
77
lab/development/us-gov-east-1/vpc/platform-test-z/eks-keycloak/terragrunt.hcl
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 |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| include "root" { | ||
| path = find_in_parent_folders("root.hcl") | ||
| merge_strategy = "deep" | ||
| expose = true | ||
| } | ||
|
|
||
| terraform { | ||
| # source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-keycloak.git?ref=${include.root.inputs.release_version}" | ||
| source = "../../../../../../../tfmod-keycloak" | ||
| extra_arguments "retry_lock" { | ||
| commands = get_terraform_commands_that_need_locking() | ||
| arguments = ["-lock-timeout=20s"] | ||
| } | ||
| } | ||
|
|
||
| dependency "eks" { | ||
| config_path = "../eks" | ||
| mock_outputs_allowed_terraform_commands = ["init", "plan", "validate", "destroy"] | ||
| mock_outputs = { | ||
| cluster_name = "mock-cluster" | ||
| oidc_provider_arn = "arn:aws-us-gov:iam::123456789012:oidc-provider/mock" | ||
| } | ||
| } | ||
|
|
||
| dependency "eks_config" { | ||
| config_path = "../eks-config" | ||
| mock_outputs_allowed_terraform_commands = ["init", "plan", "validate", "destroy"] | ||
| mock_outputs = { | ||
| rwo_storage_class = "gp3-mock" | ||
| } | ||
| } | ||
|
|
||
| dependency "eks_dns" { | ||
| config_path = "../eks-dns" | ||
| mock_outputs_allowed_terraform_commands = ["init", "plan", "validate", "destroy"] | ||
| mock_outputs = { | ||
| cluster_domain = "mock.example.com" | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| paths = [ | ||
| "../eks", | ||
| "../eks-config", | ||
| "../eks-dns", | ||
| "../eks-prometheus", | ||
| ] | ||
| } | ||
|
|
||
| inputs = { | ||
| cluster_domain = dependency.eks_dns.outputs.cluster_domain | ||
| cluster_name = dependency.eks.outputs.cluster_name | ||
| namespace = include.root.inputs.namespaces["keycloak"] | ||
| profile = include.root.inputs.aws_profile | ||
| region = include.root.inputs.aws_region | ||
|
|
||
| # keycloak config | ||
| default_storage_class = dependency.eks_config.outputs.rwo_storage_class | ||
| keycloak_chart_version = include.root.inputs.keycloak_chart_version | ||
| keycloak_hostname = include.root.inputs.keycloak_hostname | ||
| keycloak_tag = include.root.inputs.keycloak_tag | ||
| realm_email = include.root.inputs.cluster_mailing_list | ||
| realm_name = "master" | ||
| realm_password = include.root.inputs.keycloak_password | ||
| realm_username = include.root.inputs.keycloak_username | ||
| service_name = "keycloak" | ||
| telemetry_namespace = include.root.inputs.telemetry_namespace | ||
|
|
||
| # # Database configuration | ||
| keycloak_database = include.root.inputs.keycloak_database | ||
| keycloak_user = include.root.inputs.keycloak_username | ||
| keycloak_password = include.root.inputs.keycloak_password | ||
|
|
||
| # Project information | ||
| project_name = include.root.inputs.project_name | ||
| tags = include.root.inputs.tags | ||
| } |
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
Oops, something went wrong.