Skip to content

Commit 462d6ab

Browse files
committed
support k8s 1.21 - 1.23
i.e., drop support for k8s 1.17 - 1.20, add support for k8s 1.22 - 1.23 (and likely future versions until something breaks) upgrade go to 1.17 and k8s.io dependencies, controller-runtime, vk, and minor dependencies to latest package versions, luckily cross-compatible (we might have still supported k8s 1.19 - 1.20 with older versions; not worth the maintenance cost) k8s 1.20- aren't supported anymore because schedulers watch PodDisruptionBudgets using the policy/v1 API version, available since v1.21 use the certificates.k8s.io/v1 API version for CertificateSigningRequest use the networking.k8s.io/v1 API version for Ingress use the coordination.k8s.io/v1 API version for Lease upgrade cert-manager, argo, and our own CRDs and webhook configuration because 1.22 dropped support for admissionregistration.k8s.io/v1beta1 and apiextensions.k8s.io/v1beta1 move CRDs to templates/ (from crds/, which is actually meant for CRDs that have objects created in the same chart) so they're updated on helm upgrades (cert-manager did the same move) upgrade to go 1.17 Signed-off-by: adrienjt <[email protected]>
1 parent f5ca94e commit 462d6ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1605
-887
lines changed

.github/workflows/go.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
strategy:
5353
fail-fast: false
5454
matrix:
55-
k8s_version: [ "1.17", "1.18", "1.19", "1.20", "1.21" ]
55+
k8s_version: [ "1.21", "1.22", "1.23" ]
5656
experimental: [ false ]
5757
# workflow succeeds even if experimental job fails,
5858
# but commit/PR check/status still appears as failure overall,

charts/multicluster-scheduler/crds/clustersource.yaml

-18
This file was deleted.

charts/multicluster-scheduler/crds/clustersummary.yaml

-18
This file was deleted.

charts/multicluster-scheduler/crds/clustertarget.yaml

-18
This file was deleted.

charts/multicluster-scheduler/crds/podchaperon.yaml

-25
This file was deleted.

charts/multicluster-scheduler/crds/source.yaml

-18
This file was deleted.

charts/multicluster-scheduler/crds/target.yaml

-18
This file was deleted.

charts/multicluster-scheduler/templates/cert.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: cert-manager.io/v1alpha2
1+
apiVersion: cert-manager.io/v1
22
kind: Certificate
33
metadata:
44
name: {{ include "fullname" . }}

charts/multicluster-scheduler/templates/cm.yaml

+4-19
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
labels: {{ include "labels" . | nindent 4 }}
66
data:
77
proxy-scheduler-config: |
8-
apiVersion: kubescheduler.config.k8s.io/v1alpha2
8+
apiVersion: kubescheduler.config.k8s.io/v1beta3
99
kind: KubeSchedulerConfiguration
1010
leaderElection:
1111
leaderElect: true
@@ -15,20 +15,11 @@ data:
1515
profiles:
1616
- schedulerName: admiralty-proxy
1717
plugins:
18-
filter:
19-
enabled:
20-
- name: proxy
21-
reserve:
22-
enabled:
23-
- name: proxy
24-
preBind:
25-
enabled:
26-
- name: proxy
27-
postBind:
18+
multiPoint:
2819
enabled:
2920
- name: proxy
3021
candidate-scheduler-config: |
31-
apiVersion: kubescheduler.config.k8s.io/v1alpha2
22+
apiVersion: kubescheduler.config.k8s.io/v1beta3
3223
kind: KubeSchedulerConfiguration
3324
leaderElection:
3425
leaderElect: true
@@ -38,12 +29,6 @@ data:
3829
profiles:
3930
- schedulerName: admiralty-candidate
4031
plugins:
41-
preFilter:
42-
enabled:
43-
- name: candidate
44-
reserve:
45-
enabled:
46-
- name: candidate
47-
preBind:
32+
multiPoint:
4833
enabled:
4934
- name: candidate

