Skip to content

Commit 6f0152b

Browse files
FIX (helm): Get rid of ingress by default
1 parent 7007236 commit 6f0152b

File tree

3 files changed

+90
-58
lines changed

3 files changed

+90
-58
lines changed

README.md

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -174,31 +174,15 @@ cd postgresus
174174
helm install postgresus ./deploy/postgresus -n postgresus --create-namespace
175175
```
176176

177-
To customize the installation, create a `values.yaml` file:
178-
179-
```yaml
180-
ingress:
181-
hosts:
182-
- host: backup.yourdomain.com
183-
paths:
184-
- path: /
185-
pathType: Prefix
186-
tls:
187-
- secretName: backup-yourdomain-com-tls
188-
hosts:
189-
- backup.yourdomain.com
190-
191-
persistence:
192-
size: 20Gi
193-
```
194-
195-
Then install with your custom values:
177+
**Step 3:** Get the external IP:
196178

197179
```bash
198-
helm install postgresus ./deploy/postgresus -n postgresus --create-namespace -f values.yaml
180+
kubectl get svc -n postgresus
199181
```
200182

201-
See the [Helm chart README](deploy/postgresus/README.md) for all configuration options.
183+
Access Postgresus at `http://<EXTERNAL-IP>` (port 80).
184+
185+
To customize the installation (e.g., storage size, NodePort instead of LoadBalancer), see the [Helm chart README](deploy/postgresus/README.md) for all configuration options.
202186

203187
---
204188

deploy/postgresus/README.md

Lines changed: 78 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
helm install postgresus ./deploy/postgresus -n postgresus --create-namespace
77
```
88

9+
After installation, get the external IP:
10+
11+
```bash
12+
kubectl get svc -n postgresus
13+
```
14+
15+
Access Postgresus at `http://<EXTERNAL-IP>` (port 80).
16+
917
## Configuration
1018

1119
### Main Parameters
@@ -40,21 +48,23 @@ helm install postgresus ./deploy/postgresus -n postgresus --create-namespace
4048

4149
### Service
4250

43-
| Parameter | Description | Default Value |
44-
| -------------------------- | ----------------------- | ------------- |
45-
| `service.type` | Service type | `ClusterIP` |
46-
| `service.port` | Service port | `4005` |
47-
| `service.targetPort` | Target port | `4005` |
48-
| `service.headless.enabled` | Enable headless service | `true` |
51+
| Parameter | Description | Default Value |
52+
| -------------------------- | ----------------------- | -------------- |
53+
| `service.type` | Service type | `LoadBalancer` |
54+
| `service.port` | External port | `80` |
55+
| `service.targetPort` | Container port | `4005` |
56+
| `service.headless.enabled` | Enable headless service | `true` |
57+
58+
### Ingress (Optional)
4959

50-
### Ingress
60+
Ingress is disabled by default. The chart uses LoadBalancer service for direct IP access.
5161

5262
| Parameter | Description | Default Value |
5363
| ----------------------- | ----------------- | ------------------------ |
54-
| `ingress.enabled` | Enable Ingress | `true` |
64+
| `ingress.enabled` | Enable Ingress | `false` |
5565
| `ingress.className` | Ingress class | `nginx` |
5666
| `ingress.hosts[0].host` | Hostname | `postgresus.example.com` |
57-
| `ingress.tls` | TLS configuration | See values.yaml |
67+
| `ingress.tls` | TLS configuration | `[]` |
5868

5969
### Health Checks
6070

@@ -63,11 +73,54 @@ helm install postgresus ./deploy/postgresus -n postgresus --create-namespace
6373
| `livenessProbe.enabled` | Enable liveness probe | `true` |
6474
| `readinessProbe.enabled` | Enable readiness probe | `true` |
6575

