File tree Expand file tree Collapse file tree
terraform/modules/aws/postgresql-setup Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,11 +152,20 @@ EOF
152152 # Verify kubectl connectivity
153153 " kubectl cluster-info" ,
154154
155+ # Create postgres namespace if it doesn't exist
156+ " echo 'Creating postgres namespace...'" ,
157+ " kubectl create namespace postgres --dry-run=client -o yaml | kubectl apply -f -" ,
158+
155159 # Deploy PostgreSQL resources
156160 " kubectl apply -f /tmp/postgres-postgresql.yml" ,
157161 " kubectl apply -f /tmp/postgres-setup-config.yml" ,
158162 " echo 'PostgreSQL Kubernetes resources deployed successfully!'" ,
159163
164+ # Verify the resources were created
165+ " echo 'Verifying PostgreSQL resources...'" ,
166+ " kubectl get secret -n postgres postgres-postgresql || echo 'Secret not found'" ,
167+ " kubectl get configmap -n postgres postgres-setup-config || echo 'ConfigMap not found'" ,
168+
160169 # Cleanup
161170 " rm -f /tmp/postgres-postgresql.yml /tmp/postgres-setup-config.yml"
162171 ]
You can’t perform that action at this time.
0 commit comments