Skip to content

Commit 97ee4b5

Browse files
FIX (helm): Use standard namespace behavior instead of hardcoded values
1 parent 12eea72 commit 97ee4b5

File tree

4 files changed

+20
-26
lines changed

4 files changed

+20
-26
lines changed

deploy/helm/README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
Install directly from the OCI registry (no need to clone the repository):
66

77
```bash
8-
helm install postgresus oci://ghcr.io/rostislavdugin/charts/postgresus -n postgresus --create-namespace
8+
helm install postgresus oci://ghcr.io/rostislavdugin/charts/postgresus \
9+
-n postgresus --create-namespace
910
```
1011

12+
The `-n postgresus --create-namespace` flags control which namespace the chart is installed into. You can use any namespace name you prefer.
13+
1114
## Accessing Postgresus
1215

1316
By default, the chart creates a ClusterIP service. Use port-forward to access:
@@ -24,8 +27,6 @@ Then open `http://localhost:4005` in your browser.
2427

2528
| Parameter | Description | Default Value |
2629
| ------------------ | ------------------ | --------------------------- |
27-
| `namespace.create` | Create namespace | `true` |
28-
| `namespace.name` | Namespace name | `postgresus` |
2930
| `image.repository` | Docker image | `rostislavdugin/postgresus` |
3031
| `image.tag` | Image tag | `latest` |
3132
| `image.pullPolicy` | Image pull policy | `Always` |
@@ -85,7 +86,9 @@ service:
8586
```
8687
8788
```bash
88-
helm install postgresus oci://ghcr.io/rostislavdugin/charts/postgresus -n postgresus --create-namespace -f nodeport-values.yaml
89+
helm install postgresus oci://ghcr.io/rostislavdugin/charts/postgresus \
90+
-n postgresus --create-namespace \
91+
-f nodeport-values.yaml
8992
```
9093

9194
Access at `http://<NODE-IP>:30080`
@@ -103,7 +106,9 @@ service:
103106
```
104107
105108
```bash
106-
helm install postgresus oci://ghcr.io/rostislavdugin/charts/postgresus -n postgresus --create-namespace -f loadbalancer-values.yaml
109+
helm install postgresus oci://ghcr.io/rostislavdugin/charts/postgresus \
110+
-n postgresus --create-namespace \
111+
-f loadbalancer-values.yaml
107112
```
108113

109114
Get the external IP:
@@ -138,7 +143,9 @@ ingress:
138143
```
139144
140145
```bash
141-
helm install postgresus oci://ghcr.io/rostislavdugin/charts/postgresus -n postgresus --create-namespace -f ingress-values.yaml
146+
helm install postgresus oci://ghcr.io/rostislavdugin/charts/postgresus \
147+
-n postgresus --create-namespace \
148+
-f ingress-values.yaml
142149
```
143150

144151
### Option 5: HTTPRoute (Gateway API)
@@ -157,7 +164,9 @@ route:
157164
```
158165
159166
```bash
160-
helm install postgresus oci://ghcr.io/rostislavdugin/charts/postgresus -n postgresus --create-namespace -f httproute-values.yaml
167+
helm install postgresus oci://ghcr.io/rostislavdugin/charts/postgresus \
168+
-n postgresus --create-namespace \
169+
-f httproute-values.yaml
161170
```
162171

163172
## Ingress Configuration
@@ -195,7 +204,9 @@ persistence:
195204
```
196205
197206
```bash
198-
helm install postgresus oci://ghcr.io/rostislavdugin/charts/postgresus -n postgresus --create-namespace -f storage-values.yaml
207+
helm install postgresus oci://ghcr.io/rostislavdugin/charts/postgresus \
208+
-n postgresus --create-namespace \
209+
-f storage-values.yaml
199210
```
200211

201212
## Upgrade

deploy/helm/templates/_helpers.tpl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,8 @@ Create the name of the service account to use
6161
{{- end }}
6262

6363
{{/*
64-
Namespace
64+
Namespace - uses the release namespace from helm install -n <namespace>
6565
*/}}
6666
{{- define "postgresus.namespace" -}}
67-
{{- if .Values.namespace.create }}
68-
{{- .Values.namespace.name }}
69-
{{- else }}
7067
{{- .Release.Namespace }}
7168
{{- end }}
72-
{{- end }}

deploy/helm/templates/namespace.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

deploy/helm/values.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# Default values for postgresus
22

3-
# Namespace configuration
4-
namespace:
5-
create: true
6-
name: postgresus
7-
83
# Image configuration
94
image:
105
repository: rostislavdugin/postgresus

0 commit comments

Comments
 (0)