Skip to content

Commit e397c64

Browse files
authored
remove deprecated ingress versions and logic (#506)
Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>
1 parent 18620d2 commit e397c64

6 files changed

Lines changed: 9 additions & 80 deletions

File tree

charts/atlantis/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: v1
33
appVersion: v0.40.0
44
description: A Helm chart for Atlantis https://www.runatlantis.io
55
name: atlantis
6-
version: 5.28.0
6+
version: 6.0.0
77
keywords:
88
- terraform
99
home: https://www.runatlantis.io

charts/atlantis/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ Optionally, set `service.internalTrafficPolicy: Local` or `Cluster` depending on
197197
| image.tag | string | `""` | If not set appVersion field from Chart.yaml is used |
198198
| imagePullSecrets | list | `[]` | Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace. ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/. Check values.yaml for examples. |
199199
| ingress.annotations | object | `{}` | Check values.yaml for examples. |
200-
| ingress.apiVersion | string | `""` | |
201200
| ingress.enabled | bool | `true` | |
202201
| ingress.host | string | `""` | |
203202
| ingress.hosts | list | `[]` | Used when several hosts are required. Check values.yaml for examples. |
@@ -314,7 +313,6 @@ Optionally, set `service.internalTrafficPolicy: Local` or `Cluster` depending on
314313
| volumeClaim.enabled | bool | `true` | |
315314
| volumeClaim.storageClassName | string | `""` | Storage class name (if possible, use a resizable one). |
316315
| webhook_ingress.annotations | object | `{}` | Check values.yaml for examples. |
317-
| webhook_ingress.apiVersion | string | `""` | |
318316
| webhook_ingress.enabled | bool | `false` | When true creates a secondary webhook. |
319317
| webhook_ingress.host | string | `""` | |
320318
| webhook_ingress.hosts | list | `[]` | Used when several hosts are required. Check values.yaml for examples. |

charts/atlantis/templates/ingress.yaml

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
11
{{- if .Values.ingress.enabled }}
2-
{{- $apiVersion := .Values.ingress.apiVersion }}
3-
{{- if and $apiVersion (or (eq $apiVersion "networking.k8s.io/v1") (eq $apiVersion "networking.k8s.io/v1beta1") (eq $apiVersion "extensions/v1beta1")) -}}
4-
{{- else -}}
5-
{{- $kubeVersion := .Capabilities.KubeVersion.GitVersion }}
6-
{{- if semverCompare ">=1.19-0" $kubeVersion -}}
7-
{{- $apiVersion = "networking.k8s.io/v1" -}}
8-
{{- else if semverCompare ">=1.14-0" $kubeVersion -}}
9-
{{- $apiVersion = "networking.k8s.io/v1beta1" -}}
10-
{{- else -}}
11-
{{- $apiVersion = "extensions/v1beta1" -}}
12-
{{- end }}
13-
{{- end }}
142
{{- $fullName := include "atlantis.fullname" . -}}
153
{{- $svcPort := .Values.service.port -}}
164
{{- $pathType := .Values.ingress.pathType -}}
17-
apiVersion: {{ $apiVersion }}
5+
apiVersion: networking.k8s.io/v1
186
kind: Ingress
197
metadata:
208
name: {{ $fullName }}
@@ -52,31 +40,21 @@ spec:
5240
{{- if .Values.ingress.paths }}
5341
{{- range .Values.ingress.paths }}
5442
- path: {{ .path }}
43+
pathType: {{ $.Values.ingress.pathType }}
5544
backend:
56-
{{- if eq $apiVersion "networking.k8s.io/v1" }}
5745
service:
5846
name: {{ .service }}
5947
port:
6048
number: {{ .port }}
61-
pathType: {{ $.Values.ingress.pathType }}
62-
{{- else }}
63-
serviceName: {{ .service }}
64-
servicePort: {{ .port }}
65-
{{- end }}
6649
{{- end }}
6750
{{ else }}
6851
- path: {{ .Values.ingress.path }}
52+
pathType: {{ .Values.ingress.pathType }}
6953
backend:
70-
{{- if eq $apiVersion "networking.k8s.io/v1" }}
7154
service:
7255
name: {{ $fullName }}
7356
port:
7457
number: {{ .Values.service.port }}
75-
pathType: {{ .Values.ingress.pathType }}
76-
{{ else }}
77-
serviceName: {{ $fullName }}
78-
servicePort: {{ .Values.service.port }}
79-
{{- end }}
8058
{{- end }}
8159
{{ else }}
8260
{{- range $k := .Values.ingress.hosts }}
@@ -88,8 +66,8 @@ spec:
8866
paths:
8967
{{- range .paths }}
9068
- path: {{ . }}
69+
pathType: {{ $pathType }}
9170
backend:
92-
{{- if eq $apiVersion "networking.k8s.io/v1" }}
9371
service:
9472
{{- if $k.service }}
9573
name: {{ $k.service }}
@@ -98,15 +76,6 @@ spec:
9876
{{- end }}
9977
port:
10078
number: {{ $svcPort }}
101-
pathType: {{ $pathType }}
102-
{{- else -}}
103-
{{- if $k.service }}
104-
serviceName: {{ $k.service }}
105-
{{- else }}
106-
serviceName: {{ $fullName }}
107-
{{- end }}
108-
servicePort: {{ $svcPort }}
109-
{{- end }}
11079
{{- end }}
11180
{{- end }}
11281
{{- end }}

charts/atlantis/templates/webhook-ingress.yaml

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
11
{{- if .Values.webhook_ingress.enabled }}
2-
{{- $apiVersion := .Values.webhook_ingress.apiVersion }}
3-
{{- if and $apiVersion (or (eq $apiVersion "networking.k8s.io/v1") (eq $apiVersion "networking.k8s.io/v1beta1") (eq $apiVersion "extensions/v1beta1")) -}}
4-
{{- else -}}
5-
{{- $kubeVersion := .Capabilities.KubeVersion.GitVersion }}
6-
{{- if semverCompare ">=1.19-0" $kubeVersion -}}
7-
{{- $apiVersion = "networking.k8s.io/v1" -}}
8-
{{- else if semverCompare ">=1.14-0" $kubeVersion -}}
9-
{{- $apiVersion = "networking.k8s.io/v1beta1" -}}
10-
{{- else -}}
11-
{{- $apiVersion = "extensions/v1beta1" -}}
12-
{{- end }}
13-
{{- end }}
142
{{- $fullName := include "atlantis.fullname" . -}}
153
{{- $svcPort := .Values.service.port -}}
164
{{- $pathType := .Values.webhook_ingress.pathType -}}
17-
apiVersion: {{ $apiVersion }}
5+
apiVersion: networking.k8s.io/v1
186
kind: Ingress
197
metadata:
208
name: {{ $fullName }}-secondary
@@ -52,31 +40,21 @@ spec:
5240
{{- if .Values.webhook_ingress.paths }}
5341
{{- range .Values.webhook_ingress.paths }}
5442
- path: {{ .path }}
43+
pathType: {{ $.Values.webhook_ingress.pathType }}
5544
backend:
56-
{{- if eq $apiVersion "networking.k8s.io/v1" }}
5745
service:
5846
name: {{ .service }}
5947
port:
6048
number: {{ .port }}
61-
pathType: {{ $.Values.webhook_ingress.pathType }}
62-
{{- else }}
63-
serviceName: {{ .service }}
64-
servicePort: {{ .port }}
65-
{{- end }}
6649
{{- end }}
6750
{{ else }}
6851
- path: {{ .Values.webhook_ingress.path }}
52+
pathType: {{ .Values.webhook_ingress.pathType }}
6953
backend:
70-
{{- if eq $apiVersion "networking.k8s.io/v1" }}
7154
service:
7255
name: {{ $fullName }}
7356
port:
7457
number: {{ .Values.service.port }}
75-
pathType: {{ .Values.webhook_ingress.pathType }}
76-
{{ else }}
77-
serviceName: {{ $fullName }}
78-
servicePort: {{ .Values.service.port }}
79-
{{- end }}
8058
{{- end }}
8159
{{ else }}
8260
{{- range $k := .Values.webhook_ingress.hosts }}
@@ -88,8 +66,8 @@ spec:
8866
paths:
8967
{{- range .paths }}
9068
- path: {{ . }}
69+
pathType: {{ $pathType }}
9170
backend:
92-
{{- if eq $apiVersion "networking.k8s.io/v1" }}
9371
service:
9472
{{- if $k.service }}
9573
name: {{ $k.service }}
@@ -98,15 +76,6 @@ spec:
9876
{{- end }}
9977
port:
10078
number: {{ $svcPort }}
101-
pathType: {{ $pathType }}
102-
{{- else -}}
103-
{{- if $k.service }}
104-
serviceName: {{ $k.service }}
105-
{{- else }}
106-
serviceName: {{ $fullName }}
107-
{{- end }}
108-
servicePort: {{ $svcPort }}
109-
{{- end }}
11079
{{- end }}
11180
{{- end }}
11281
{{- end }}

charts/atlantis/values.schema.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -718,11 +718,6 @@
718718
"default": null,
719719
"description": "Name of the ingress class to use for the Ingress."
720720
},
721-
"apiVersion": {
722-
"type": "string",
723-
"description": "The Kubernetes API version used for configuring ingress. If not specified, Helm tries to automatically determine a compatible version based on the cluster's capabilities. The default value is \"\" and is only accepted if it is one of the supported versions: `networking.k8s.io/v1`, `networking.k8s.io/v1beta1`, or `extensions/v1beta1`. In cases where Helm can't determine the cluster's capabilities automatically, this value can be used to override the API version. Setting an unsupported value will result in an error during the Helm chart installation.",
724-
"default": ""
725-
},
726721
"annotations": {
727722
"type": "object",
728723
"description": "Additional annotations to use for the Ingress.",

charts/atlantis/values.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ statefulSet:
342342
ingress:
343343
enabled: true
344344
ingressClassName:
345-
apiVersion: ""
346345
labels: {}
347346
# -- Check values.yaml for examples.
348347
annotations: {}
@@ -381,7 +380,6 @@ webhook_ingress:
381380
# -- When true creates a secondary webhook.
382381
enabled: false
383382
ingressClassName:
384-
apiVersion: ""
385383
# -- Check values.yaml for examples.
386384
annotations: {}
387385
# annotations:

0 commit comments

Comments
 (0)