Skip to content

Commit

Permalink
MAJOR: adding hostNetwork mode toggle, new ports, and centralized ver…
Browse files Browse the repository at this point in the history
…sion control for terraform providers (#51)

feat: add toggle for host network mode and new port numbers for all hostNetwork services
MAJOR: remove all pinned versions since they are now being centrally controlled by our provider versions module
MAJOR: update glueops-platform chart to 0.16.0
  • Loading branch information
venkatamutyala authored Jun 14, 2023
1 parent 98f7ce7 commit fbc29ea
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 71 deletions.
96 changes: 46 additions & 50 deletions README.md

Large diffs are not rendered by default.

26 changes: 20 additions & 6 deletions captain-repo.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
locals {

provider_versions_tf_file = <<EOT
module "provider_versions" {
source = "git::https://github.com/GlueOps/terraform-module-provider-versions.git"
}
EOT

}

module "captain_repository" {
for_each = local.environment_map
source = "./modules/github-captain-repository/0.1.0"
repository_name = "${each.value.environment_name}.${aws_route53_zone.main.name}"
files_to_create = {
"argocd.yaml" = module.argocd_helm_values[each.value.environment_name].helm_values
"platform.yaml" = module.glueops_platform_helm_values[each.value.environment_name].helm_values
"README.md" = module.tenant_readmes[each.value.environment_name].tenant_readme
"terraform/kubernetes/.gitkeep" = ""
"argocd.yaml" = module.argocd_helm_values[each.value.environment_name].helm_values
"platform.yaml" = module.glueops_platform_helm_values[each.value.environment_name].helm_values
"README.md" = module.tenant_readmes[each.value.environment_name].tenant_readme
"terraform/kubernetes/provider_versions.tf" = local.provider_versions_tf_file
"terraform/vault/initialization/provider_versions.tf" = local.provider_versions_tf_file
"terraform/vault/configuration/provider_versions.tf" = local.provider_versions_tf_file

".gitignore" = <<EOT
.terraform
Expand All @@ -15,13 +29,13 @@ module "captain_repository" {
EOT
"terraform/vault/initialization/main.tf" = <<EOT
module "initialize_vault_cluster" {
source = "git::https://github.com/GlueOps/terraform-module-kubernetes-hashicorp-vault-initialization.git?ref=v0.3.0"
source = "git::https://github.com/GlueOps/terraform-module-kubernetes-hashicorp-vault-initialization.git?ref=v0.4.0"
}
EOT
"terraform/vault/configuration/main.tf" = <<EOT
module "configure_vault_cluster" {
source = "git::https://github.com/GlueOps/terraform-module-kubernetes-hashicorp-vault-configuration.git?ref=v0.4.3"
source = "git::https://github.com/GlueOps/terraform-module-kubernetes-hashicorp-vault-configuration.git?ref=v0.5.1"
oidc_client_secret = "${random_password.dex_vault_client_secret[each.key].result}"
captain_domain = "${each.value.environment_name}.${aws_route53_zone.main.name}"
org_team_policy_mappings = [
Expand Down
3 changes: 2 additions & 1 deletion generate-helm-values.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ resource "random_password" "grafana_admin_secret" {

module "glueops_platform_helm_values" {
for_each = local.environment_map
source = "git::https://github.com/GlueOps/platform-helm-chart-platform.git?ref=v0.15.0"
source = "git::https://github.com/GlueOps/platform-helm-chart-platform.git?ref=v0.16.0"
this_is_development = var.this_is_development
dex_github_client_id = each.value.github_oauth_app_client_id
dex_github_client_secret = each.value.github_oauth_app_client_secret
Expand Down Expand Up @@ -67,6 +67,7 @@ module "glueops_platform_helm_values" {
github_tenant_app_id = each.value.github_tenant_app_id
github_tenant_app_installation_id = each.value.github_tenant_app_installation_id
github_tenant_app_b64enc_private_key = each.value.github_tenant_app_b64enc_private_key
host_network_enabled = each.value.host_network_enabled
}

resource "aws_s3_object" "platform_helm_values" {
Expand Down
5 changes: 2 additions & 3 deletions modules/github-captain-repository/0.1.0/providers.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
terraform {
required_providers {
github = {
source = "integrations/github"
version = "5.25.0"
source = "integrations/github"
}
}
}
}
5 changes: 2 additions & 3 deletions modules/opsgenie/0.1.0/providers.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
terraform {
required_providers {
opsgenie = {
source = "opsgenie/opsgenie"
version = "0.6.20"
source = "opsgenie/opsgenie"
}
}
}
}
2 changes: 1 addition & 1 deletion modules/tenant-readme/0.1.0/readme.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ locals {
codespace_version = "v0.24.0"
argocd_crd_version = "v2.7.4"
argocd_helm_chart_version = "5.36.1"
glueops_platform_version = "0.15.0"
glueops_platform_version = "0.16.0"
tools_version = "v0.1.4"
}

Expand Down
10 changes: 3 additions & 7 deletions providers.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
terraform {
required_providers {
cloudflare = {
source = "cloudflare/cloudflare"
version = "4.5.0"
source = "cloudflare/cloudflare"
}
aws = {
source = "hashicorp/aws"
version = "4.67.0"
source = "hashicorp/aws"
}
random = {
source = "hashicorp/random"
version = "3.5.1"
source = "hashicorp/random"
}
}
}
Expand Down Expand Up @@ -46,4 +43,3 @@ provider "aws" {
role_arn = "arn:aws:iam::${var.tenant_account_id}:role/OrganizationAccountAccessRole"
}
}

2 changes: 2 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ variable "cluster_environments" {
description = "The cluster environments and their respective github app ids"
type = list(object({
environment_name = string
host_network_enabled = bool
github_oauth_app_client_id = string
github_oauth_app_client_secret = string
github_tenant_app_id = string
Expand All @@ -58,6 +59,7 @@ variable "cluster_environments" {
default = [
{
environment_name = "test"
host_network_enabled = true
github_oauth_app_client_id = "oauth-app-id"
github_oauth_app_client_secret = "oauth-app-secret"
github_tenant_app_id = "tenant-github-app-id"
Expand Down

0 comments on commit fbc29ea

Please sign in to comment.