diff --git a/on-chain-voting/Chart.yaml b/on-chain-voting/Chart.yaml index be8cac58..566994f2 100644 --- a/on-chain-voting/Chart.yaml +++ b/on-chain-voting/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.0 +version: 0.3.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/on-chain-voting/README.md b/on-chain-voting/README.md index 7ea37650..8eb5e8ae 100644 --- a/on-chain-voting/README.md +++ b/on-chain-voting/README.md @@ -1,6 +1,6 @@ # on-chain-voting -![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) +![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) A Helm chart for Kubernetes @@ -48,6 +48,11 @@ helmfile status | Key | Type | Default | Description | |-----|------|---------|-------------| | fullnameOverride | string | `""` | Full name override | +| ingress.annotations | object | `{}` | The Ingress Annotations | +| ingress.className | string | `""` | The Ingress Class Name to use | +| ingress.enabled | bool | `false` | Whether to create an Ingress | +| ingress.hosts | list | `[]` | The Ingress Hosts | +| ingress.tls | list | `[]` | The TLS configuration | | nameOverride | string | `""` | Name override | | postgresql.auth.database | string | `"on-chain-voting"` | Default database name | | postgresql.auth.enablePostgresUser | bool | `false` | Enable the default postgres user | @@ -95,11 +100,6 @@ helmfile status | web.image.pullPolicy | string | `"IfNotPresent"` | The image pull policy | | web.image.repository | string | `"673156464838.dkr.ecr.us-west-2.amazonaws.com/on-chain-voting-web"` | The image repository | | web.image.tag | string | `"0.1.0"` | Overrides the image tag whose default is the chart appVersion. | -| web.ingress.annotations | object | `{}` | The Ingress Annotations | -| web.ingress.className | string | `""` | The Ingress Class Name to use | -| web.ingress.enabled | bool | `false` | Whether to create an Ingress | -| web.ingress.hosts | list | `[]` | The Ingress Hosts | -| web.ingress.tls | list | `[]` | The TLS configuration | | web.lifecycle | object | `{"preStop":{"exec":{"command":["sh","-c","sleep 15 && kill -SIGQUIT 1"]}}}` | Lifecycle hooks | | web.nextPublicApiBaseURL | string | `""` | Next Public API base URL | | web.nextPublicReleaseStage | string | `"production"` | Next Public Release Stage | diff --git a/on-chain-voting/templates/ingress-web.yaml b/on-chain-voting/templates/ingress-web.yaml deleted file mode 100644 index a4952589..00000000 --- a/on-chain-voting/templates/ingress-web.yaml +++ /dev/null @@ -1,43 +0,0 @@ -{{- if .Values.web.ingress.enabled -}} -{{- $fullName := include "on-chain-voting.fullname" . -}} -{{- $svcPort := .Values.web.service.port -}} -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: {{ $fullName }}-web - labels: - {{- include "on-chain-voting.labels" . | nindent 4 }} - {{- with .Values.web.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if .Values.web.ingress.className }} - ingressClassName: {{ .Values.web.ingress.className }} - {{- end }} - {{- if .Values.web.ingress.tls }} - tls: - {{- range .Values.web.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.web.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - pathType: {{ .pathType }} - backend: - service: - name: {{ $fullName }}-web - port: - number: {{ $svcPort }} - {{- end }} - {{- end }} -{{- end }} diff --git a/on-chain-voting/templates/ingress.yaml b/on-chain-voting/templates/ingress.yaml new file mode 100644 index 00000000..b8623d3e --- /dev/null +++ b/on-chain-voting/templates/ingress.yaml @@ -0,0 +1,33 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "on-chain-voting.fullname" . -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "on-chain-voting.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: {{- toYaml .paths | nindent 10 }} + {{- end }} +{{- end }} diff --git a/on-chain-voting/values.yaml b/on-chain-voting/values.yaml index 4fa50ae7..356350d3 100644 --- a/on-chain-voting/values.yaml +++ b/on-chain-voting/values.yaml @@ -57,29 +57,6 @@ web: # -- The service port port: 3000 - ingress: - # -- Whether to create an Ingress - enabled: false - # -- The Ingress Class Name to use - className: "" - # -- The Ingress Annotations - annotations: - {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - # -- The Ingress Hosts - hosts: - [] - # - host: chart-example.local - # paths: - # - path: / - # pathType: ImplementationSpecific - # -- The TLS configuration - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - # -- Resources resources: {} @@ -234,6 +211,34 @@ server: - -c - sleep 15 && kill -SIGQUIT 1 +ingress: + # -- Whether to create an Ingress + enabled: false + # -- The Ingress Class Name to use + className: "" + # -- The Ingress Annotations + annotations: + {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + # -- The Ingress Hosts + hosts: [] + # - host: chart-example.local + # paths: + # - path: / + # pathType: Prefix + # backend: + # service: + # name: chart-example-web + # port: + # number: 3000 + + # -- The TLS configuration + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + postgresql: # -- Whether to deploy a PostgreSQL server to satisfy the application database requirements create: true