charts/multicluster-scheduler/templates/cr.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ rules:
154154
resources:
155155
- leases # only needed in kube-node-leases namespaces (TODO: split and bind in RoleBinding)
156156
verbs:
157+
- get
157158
- create
158159
- update
159160
- delete
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
name: clustersources.multicluster.admiralty.io
6+
labels: {{ include "labels" . | nindent 4 }}
7+
spec:
8+
group: multicluster.admiralty.io
9+
names:
10+
kind: ClusterSource
11+
plural: clustersources
12+
shortNames:
13+
- csrc
14+
scope: Cluster
15+
versions:
16+
- name: v1alpha1
17+
served: true
18+
storage: true
19+
subresources:
20+
status: { }
21+
schema:
22+
openAPIV3Schema:
23+
type: object
24+
properties:
25+
spec:
26+
type: object
27+
properties:
28+
userName:
29+
type: string
30+
serviceAccount:
31+
type: object
32+
properties:
33+
name:
34+
type: string
35+
namespace:
36+
type: string
37+
status:
38+
type: object
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
name: clustersummaries.multicluster.admiralty.io
6+
labels: {{ include "labels" . | nindent 4 }}
7+
spec:
8+
group: multicluster.admiralty.io
9+
names:
10+
kind: ClusterSummary
11+
plural: clustersummaries
12+
shortNames:
13+
- mcsum
14+
scope: Cluster
15+
versions:
16+
- name: v1alpha1
17+
served: true
18+
storage: true
19+
subresources:
20+
status: { }
21+
schema:
22+
openAPIV3Schema:
23+
type: object
24+
properties:
25+
capacity:
26+
type: object
27+
additionalProperties:
28+
x-kubernetes-int-or-string: true
29+
allocatable:
30+
type: object
31+
additionalProperties:
32+
x-kubernetes-int-or-string: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
name: clustertargets.multicluster.admiralty.io
6+
labels: {{ include "labels" . | nindent 4 }}
7+
spec:
8+
group: multicluster.admiralty.io
9+
names:
10+
kind: ClusterTarget
11+
plural: clustertargets
12+
shortNames:
13+
- ctg
14+
scope: Cluster
15+
versions:
16+
- name: v1alpha1
17+
served: true
18+
storage: true
19+
subresources:
20+
status: { }
21+
schema:
22+
openAPIV3Schema:
23+
type: object
24+
properties:
25+
spec:
26+
type: object
27+
properties:
28+
self:
29+
type: boolean
30+
kubeconfigSecret:
31+
type: object
32+
properties:
33+
name:
34+
type: string
35+
namespace:
36+
type: string
37+
key:
38+
type: string
39+
context:
40+
type: string
41+
excludedLabelsRegexp:
42+
type: string
43+
status:
44+
type: object
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
name: podchaperons.multicluster.admiralty.io
6+
labels: {{ include "labels" . | nindent 4 }}
7+
spec:
8+
group: multicluster.admiralty.io
9+
names:
10+
kind: PodChaperon
11+
plural: podchaperons
12+
shortNames:
13+
- chap
14+
scope: Namespaced
15+
versions:
16+
- name: v1alpha1
17+
served: true
18+
storage: true
19+
subresources:
20+
status: { }
21+
schema:
22+
openAPIV3Schema:
23+
type: object
24+
properties:
25+
spec:
26+
type: object
27+
x-kubernetes-preserve-unknown-fields: true
28+
# TODO generate
29+
status:
30+
type: object
31+
x-kubernetes-preserve-unknown-fields: true
32+
# TODO generate
33+
additionalPrinterColumns:
34+
- name: reserved
35+
type: string
36+
jsonPath: .metadata.annotations.multicluster\.admiralty\.io/is-reserved
37+
- name: allowed
38+
type: string
39+
jsonPath: .metadata.annotations.multicluster\.admiralty\.io/is-allowed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
name: sources.multicluster.admiralty.io
6+
labels: {{ include "labels" . | nindent 4 }}
7+
spec:
8+
group: multicluster.admiralty.io
9+
names:
10+
kind: Source
11+
plural: sources
12+
shortNames:
13+
- src
14+
scope: Namespaced
15+
versions:
16+
- name: v1alpha1
17+
served: true
18+
storage: true
19+
subresources:
20+
status: { }
21+
schema:
22+
openAPIV3Schema:
23+
type: object
24+
properties:
25+
spec:
26+
type: object
27+
properties:
28+
userName:
29+
type: string
30+
serviceAccountName:
31+
type: string
32+
status:
33+
type: object

0 commit comments

Comments
 (0)