Skip to content

Commit

Permalink
change helm chart and azure pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-kapishev committed Aug 4, 2022
1 parent e78eadd commit 37238fd
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 53 deletions.
11 changes: 2 additions & 9 deletions .azure/pipelines/frontend-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,10 @@ trigger: none
pr: none

pool:
vmImage: "ubuntu-20.04"

parameters:
- name: Environment
type: string
default: TEST
values:
- TEST
vmImage: "ubuntu-latest"

variables:
- group: anfisa-frontend-${{ parameters.Environment }}
- group: anfisa-ACR

jobs:

Expand Down
15 changes: 0 additions & 15 deletions helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
Expand All @@ -23,9 +17,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
Expand All @@ -50,19 +42,12 @@ spec:
number: 80
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
27 changes: 0 additions & 27 deletions helm/templates/route.yml

This file was deleted.

27 changes: 27 additions & 0 deletions helm/templates/route.yml.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# {{- if .Values.ingress.enabled -}}
# {{- $fullName := include "anfisa-front.fullname" . -}}
# {{- $svcPort := .Values.service.port -}}
# apiVersion: route.openshift.io/v1
# kind: Route
# metadata:
# name: {{ include "anfisa-front.fullname" . }}
# labels:
# {{- include "anfisa-front.labels" . | nindent 4 }}
# spec:
# {{- range .Values.ingress.hosts }}
# host: {{ .host | quote }}
# {{- range .paths }}
# path: {{ .path }}
# {{- end }}
# to:
# kind: Service
# name: {{ $fullName }}
# weight: 100
# port:
# targetPort: 80
# tls:
# insecureEdgeTerminationPolicy: Allow
# termination: edge
# wildcardPolicy: None
# {{- end }}
# {{- end }}
4 changes: 2 additions & 2 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ service:
ingress:
enabled: true
className: ""
annotations: {}
# cert-manager.io/cluster-issuer: letsencrypt-prod
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
Expand Down

0 comments on commit 37238fd

Please sign in to comment.