Add configurable ingress, rename all files to .yaml for conformity.
This commit is contained in:
@@ -5,12 +5,12 @@ on:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- 'charts/**'
|
||||
- '.github/workflows/helm-chart-ci-cd.yml'
|
||||
- '.github/workflows/helm-chart-ci-cd.yaml'
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- 'charts/**'
|
||||
- '.github/workflows/helm-chart-ci-cd.yml'
|
||||
- '.github/workflows/helm-chart-ci-cd.yaml'
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
@@ -50,6 +50,13 @@ The following table lists the configurable parameters of the Postiz chart and th
|
||||
| `postgresql.auth.database` | PostgreSQL database | `postiz` |
|
||||
| `redis.enabled` | Deploy Redis | `true` |
|
||||
| `redis.auth.password` | Redis password | `postiz-redis-password` |
|
||||
| `ingress.enabled` | Enable ingress controller resource | `false` |
|
||||
| `ingress.className` | IngressClass that will be be used | `""` |
|
||||
| `ingress.annotations` | Ingress annotations | `{}` |
|
||||
| `ingress.hosts` | Ingress hostnames | `[]` |
|
||||
| `ingress.tls` | Ingress TLS configuration | `[]` |
|
||||
| `ingress.path` | Path within the host | `/` |
|
||||
| `ingress.pathType` | Ingress path type | `ImplementationSpecific` |
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
@@ -61,13 +68,26 @@ $ helm install postiz-app \
|
||||
|
||||
The above command sets the PostgreSQL password to `secretpassword`.
|
||||
|
||||
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
|
||||
Alternatively, you can use a YAML file to specify the values while installing the chart. Create a file called `custom-values.yaml` (or any name you prefer) and specify your values:
|
||||
|
||||
```bash
|
||||
$ helm install postiz-app -f values.yaml postiz/postiz
|
||||
```yaml
|
||||
postgresql:
|
||||
auth:
|
||||
password: secretpassword
|
||||
ingress:
|
||||
enabled: true
|
||||
hosts:
|
||||
- host: postiz.example.com
|
||||
```
|
||||
|
||||
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||
Then, you can install the chart using the `-f` flag:
|
||||
|
||||
```bash
|
||||
$ helm install postiz-app -f custom-values.yaml postiz/postiz
|
||||
```
|
||||
|
||||
> **Tip**: You can use the default [values.yaml](values.yaml) as a starting point for your custom configuration.
|
||||
|
||||
|
||||
## Persistence
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ apiVersion: v2
|
||||
name: postiz-app
|
||||
description: A Social Media Scheduling App
|
||||
type: application
|
||||
version: 1.0.1
|
||||
version: 1.0.2
|
||||
appVersion: "1.3.0"
|
||||
keywords:
|
||||
- social media
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
{{- if .Values.ingress.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ include "postiz.fullname" . }}
|
||||
labels:
|
||||
{{- include "postiz.labels" . | nindent 4 }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.className }}
|
||||
ingressClassName: {{ .Values.ingress.className }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
pathType: {{ .pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "postiz.fullname" $ }}
|
||||
port:
|
||||
number: {{ .port }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.extraRules }}
|
||||
{{- toYaml .Values.ingress.extraRules | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -25,15 +25,22 @@ service:
|
||||
port: 80
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
enabled: false # Disabled by default
|
||||
className: ""
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
pathType: Prefix
|
||||
port: 80
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
extraRules: []
|
||||
|
||||
resources: {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user