FIX (helm): Get rid of ingress by default

This commit is contained in:
Rostislav Dugin
2025-12-02 10:03:47 +03:00
parent 7007236f2f
commit 6f0152b60c
3 changed files with 90 additions and 58 deletions

View File

@@ -174,31 +174,15 @@ cd postgresus
helm install postgresus ./deploy/postgresus -n postgresus --create-namespace
```
To customize the installation, create a `values.yaml` file:
```yaml
ingress:
hosts:
- host: backup.yourdomain.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: backup-yourdomain-com-tls
hosts:
- backup.yourdomain.com
persistence:
size: 20Gi
```
Then install with your custom values:
**Step 3:** Get the external IP:
```bash
helm install postgresus ./deploy/postgresus -n postgresus --create-namespace -f values.yaml
kubectl get svc -n postgresus
```
See the [Helm chart README](deploy/postgresus/README.md) for all configuration options.
Access Postgresus at `http://<EXTERNAL-IP>` (port 80).
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.
---

View File

@@ -6,6 +6,14 @@
helm install postgresus ./deploy/postgresus -n postgresus --create-namespace
```
After installation, get the external IP:
```bash
kubectl get svc -n postgresus
```
Access Postgresus at `http://<EXTERNAL-IP>` (port 80).
## Configuration
### Main Parameters
@@ -40,21 +48,23 @@ helm install postgresus ./deploy/postgresus -n postgresus --create-namespace
### Service
| Parameter | Description | Default Value |
| -------------------------- | ----------------------- | ------------- |
| `service.type` | Service type | `ClusterIP` |
| `service.port` | Service port | `4005` |
| `service.targetPort` | Target port | `4005` |
| `service.headless.enabled` | Enable headless service | `true` |
| Parameter | Description | Default Value |
| -------------------------- | ----------------------- | -------------- |
| `service.type` | Service type | `LoadBalancer` |
| `service.port` | External port | `80` |
| `service.targetPort` | Container port | `4005` |
| `service.headless.enabled` | Enable headless service | `true` |
### Ingress
### Ingress (Optional)
Ingress is disabled by default. The chart uses LoadBalancer service for direct IP access.
| Parameter | Description | Default Value |
| ----------------------- | ----------------- | ------------------------ |
| `ingress.enabled` | Enable Ingress | `true` |
| `ingress.enabled` | Enable Ingress | `false` |
| `ingress.className` | Ingress class | `nginx` |
| `ingress.hosts[0].host` | Hostname | `postgresus.example.com` |
| `ingress.tls` | TLS configuration | See values.yaml |
| `ingress.tls` | TLS configuration | `[]` |
### Health Checks
@@ -63,11 +73,54 @@ helm install postgresus ./deploy/postgresus -n postgresus --create-namespace
| `livenessProbe.enabled` | Enable liveness probe | `true` |
| `readinessProbe.enabled` | Enable readiness probe | `true` |
## Custom Ingress Example
## Examples
### Basic Installation (LoadBalancer on port 80)
Default installation exposes Postgresus via LoadBalancer on port 80:
```bash
helm install postgresus ./deploy/postgresus -n postgresus --create-namespace
```
Access via `http://<EXTERNAL-IP>`
### Using NodePort
If your cluster doesn't support LoadBalancer:
```yaml
# custom-values.yaml
# nodeport-values.yaml
service:
type: NodePort
port: 80
targetPort: 4005
nodePort: 30080
```
```bash
helm install postgresus ./deploy/postgresus -n postgresus --create-namespace -f nodeport-values.yaml
```
Access via `http://<NODE-IP>:30080`
### Enable Ingress with HTTPS
For domain-based access with TLS:
```yaml
# ingress-values.yaml
service:
type: ClusterIP
port: 4005
targetPort: 4005
ingress:
enabled: true
className: nginx
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "true"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
hosts:
- host: backup.example.com
paths:
@@ -80,5 +133,18 @@ ingress:
```
```bash
helm install postgresus ./deploy/postgresus -n postgresus --create-namespace -f custom-values.yaml
helm install postgresus ./deploy/postgresus -n postgresus --create-namespace -f ingress-values.yaml
```
### Custom Storage Size
```yaml
# storage-values.yaml
persistence:
size: 50Gi
storageClassName: "fast-ssd"
```
```bash
helm install postgresus ./deploy/postgresus -n postgresus --create-namespace -f storage-values.yaml
```

View File

@@ -16,9 +16,9 @@ replicaCount: 1
# Service configuration
service:
type: ClusterIP
port: 4005
targetPort: 4005
type: LoadBalancer
port: 80 # External port (HTTP default)
targetPort: 4005 # Internal container port
# Headless service for StatefulSet
headless:
enabled: true
@@ -43,35 +43,17 @@ persistence:
# Mount path in container
mountPath: /postgresus-data
# Ingress configuration
# Ingress configuration (disabled by default - using LoadBalancer instead)
ingress:
enabled: true
enabled: false
className: nginx
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/use-http2: "true"
# Gzip settings
nginx.ingress.kubernetes.io/enable-gzip: "true"
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"
nginx.ingress.kubernetes.io/gzip-min-length: "1000"
nginx.ingress.kubernetes.io/gzip-level: "9"
nginx.ingress.kubernetes.io/gzip-buffers: "16 8k"
nginx.ingress.kubernetes.io/gzip-http-version: "1.1"
nginx.ingress.kubernetes.io/gzip-vary: "on"
# Cert-manager settings
cert-manager.io/cluster-issuer: "clusteriissuer-letsencrypt"
cert-manager.io/duration: "2160h"
cert-manager.io/renew-before: "360h"
annotations: {}
hosts:
- host: postgresus.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: postgresus.example.com-tls
hosts:
- postgresus.example.com
tls: []
# Health checks configuration
# Note: The application only has /api/v1/system/health endpoint