Skip to content

Commit

Permalink
deploy valkey standalone
Browse files Browse the repository at this point in the history
We don't have a HA usecase yet
  • Loading branch information
Lillecarl committed Dec 29, 2024
1 parent e2b2428 commit 1d8edd0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
1 change: 1 addition & 0 deletions cloud/stage1/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ inputs = {
"keycloak-admin",
"grafana-admin",
"registry",
"valkey",
]
}
18 changes: 15 additions & 3 deletions cloud/valkey/main.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
variable "CF_DNS_TOKEN" {}
variable "valkey-password" {}
variable "paths" { type = map(string) }
variable "k8s_force" { type = bool }
variable "deploy" { type = bool }
Expand All @@ -10,6 +10,16 @@ locals {
data "kustomization_overlay" "this" {
resources = [for file in tolist(fileset(path.module, "*.yaml")) : "${path.module}/${file}"]
namespace = "valkey"
secret_generator {
name = "valkey-password"
type = "Opaque"
literals = [
"valkey-password=${var.valkey-password}"
]
options {
disable_name_suffix_hash = true
}
}
helm_charts {
name = "valkey"
namespace = "valkey"
Expand All @@ -18,8 +28,10 @@ data "kustomization_overlay" "this" {
version = "2.2.1"
include_crds = true
values_inline = <<YAML
replica:
replicaCount: 0
architecture: standalone # fuck HA
auth:
existingSecret: "valkey-password"
existingSecretPasswordKey: "valkey-password"
YAML
}
kustomize_options {
Expand Down
8 changes: 4 additions & 4 deletions cloud/valkey/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ dependency "stage1" {
config_path = "../stage1"
}
inputs = {
CF_DNS_TOKEN = get_env("CF_DNS_TOKEN")
paths = dependency.stage1.outputs.paths
deploy = feature.deploy.value
k8s_force = false
valkey-password = dependency.stage1.outputs.secrets["valkey"].password
paths = dependency.stage1.outputs.paths
deploy = feature.deploy.value
k8s_force = false
}

0 comments on commit 1d8edd0

Please sign in to comment.