Skip to content

Commit

Permalink
Merge pull request #101 from serlo/upgrade-redis
Browse files Browse the repository at this point in the history
feat(redis): upgrade chart and refactor
  • Loading branch information
hugotiburtino authored Jul 17, 2024
2 parents e0cd264 + fc27bbb commit a4bfffb
Show file tree
Hide file tree
Showing 11 changed files with 445 additions and 99 deletions.
6 changes: 2 additions & 4 deletions envs/production/api.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ locals {
module "api_redis" {
source = "../../modules/redis"

namespace = kubernetes_namespace.api_namespace.metadata.0.name
chart_version = "12.6.2"
image_tag = "6.0.10"
node_pool = module.cluster.node_pools.non-preemptible
namespace = kubernetes_namespace.api_namespace.metadata.0.name
node_pool = module.cluster.node_pools.non-preemptible
}

module "api" {
Expand Down
6 changes: 0 additions & 6 deletions envs/production/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#####################################################################
# settings for production
#####################################################################
locals {
domain = "serlo.org"
project = "serlo-production"
Expand All @@ -17,9 +14,6 @@ locals {
kpi_database_instance_name = "${local.project}-postgres-2020-01-26"
}

#####################################################################
# modules
#####################################################################
module "cluster" {
source = "../../modules/gcloud/cluster"
name = "${local.project}-cluster"
Expand Down
6 changes: 2 additions & 4 deletions envs/staging/api.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ locals {
module "api_redis" {
source = "../../modules/redis"

namespace = kubernetes_namespace.api_namespace.metadata.0.name
chart_version = "12.6.2"
image_tag = "6.0.10"
node_pool = module.cluster.node_pools.non-preemptible
namespace = kubernetes_namespace.api_namespace.metadata.0.name
node_pool = module.cluster.node_pools.non-preemptible
}

module "api" {
Expand Down
5 changes: 4 additions & 1 deletion envs/terraform.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ terraform_plan: terraform_download_secrets
terraform plan -var-file secrets/terraform-$(env_name).tfvars

.PHONY: terraform_apply
terraform_apply: terraform_download_secrets
terraform_apply: terraform_download_secrets terraform_apply_without_downloading_secrets

.PHONY: terraform_apply_without_downloading_secrets
terraform_apply_without_downloading_secrets:
# just make sure we know what we are doing
terraform fmt -recursive
terraform apply -var-file secrets/terraform-$(env_name).tfvars
Expand Down
2 changes: 1 addition & 1 deletion modules/api/db-migration/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
locals {
name = "db-migration"
name_cronjob = "${local.name}-cronjob"
image = "eu.gcr.io/serlo-shared/api-db-migration:${var.image_tag}"
image = "ghcr.io/serlo/api.serlo.org/db-migration:${var.image_tag}"
}

variable "namespace" {
Expand Down
28 changes: 14 additions & 14 deletions modules/redis/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a4bfffb

Please sign in to comment.