Skip to content

Commit fd452b1

Browse files
authored
Merge pull request #256 from tssurya/bump-kube-1.31
Bump to 1.31.2 kube
2 parents 825ded8 + 483d905 commit fd452b1

35 files changed

+308
-813
lines changed

.github/workflows/conformance.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ on:
1111
workflow_dispatch:
1212

1313
env:
14-
GO_VERSION: "1.22.0"
15-
K8S_VERSION: "v1.29.2"
16-
KIND_VERSION: "v0.22.0"
14+
GO_VERSION: "1.23"
15+
K8S_VERSION: "v1.31.2"
16+
KIND_VERSION: "v0.25.0"
1717
IMAGE_NAME: registry.k8s.io/networking/kube-network-policies
1818
KIND_CLUSTER_NAME: kind
1919

@@ -79,7 +79,7 @@ jobs:
7979
/usr/local/bin/kubectl apply -f ./config/crd/experimental/policy.networking.k8s.io_adminnetworkpolicies.yaml
8080
/usr/local/bin/kubectl apply -f ./config/crd/experimental/policy.networking.k8s.io_baselineadminnetworkpolicies.yaml
8181
# install kube-network-policies
82-
/usr/local/bin/kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/kube-network-policies/v0.2.0/install-anp.yaml
82+
/usr/local/bin/kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/kube-network-policies/v0.6.1/install-anp.yaml
8383
8484
- name: Get Cluster status
8585
run: |
@@ -93,7 +93,7 @@ jobs:
9393
- name: Run tests
9494
run: |
9595
go mod download
96-
go test -v ./conformance -run TestConformanceProfiles -args --conformance-profiles=AdminNetworkPolicy,BaselineAdminNetworkPolicy --organization=kubernetes --project=kube-network-policies --url=https://github.com/kubernetes-sigs/kube-network-policies --version=0.2.0 [email protected] --additional-info=https://github.com/kubernetes-sigs/kube-network-policies
96+
go test -v ./conformance -run TestConformanceProfiles -args --conformance-profiles=AdminNetworkPolicy,BaselineAdminNetworkPolicy --organization=kubernetes --project=kube-network-policies --url=https://github.com/kubernetes-sigs/kube-network-policies --version=0.6.1 [email protected] --additional-info=https://github.com/kubernetes-sigs/kube-network-policies
9797
9898
- name: Upload Junit Reports
9999
if: always()

apis/v1alpha1/shared_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ type AdminNetworkPolicyPort struct {
7777
type Port struct {
7878
// Protocol is the network protocol (TCP, UDP, or SCTP) which traffic must
7979
// match. If not specified, this field defaults to TCP.
80+
// +kubebuilder:default=TCP
8081
//
8182
// Support: Core
8283
//
@@ -96,6 +97,7 @@ type Port struct {
9697
type PortRange struct {
9798
// Protocol is the network protocol (TCP, UDP, or SCTP) which traffic must
9899
// match. If not specified, this field defaults to TCP.
100+
// +kubebuilder:default=TCP
99101
//
100102
// Support: Core
101103
//
@@ -145,8 +147,6 @@ type AdminNetworkPolicyIngressPeer struct {
145147
}
146148

147149
// CIDR is an IP address range in CIDR notation (for example, "10.0.0.0/8" or "fd00::/8").
148-
// This string must be validated by implementations using net.ParseCIDR
149-
// TODO: Introduce CEL CIDR validation regex isCIDR() in Kube 1.31 when it is available.
150-
// +kubebuilder:validation:XValidation:rule="self.contains(':') != self.contains('.')",message="CIDR must be either an IPv4 or IPv6 address. IPv4 address embedded in IPv6 addresses are not supported"
150+
// +kubebuilder:validation:XValidation:rule="isCIDR(self)",message="Invalid CIDR format provided"
151151
// +kubebuilder:validation:MaxLength=43
152152
type CIDR string

0 commit comments

Comments
 (0)