Skip to content

Commit

Permalink
Merge pull request #6 from loichenninger/maj-ingress-pogues
Browse files Browse the repository at this point in the history
Upgrade to ingress v1
  • Loading branch information
bwerquin authored Dec 21, 2021
2 parents b20b294 + 7c1f6a7 commit 6b3e979
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
8 changes: 4 additions & 4 deletions charts/pogues/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: pogues
description: A Helm chart for Kubernetes

dependencies:
- name: postgresql
version: 10.3.11
repository: https://charts.bitnami.com/bitnami
- name: postgresql
version: 10.3.11
repository: https://charts.bitnami.com/bitnami

# A chart can be either an 'application' or a 'library' chart.
#
Expand All @@ -20,7 +20,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.1.0
version: 0.1.1

# 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
Expand Down
13 changes: 6 additions & 7 deletions charts/pogues/templates/api/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{{- if .Values.api.ingress.enabled -}}
{{- $fullName := include "pogues.api.fullname" . -}}
{{- $svcPort := .Values.api.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
Expand Down Expand Up @@ -33,9 +29,12 @@ spec:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: Prefix
backend:
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
13 changes: 6 additions & 7 deletions charts/pogues/templates/ui/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{{- if .Values.ui.ingress.enabled -}}
{{- $fullName := include "pogues.ui.fullname" . -}}
{{- $svcPort := .Values.ui.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
Expand Down Expand Up @@ -33,9 +29,12 @@ spec:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: Prefix
backend:
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 6b3e979

Please sign in to comment.