Skip to content

Commit

Permalink
Bump to k8s 1.31
Browse files Browse the repository at this point in the history
For go-controller:

go get k8s.io/api v0.31.1
go get k8s.io/apimachinery v0.31.1
go get k8s.io/client-go v0.31.1
go get k8s.io/component-helpers v0.31.1
go get k8s.io/kubernetes v1.31.1
go get k8s.io/apiextensions-apiserver v0.31.1 // indirect
go get k8s.io/component-base v0.31.1 // indirect
go get sigs.k8s.io/controller-runtime v0.19.0
go mod vendor && go mod tidy

Fixed API changes
Fixed linting
Updated codegen

For e2e tests:

go get k8s.io/api v0.31.1
go get k8s.io/apimachinery v0.31.1
go get k8s.io/client-go v0.31.1
go get k8s.io/kubernetes v1.31.1
go get k8s.io/pod-security-admission v0.31.1
go get k8s.io/apiextensions-apiserver v0.31.1
go get k8s.io/apiserver v0.31.1
go get k8s.io/cloud-provider v0.31.1
go get k8s.io/component-base v0.31.1
go get k8s.io/component-helpers v0.31.1
go get k8s.io/controller-manager v0.31.1
go get k8s.io/kms v0.31.1
go get k8s.io/kubelet v0.31.1
go get k8s.io/kubectl v0.31.1
go get github.com/ovn-org/ovn-kubernetes/go-controller
go mod tidy

(konnectivity-client is not at 0.31 yet)

Had to add the same replace rule for go-iptable as we have in
go-controller

Fixed API changes

Signed-off-by: Jaime Caamaño Ruiz <[email protected]>
  • Loading branch information
jcaamano committed Oct 8, 2024
1 parent 956f8fa commit 085bc2e
Show file tree
Hide file tree
Showing 1,964 changed files with 61,023 additions and 60,504 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:

