feat(postgres): customize storage size
This commit is contained in:
1
postgres/.gitignore
vendored
1
postgres/.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
|
postgres-cluster-values.yaml
|
||||||
create-database.yaml
|
create-database.yaml
|
||||||
delete-database.yaml
|
delete-database.yaml
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ set fallback := true
|
|||||||
export CNPG_NAMESPACE := env("CNPG_NAMESPACE", "postgres")
|
export CNPG_NAMESPACE := env("CNPG_NAMESPACE", "postgres")
|
||||||
export CNPG_CHART_VERSION := env("CNPG_CHART_VERSION", "0.26.0")
|
export CNPG_CHART_VERSION := env("CNPG_CHART_VERSION", "0.26.0")
|
||||||
export CNPG_CLUSTER_CHART_VERSION := env("CNPG_CLUSTER_CHART_VERSION", "0.3.1")
|
export CNPG_CLUSTER_CHART_VERSION := env("CNPG_CLUSTER_CHART_VERSION", "0.3.1")
|
||||||
|
export POSTGRES_STORAGE_SIZE := env("POSTGRES_STORAGE_SIZE", "20Gi")
|
||||||
export K8S_VAULT_NAMESPACE := env("K8S_VAULT_NAMESPACE", "vault")
|
export K8S_VAULT_NAMESPACE := env("K8S_VAULT_NAMESPACE", "vault")
|
||||||
export EXTERNAL_SECRETS_NAMESPACE := env("EXTERNAL_SECRETS_NAMESPACE", "external-secrets")
|
export EXTERNAL_SECRETS_NAMESPACE := env("EXTERNAL_SECRETS_NAMESPACE", "external-secrets")
|
||||||
|
|
||||||
@@ -69,6 +70,7 @@ create-cluster:
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
gomplate -f postgres-cluster-values.gomplate.yaml -o postgres-cluster-values.yaml
|
||||||
helm upgrade --install postgres-cluster cnpg/cluster \
|
helm upgrade --install postgres-cluster cnpg/cluster \
|
||||||
--version ${CNPG_CLUSTER_CHART_VERSION} \
|
--version ${CNPG_CLUSTER_CHART_VERSION} \
|
||||||
-n ${CNPG_NAMESPACE} --wait -f postgres-cluster-values.yaml
|
-n ${CNPG_NAMESPACE} --wait -f postgres-cluster-values.yaml
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
cluster:
|
cluster:
|
||||||
instances: 1
|
instances: 1
|
||||||
|
|
||||||
|
# Storage configuration
|
||||||
|
storage:
|
||||||
|
size: {{ .Env.POSTGRES_STORAGE_SIZE }}
|
||||||
|
|
||||||
initdb:
|
initdb:
|
||||||
postInitTemplateSQL:
|
postInitTemplateSQL:
|
||||||
- CREATE EXTENSION IF NOT EXISTS vector;
|
- CREATE EXTENSION IF NOT EXISTS vector;
|
||||||
Reference in New Issue
Block a user