Add PGCluster Namespace

This commit is contained in:
Daniel Cosme
2026-04-30 14:37:34 -04:00
parent f1b73cffba
commit f945695b61
3 changed files with 16 additions and 9 deletions

View File

@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: cnpg-cluster
spec: {}
status: {}

View File

@@ -4,16 +4,16 @@ metadata:
name: truenas-csi
namespace: truenas-csi
resources:
- iscsi-storage-class.yaml
- controller-service-account.yaml
- controller-cluster-role.yaml
- controller-binding.yaml
- node-service-account.yaml
- node-cluster-role.yaml
- CSIDriver.yaml
- nfs-storage-class.yaml
- node-service-account.yaml
- node-binding.yaml
- node-deamonset.yaml
- config.yaml
- iscsi-storage-class.yaml
- namespace.yaml
- controller-deployment.yaml
- controller-cluster-role.yaml
- CSIDriver.yaml
- config.yaml
- nfs-storage-class.yaml
- controller-service-account.yaml

View File

@@ -12,6 +12,7 @@ import (
var meta kube.Metadata
var Namespace = kube.Namespace(root.CloudNativePG + "-system")
var PGClusterNamespace = kube.Namespace(root.CloudNativePG + "-cluster")
func init() {
meta = kube.NewMetadata(root.CloudNativePG, Namespace)
@@ -20,6 +21,7 @@ func init() {
func Stack() stack.Stack {
s := stack.NewStack("cloud-native-pg", map[string]any{
"namespace": Namespace,
"cluster-namespace": PGClusterNamespace,
"helm-repository-source": HelmSource(),
"helm-release": HelmRelease(),
"pg-cluster": Cluster(),
@@ -28,8 +30,7 @@ func Stack() stack.Stack {
}
func Cluster() pg.Cluster {
namespace := kube.Namespace(root.CloudNativePG + "-cluster")
meta = kube.NewMetadata(root.CloudNativePG+"-cluster", namespace)
meta := kube.NewMetadata(root.CloudNativePG+"-cluster", PGClusterNamespace)
spec := pg.ClusterSpec{
Instances: 3,
StorageConfiguration: pg.StorageConfiguration{