env:
GO_VERSION: 1.22.0
K8S_VERSION: v1.30.2
K8S_VERSION: v1.31.0
KIND_CLUSTER_NAME: ovn
KIND_INSTALL_INGRESS: true
KIND_ALLOW_SYSTEM_WRITES: true
Expand Down
2 changes: 1 addition & 1 deletion contrib/kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ set_default_params() {
fi
RUN_IN_CONTAINER=${RUN_IN_CONTAINER:-false}
KIND_IMAGE=${KIND_IMAGE:-kindest/node}
K8S_VERSION=${K8S_VERSION:-v1.30.2}
K8S_VERSION=${K8S_VERSION:-v1.31.0}
OVN_GATEWAY_MODE=${OVN_GATEWAY_MODE:-shared}
KIND_INSTALL_INGRESS=${KIND_INSTALL_INGRESS:-false}
KIND_INSTALL_METALLB=${KIND_INSTALL_METALLB:-false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.3
name: adminpolicybasedexternalroutes.k8s.ovn.org
spec:
group: k8s.ovn.org
Expand Down Expand Up @@ -85,11 +85,13 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
Expand Down Expand Up @@ -154,11 +156,13 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
Expand Down Expand Up @@ -205,11 +209,13 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
Expand Down
16 changes: 8 additions & 8 deletions dist/templates/k8s.ovn.org_egressfirewalls.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.3
name: egressfirewalls.k8s.ovn.org
spec:
group: k8s.ovn.org
Expand Down Expand Up @@ -93,13 +93,11 @@ spec:
be unset.
type: string
dnsName:
description: dnsName is the domain name to allow/deny traffic
to. If this is set, cidrSelector and nodeSelector must
be unset. For a wildcard DNS name, the '*' will match
only one label. Additionally, only a single '*' can be
used at the beginning of the wildcard DNS name. For example,
'*.example.com' will match 'sub1.example.com' but won't
match 'sub2.sub1.example.com'.
description: |-
dnsName is the domain name to allow/deny traffic to. If this is set, cidrSelector and nodeSelector must be unset.
For a wildcard DNS name, the '*' will match only one label. Additionally, only a single '*' can be
used at the beginning of the wildcard DNS name. For example, '*.example.com' will match 'sub1.example.com'
but won't match 'sub2.sub1.example.com'.
pattern: ^(\*\.)?([A-Za-z0-9-]+\.)*[A-Za-z0-9-]+\.?$
type: string
nodeSelector:
Expand Down Expand Up @@ -133,11 +131,13 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
Expand Down
6 changes: 5 additions & 1 deletion dist/templates/k8s.ovn.org_egressips.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.3
name: egressips.k8s.ovn.org
spec:
group: k8s.ovn.org
Expand Down Expand Up @@ -92,11 +92,13 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
Expand Down Expand Up @@ -143,11 +145,13 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
Expand Down
23 changes: 6 additions & 17 deletions dist/templates/k8s.ovn.org_egressqoses.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.3
name: egressqoses.k8s.ovn.org
spec:
group: k8s.ovn.org
Expand Down Expand Up @@ -101,11 +101,13 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
Expand All @@ -130,16 +132,8 @@ spec:
description: An array of condition objects indicating details about
status of EgressQoS object.
items:
description: "Condition contains details for one aspect of the current
state of this API Resource.\n---\nThis struct is intended for
direct use as an array at the field path .status.conditions. For
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
observations of a foo's current state.\n\t // Known .status.conditions.type
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
\ // other fields\n\t}"
description: Condition contains details for one aspect of the current
state of this API Resource.
properties:
lastTransitionTime:
description: |-
Expand Down Expand Up @@ -180,12 +174,7 @@ spec:
- Unknown
type: string
type:
description: |-
type of condition in CamelCase or in foo.example.com/CamelCase.
---
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
useful (see .node.status.conditions), the ability to deconflict is important.
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
Expand Down
4 changes: 3 additions & 1 deletion dist/templates/k8s.ovn.org_egressservices.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.3
name: egressservices.k8s.ovn.org
spec:
group: k8s.ovn.org
Expand Down Expand Up @@ -84,11 +84,13 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
Expand Down
34 changes: 7 additions & 27 deletions dist/templates/k8s.ovn.org_userdefinednetworks.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.3
name: userdefinednetworks.k8s.ovn.org
spec:
group: k8s.ovn.org
Expand Down Expand Up @@ -46,7 +46,6 @@ spec:
description: |-
IPAMLifecycle controls IP addresses management lifecycle.


The only allowed value is Persistent. When set, OVN Kubernetes assigned IP addresses will be persisted in an
`ipamclaims.k8s.cni.cncf.io` object. These IP addresses will be reused by other pods if requested.
Only supported when "subnets" are set.
Expand All @@ -57,7 +56,6 @@ spec:
description: |-
JoinSubnets are used inside the OVN network topology.


Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed.
This field is only allowed for "Primary" network.
It is not recommended to set this field without explicit need and understanding of the OVN network topology.
Expand All @@ -79,7 +77,6 @@ spec:
description: |-
Role describes the network role in the pod.


Allowed value is "Secondary".
Secondary network is only assigned to pods that use `k8s.v1.cni.cncf.io/networks` annotation to select given network.
enum:
Expand All @@ -91,7 +88,6 @@ spec:
Subnets are used for the pod network across the cluster.
Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed.


The format should match standard CIDR notation (for example, "10.128.0.0/16").
This field may be omitted. In that case the logical switch implementing the network only provides layer 2 communication,
and users must configure IP addresses for the pods. As a consequence, Port security only prevents MAC spoofing.
Expand Down Expand Up @@ -120,7 +116,6 @@ spec:
description: |-
JoinSubnets are used inside the OVN network topology.


Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed.
This field is only allowed for "Primary" network.
It is not recommended to set this field without explicit need and understanding of the OVN network topology.
Expand All @@ -134,7 +129,6 @@ spec:
description: |-
MTU is the maximum transmission unit for a network.


MTU is optional, if not provided, the globally configured value in OVN-Kubernetes (defaults to 1400) is used for the network.
format: int32
maximum: 65536
Expand All @@ -144,7 +138,6 @@ spec:
description: |-
Role describes the network role in the pod.


Allowed values are "Primary" and "Secondary".
Primary network is automatically assigned to every pod created in the same namespace.
Secondary network is only assigned to pods that use `k8s.v1.cni.cncf.io/networks` annotation to select given network.
Expand All @@ -156,7 +149,6 @@ spec:
description: |-
Subnets are used for the pod network across the cluster.


Dual-stack clusters may set 2 subnets (one for each IP family), otherwise only 1 subnet is allowed.
Given subnet is split into smaller subnets for every node.
items:
Expand All @@ -169,18 +161,20 @@ spec:
description: |-
HostSubnet specifies the subnet size for every node.


When not set, it will be assigned automatically.
format: int32
maximum: 127
minimum: 1
type: integer
required:
- cidr
type: object
maxItems: 2
minItems: 1
type: array
required:
- role
- subnets
type: object
x-kubernetes-validations:
- message: Subnets is required for Layer3 topology
Expand All @@ -192,7 +186,6 @@ spec:
description: |-
Topology describes network configuration.


Allowed values are "Layer3", "Layer2".
Layer3 topology creates a layer 2 segment per node, each with a different subnet. Layer 3 routing is used to interconnect node subnets.
Layer2 topology creates one logical switch shared by all nodes.
Expand Down Expand Up @@ -220,16 +213,8 @@ spec:
properties:
conditions:
items:
description: "Condition contains details for one aspect of the current
state of this API Resource.\n---\nThis struct is intended for
direct use as an array at the field path .status.conditions. For
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
observations of a foo's current state.\n\t // Known .status.conditions.type
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
\ // other fields\n\t}"
description: Condition contains details for one aspect of the current
state of this API Resource.
properties:
lastTransitionTime:
description: |-
Expand Down Expand Up @@ -270,12 +255,7 @@ spec:
- Unknown
type: string
type:
description: |-
type of condition in CamelCase or in foo.example.com/CamelCase.
---
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
useful (see .node.status.conditions), the ability to deconflict is important.
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
Expand Down
2 changes: 1 addition & 1 deletion docs/ci/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ and set the environmental variable `K8S_VERSION` to the same value. Also make su
your go directory with `export GOPATH=(...)`.

```
K8S_VERSION=v1.30.2
K8S_VERSION=v1.31.0
git clone --single-branch --branch $K8S_VERSION https://github.com/kubernetes/kubernetes.git $GOPATH/src/k8s.io/kubernetes/
pushd $GOPATH/src/k8s.io/kubernetes/
make WHAT="test/e2e/e2e.test vendor/github.com/onsi/ginkgo/ginkgo cmd/kubectl"
Expand Down
Loading

0 comments on commit 085bc2e

Please sign in to comment.