Skip to content

Commit 016dd0f

Browse files
authored
chore(helm): AS-711 remove support for old kubernetes versions (#395)
1 parent 0ac61a4 commit 016dd0f

6 files changed

Lines changed: 6 additions & 43 deletions

File tree

helm/fiftyone-teams-app/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ type: application
99
version: 2.9.0
1010
appVersion: "v2.9.0"
1111
icon: https://voxel51.com/images/logo/voxel51-logo-horz-color-600dpi.png
12-
kubeVersion: ">=1.18-0"
12+
kubeVersion: ">=1.30-0"

helm/fiftyone-teams-app/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Helm and Kubectl must be installed and configured on your machine.
122122

123123
The following kubernetes/kubectl versions are required:
124124

125-
Kubernetes: `>=1.18-0`
125+
Kubernetes: `>=1.30-0`
126126

127127
However, it is recommended to use a
128128
[supported kubernetes version](https://kubernetes.io/releases/).
@@ -658,7 +658,7 @@ follow
658658
| imagePullSecrets | list | `[]` | Container image registry keys. [Reference][image-pull-secrets]. |
659659
| ingress.annotations | object | `{}` | Ingress annotations. [Reference][annotations]. |
660660
| ingress.api | object | `{"path":"/*","pathType":"ImplementationSpecific"}` | The ingress rule values for teams-api, when `apiSettings.dnsName` is not empty. [Reference][ingress-rules]. |
661-
| ingress.className | string | `""` | Name of the ingress class. When empty, a default Ingress class should be defined. When not empty and Kubernetes version is >1.18.0, this value will be the Ingress class name. [Reference][ingress-default-ingress-class] |
661+
| ingress.className | string | `""` | Name of the ingress class. When empty, a default Ingress class should be defined. When not empty, this value will be the Ingress class name. [Reference][ingress-default-ingress-class] |
662662
| ingress.enabled | bool | `true` | Controls whether to create the ingress. When `false`, uses a pre-existing ingress. [Reference][ingress]. |
663663
| ingress.labels | object | `{}` | Additional labels for the ingress. [Reference][labels-and-selectors]. |
664664
| ingress.paths | list | `[{"path":"/cas","pathType":"Prefix","serviceName":"teams-cas","servicePort":80},{"path":"/*","pathType":"ImplementationSpecific","serviceName":"teams-app","servicePort":80}]` | Additional ingress rules for the host `teamsAppSettings.dnsName` for the chart managed ingress (when `ingress.enabled: true`). [Reference][ingress-rules]. |

helm/fiftyone-teams-app/templates/NOTES.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,5 @@
55
https://helm.fiftyone.ai for details.
66
{{ end }}
77

8-
{{- if (semverCompare "<1.28-0" .Capabilities.KubeVersion.GitVersion) }}
9-
[WARN] You are running an older version of kubernetes!
10-
Currently supported versions of Kubernetes are described at the following link:
11-
https://kubernetes.io/releases/
12-
{{ end }}
13-
148
Visit the following URL to access your FiftyOne Enterprise application:
159
http{{ if $.Values.ingress.tlsEnabled }}s{{ end }}://{{ .Values.teamsAppSettings.dnsName }}
Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
{{- if .Values.ingress.enabled -}}
22
{{- $fullName := include "fiftyone-teams-app.fullname" . -}}
3-
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
3+
{{- if .Values.ingress.className }}
44
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
55
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
66
{{- end }}
77
{{- end }}
8-
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
98
apiVersion: networking.k8s.io/v1
10-
{{- else -}}
11-
apiVersion: networking.k8s.io/v1beta1
12-
{{- end }}
139
kind: Ingress
1410
metadata:
1511
name: {{ $fullName }}
@@ -21,7 +17,7 @@ metadata:
2117
{{- toYaml . | nindent 4 }}
2218
{{- end }}
2319
spec:
24-
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
20+
{{- if .Values.ingress.className }}
2521
ingressClassName: {{ .Values.ingress.className }}
2622
{{- end }}
2723
defaultBackend:
@@ -45,53 +41,32 @@ spec:
4541
{{- if and .Values.ingress.paths (gt (len .Values.ingress.paths) 1) }}
4642
{{- range .Values.ingress.paths }}
4743
- path: {{ .path }}
48-
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
4944
pathType: {{ .pathType }}
50-
{{- end }}
5145
backend:
52-
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
5346
service:
5447
name: {{ .serviceName }}
5548
port:
5649
number: {{ .servicePort }}
57-
{{- else }}
58-
serviceName: {{ .serviceName }}
59-
servicePort: {{ .servicePort }}
60-
{{- end }}
6150
{{- end }}
6251
{{- else }}
6352
- path: {{ .Values.ingress.teamsApp.path }}
64-
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
6553
pathType: {{ .Values.ingress.teamsApp.pathType }}
66-
{{- end }}
6754
backend:
68-
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
6955
service:
7056
name: {{ include "teams-app.name" . }}
7157
port:
7258
number: {{ .Values.teamsAppSettings.service.port }}
73-
{{- else }}
74-
serviceName: {{ include "teams-app.name" . }}
75-
servicePort: {{ .Values.teamsAppSettings.service.port }}
76-
{{- end }}
7759
{{- end }}
7860
{{- if .Values.apiSettings.dnsName }}
7961
- host: {{ .Values.apiSettings.dnsName | quote }}
8062
http:
8163
paths:
8264
- path: {{ .Values.ingress.api.path }}
83-
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
8465
pathType: {{ .Values.ingress.api.pathType }}
85-
{{- end }}
8666
backend:
87-
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
8867
service:
8968
name: {{ include "teams-api.name" . }}
9069
port:
9170
number: {{ .Values.apiSettings.service.port }}
92-
{{- else }}
93-
serviceName: {{ include "teams-api.name" . }}
94-
servicePort: {{ .Values.apiSettings.service.port }}
95-
{{- end }}
9671
{{- end }}
9772
{{- end }}

helm/fiftyone-teams-app/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ ingress:
649649
pathType: ImplementationSpecific
650650

651651
# -- Name of the ingress class. When empty, a default Ingress class should be defined.
652-
# When not empty and Kubernetes version is >1.18.0, this value will be the Ingress class name.
652+
# When not empty, this value will be the Ingress class name.
653653
# [Reference][ingress-default-ingress-class]
654654
className: ""
655655
# -- Controls whether to create the ingress. When `false`, uses a pre-existing ingress.

tests/unit/helm/ingress_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ func (s *ingressTemplateTest) TestApiVersion() {
124124
}
125125
}
126126

127-
// TODO: Unit Test with different k8s versions
128-
// Given kubernetes version > 1.18-0, when ingress.className is not "" and `ingress.annotations` does not have key `"kubernetes.io/ingress.class"`, then set values.ingress.annotations `"kubernetes.io/ingress.class": {{ .Values.ingress.className }}`
129127
func (s *ingressTemplateTest) TestMetadataAnnotations() {
130128
testCases := []struct {
131129
name string
@@ -317,8 +315,6 @@ func (s *ingressTemplateTest) TestMetadataNamespace() {
317315
}
318316
}
319317

320-
// TODO: Unit Test with different k8s versions
321-
// Given kubernetes version <1.18-0, when ingress.className is set, then `spec` should not contain `ingressClassName`
322318
func (s *ingressTemplateTest) TestIngressClassName() {
323319
testCases := []struct {
324320
name string
@@ -437,8 +433,6 @@ func (s *ingressTemplateTest) TestTls() {
437433
}
438434
}
439435

440-
// TODO: Resume here. Add test cases to cover all of the variants of the rules
441-
// TODO: Test k8s versions when 1.18-0 and 1.19-0
442436
func (s *ingressTemplateTest) TestRules() {
443437
testCases := []struct {
444438
name string

0 commit comments

Comments
 (0)