66-
## Custom Ingress Example
76+
## Examples
77+
78+
### Basic Installation (LoadBalancer on port 80)
79+
80+
Default installation exposes Postgresus via LoadBalancer on port 80:
81+
82+
```bash
83+
helm install postgresus ./deploy/postgresus -n postgresus --create-namespace
84+
```
85+
86+
Access via `http://<EXTERNAL-IP>`
87+
88+
### Using NodePort
89+
90+
If your cluster doesn't support LoadBalancer:
91+
92+
```yaml
93+
# nodeport-values.yaml
94+
service:
95+
type: NodePort
96+
port: 80
97+
targetPort: 4005
98+
nodePort: 30080
99+
```
100+
101+
```bash
102+
helm install postgresus ./deploy/postgresus -n postgresus --create-namespace -f nodeport-values.yaml
103+
```
104+
105+
Access via `http://<NODE-IP>:30080`
106+
107+
### Enable Ingress with HTTPS
108+
109+
For domain-based access with TLS:
67110

68111
```yaml
69-
# custom-values.yaml
112+
# ingress-values.yaml
113+
service:
114+
type: ClusterIP
115+
port: 4005
116+
targetPort: 4005
117+
70118
ingress:
119+
enabled: true
120+
className: nginx
121+
annotations:
122+
nginx.ingress.kubernetes.io/ssl-redirect: "true"
123+
cert-manager.io/cluster-issuer: "letsencrypt-prod"
71124
hosts:
72125
- host: backup.example.com
73126
paths:
@@ -80,5 +133,18 @@ ingress:
80133
```
81134
82135
```bash
83-
helm install postgresus ./deploy/postgresus -n postgresus --create-namespace -f custom-values.yaml
136+
helm install postgresus ./deploy/postgresus -n postgresus --create-namespace -f ingress-values.yaml
137+
```
138+
139+
### Custom Storage Size
140+
141+
```yaml
142+
# storage-values.yaml
143+
persistence:
144+
size: 50Gi
145+
storageClassName: "fast-ssd"
146+
```
147+
148+
```bash
149+
helm install postgresus ./deploy/postgresus -n postgresus --create-namespace -f storage-values.yaml
84150
```

deploy/postgresus/values.yaml

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ replicaCount: 1
1616

1717
# Service configuration
1818
service:
19-
type: ClusterIP
20-
port: 4005
21-
targetPort: 4005
19+
type: LoadBalancer
20+
port: 80 # External port (HTTP default)
21+
targetPort: 4005 # Internal container port
2222
# Headless service for StatefulSet
2323
headless:
2424
enabled: true
@@ -43,35 +43,17 @@ persistence:
4343
# Mount path in container
4444
mountPath: /postgresus-data
4545

46-
# Ingress configuration
46+
# Ingress configuration (disabled by default - using LoadBalancer instead)
4747
ingress:
48-
enabled: true
48+
enabled: false
4949
className: nginx
50-
annotations:
51-
nginx.ingress.kubernetes.io/rewrite-target: /
52-
nginx.ingress.kubernetes.io/ssl-redirect: "true"
53-
nginx.ingress.kubernetes.io/use-http2: "true"
54-
# Gzip settings
55-
nginx.ingress.kubernetes.io/enable-gzip: "true"
56-
nginx.ingress.kubernetes.io/gzip-types: "text/plain text/css application/json application/javascript text/javascript text/xml application/xml application/xml+rss image/svg+xml"
57-
nginx.ingress.kubernetes.io/gzip-min-length: "1000"
58-
nginx.ingress.kubernetes.io/gzip-level: "9"
59-
nginx.ingress.kubernetes.io/gzip-buffers: "16 8k"
60-
nginx.ingress.kubernetes.io/gzip-http-version: "1.1"
61-
nginx.ingress.kubernetes.io/gzip-vary: "on"
62-
# Cert-manager settings
63-
cert-manager.io/cluster-issuer: "clusteriissuer-letsencrypt"
64-
cert-manager.io/duration: "2160h"
65-
cert-manager.io/renew-before: "360h"
50+
annotations: {}
6651
hosts:
6752
- host: postgresus.example.com
6853
paths:
6954
- path: /
7055
pathType: Prefix
71-
tls:
72-
- secretName: postgresus.example.com-tls
73-
hosts:
74-
- postgresus.example.com
56+
tls: []
7557

7658
# Health checks configuration
7759
# Note: The application only has /api/v1/system/health endpoint

0 commit comments

Comments
 (0)