diff --git a/.github/workflows/helm-chart-ci-cd.yml b/.github/workflows/helm-chart-ci-cd.yaml similarity index 96% rename from .github/workflows/helm-chart-ci-cd.yml rename to .github/workflows/helm-chart-ci-cd.yaml index 9c0d5c7..a07fcf9 100644 --- a/.github/workflows/helm-chart-ci-cd.yml +++ b/.github/workflows/helm-chart-ci-cd.yaml @@ -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] diff --git a/README.md b/README.md index ebcf266..d5fbb39 100644 --- a/README.md +++ b/README.md @@ -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 @@ -95,4 +115,4 @@ We welcome contributions to this chart. Please read our [Contributing Guide](CON ## License -This chart is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details. +This chart is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details. \ No newline at end of file diff --git a/charts/postiz/Chart.yaml b/charts/postiz/Chart.yaml index 32b42f9..1ffd178 100644 --- a/charts/postiz/Chart.yaml +++ b/charts/postiz/Chart.yaml @@ -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 diff --git a/charts/postiz/templates/_helpers.yml b/charts/postiz/templates/_helpers.yaml similarity index 100% rename from charts/postiz/templates/_helpers.yml rename to charts/postiz/templates/_helpers.yaml diff --git a/charts/postiz/templates/postiz-config.yml b/charts/postiz/templates/postiz-config.yaml similarity index 100% rename from charts/postiz/templates/postiz-config.yml rename to charts/postiz/templates/postiz-config.yaml diff --git a/charts/postiz/templates/postiz-ingress.yaml b/charts/postiz/templates/postiz-ingress.yaml new file mode 100644 index 0000000..57b66cc --- /dev/null +++ b/charts/postiz/templates/postiz-ingress.yaml @@ -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 }} \ No newline at end of file diff --git a/charts/postiz/templates/postiz-secret.yml b/charts/postiz/templates/postiz-secret.yaml similarity index 100% rename from charts/postiz/templates/postiz-secret.yml rename to charts/postiz/templates/postiz-secret.yaml diff --git a/charts/postiz/templates/postiz-service.yml b/charts/postiz/templates/postiz-service.yaml similarity index 100% rename from charts/postiz/templates/postiz-service.yml rename to charts/postiz/templates/postiz-service.yaml diff --git a/charts/postiz/values.yaml b/charts/postiz/values.yaml index bf6aca7..ffaab12 100644 --- a/charts/postiz/values.yaml +++ b/charts/postiz/values.yaml @@ -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: {}