Skip to content

Commit

Permalink
Support Kubernetes 1.29
Browse files Browse the repository at this point in the history
Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
  • Loading branch information
toshipp committed May 10, 2024
1 parent d7d81c8 commit 2096240
Show file tree
Hide file tree
Showing 24 changed files with 276 additions and 365 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e-k8s-incluster-lvmd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes_versions: ["1.28.0", "1.27.3", "1.26.6"]
kubernetes_versions: ["1.29.2", "1.28.7", "1.27.11"]
test_lvmd_type: ["daemonset", "embedded"]
env:
KUBERNETES_VERSION: ${{ matrix.kubernetes_versions }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-k8s-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes_versions: ["1.28.0", "1.27.3", "1.26.6"]
kubernetes_versions: ["1.29.2", "1.28.7", "1.27.11"]
env:
KUBERNETES_VERSION: ${{ matrix.kubernetes_versions }}
TEST_SCHEDULER_EXTENDER_TYPE: ${{ inputs.test_scheduler_extender_type }}
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
run:
deadline: 5m
timeout: 5m
allow-parallel-runners: true

issues:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build topolvm
FROM --platform=$BUILDPLATFORM golang:1.20-bullseye AS build-topolvm
FROM --platform=$BUILDPLATFORM golang:1.22-bullseye AS build-topolvm

# Get argument
ARG TOPOLVM_VERSION
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ install-kind: | $(BINDIR)
.PHONY: install-container-structure-test
install-container-structure-test: | $(BINDIR)
$(CURL) -o $(CONTAINER_STRUCTURE_TEST) \
https://storage.googleapis.com/container-structure-test/v$(CONTAINER_STRUCTURE_TEST_VERSION)/container-structure-test-linux-amd64 \
https://github.com/GoogleContainerTools/container-structure-test/releases/download/v$(CONTAINER_STRUCTURE_TEST_VERSION)/container-structure-test-linux-amd64 \
&& chmod +x $(CONTAINER_STRUCTURE_TEST)

.PHONY: install-helm
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ It can be considered as a specific implementation of [local persistent volumes](

Our supported platform are:

- Kubernetes: 1.28, 1.27, 1.26
- Kubernetes: 1.29, 1.28, 1.27
- Node OS: Linux with LVM2 (\*1)
- CPU Architecture: x86 (\*2), arm64 (\*3), ppc64le (\*3)
- Filesystems: ext4, xfs, btrfs(experimental)
Expand Down
20 changes: 18 additions & 2 deletions charts/topolvm/templates/controller/clusterroles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ rules:
# verbs: ["get", "list"]
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
verbs: ["get", "list", "watch", "create", "patch", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
Expand Down Expand Up @@ -101,6 +101,10 @@ rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
# only required if enabling the alpha volume modify feature
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattributesclasses"]
verbs: ["get", "list", "watch"]
---
# Copied from https://github.com/kubernetes-csi/external-snapshotter/blob/master/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml
kind: ClusterRole
Expand All @@ -123,9 +127,21 @@ rules:
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots"]
verbs: ["get", "list", "watch", "update", "patch", "create"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents"]
verbs: ["get", "list", "watch", "update", "patch"]
verbs: ["get", "list", "watch", "update", "patch", "create"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents/status"]
verbs: ["update", "patch"]
- apiGroups: ["groupsnapshot.storage.k8s.io"]
resources: ["volumegroupsnapshotclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["groupsnapshot.storage.k8s.io"]
resources: ["volumegroupsnapshotcontents"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: ["groupsnapshot.storage.k8s.io"]
resources: ["volumegroupsnapshotcontents/status"]
verbs: ["update", "patch"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
controller-gen.kubebuilder.io/version: v0.14.0
name: logicalvolumes.topolvm.cybozu.com
spec:
group: topolvm.cybozu.com
Expand All @@ -21,25 +21,30 @@ spec:
description: LogicalVolume is the Schema for the logicalvolumes API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: LogicalVolumeSpec defines the desired state of LogicalVolume
properties:
accessType:
description: '''accessType'' specifies how the user intends to consume
the snapshot logical volume. Set to "ro" when creating a snapshot
and to "rw" when restoring a snapshot or creating a clone. This
field is populated only when LogicalVolume has a source.'
description: |-
'accessType' specifies how the user intends to consume the snapshot logical volume.
Set to "ro" when creating a snapshot and to "rw" when restoring a snapshot or creating a clone.
This field is populated only when LogicalVolume has a source.
type: string
deviceClass:
type: string
Expand All @@ -56,9 +61,9 @@ spec:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
source:
description: '''source'' specifies the logicalvolume name of the source;
if present. This field is populated only when LogicalVolume has
a source.'
description: |-
'source' specifies the logicalvolume name of the source; if present.
This field is populated only when LogicalVolume has a source.
type: string
required:
- name
Expand All @@ -82,9 +87,9 @@ spec:
message:
type: string
volumeID:
description: 'INSERT ADDITIONAL STATUS FIELD - define observed state
of cluster Important: Run "make" to regenerate code after modifying
this file'
description: |-
INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
Important: Run "make" to regenerate code after modifying this file
type: string
type: object
type: object
Expand Down
39 changes: 22 additions & 17 deletions charts/topolvm/templates/crds/topolvm.io_logicalvolumes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
controller-gen.kubebuilder.io/version: v0.14.0
name: logicalvolumes.topolvm.io
spec:
group: topolvm.io
Expand All @@ -21,25 +21,30 @@ spec:
description: LogicalVolume is the Schema for the logicalvolumes API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: LogicalVolumeSpec defines the desired state of LogicalVolume
properties:
accessType:
description: '''accessType'' specifies how the user intends to consume
the snapshot logical volume. Set to "ro" when creating a snapshot
and to "rw" when restoring a snapshot or creating a clone. This
field is populated only when LogicalVolume has a source.'
description: |-
'accessType' specifies how the user intends to consume the snapshot logical volume.
Set to "ro" when creating a snapshot and to "rw" when restoring a snapshot or creating a clone.
This field is populated only when LogicalVolume has a source.
type: string
deviceClass:
type: string
Expand All @@ -56,9 +61,9 @@ spec:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
source:
description: '''source'' specifies the logicalvolume name of the source;
if present. This field is populated only when LogicalVolume has
a source.'
description: |-
'source' specifies the logicalvolume name of the source; if present.
This field is populated only when LogicalVolume has a source.
type: string
required:
- name
Expand All @@ -82,9 +87,9 @@ spec:
message:
type: string
volumeID:
description: 'INSERT ADDITIONAL STATUS FIELD - define observed state
of cluster Important: Run "make" to regenerate code after modifying
this file'
description: |-
INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
Important: Run "make" to regenerate code after modifying this file
type: string
type: object
type: object
Expand Down
39 changes: 22 additions & 17 deletions config/crd/bases/topolvm.cybozu.com_logicalvolumes.yaml
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.13.0
controller-gen.kubebuilder.io/version: v0.14.0
name: logicalvolumes.topolvm.cybozu.com
spec:
group: topolvm.cybozu.com
Expand All @@ -20,25 +20,30 @@ spec:
description: LogicalVolume is the Schema for the logicalvolumes API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: LogicalVolumeSpec defines the desired state of LogicalVolume
properties:
accessType:
description: '''accessType'' specifies how the user intends to consume
the snapshot logical volume. Set to "ro" when creating a snapshot
and to "rw" when restoring a snapshot or creating a clone. This
field is populated only when LogicalVolume has a source.'
description: |-
'accessType' specifies how the user intends to consume the snapshot logical volume.
Set to "ro" when creating a snapshot and to "rw" when restoring a snapshot or creating a clone.
This field is populated only when LogicalVolume has a source.
type: string
deviceClass:
type: string
Expand All @@ -55,9 +60,9 @@ spec:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
source:
description: '''source'' specifies the logicalvolume name of the source;
if present. This field is populated only when LogicalVolume has
a source.'
description: |-
'source' specifies the logicalvolume name of the source; if present.
This field is populated only when LogicalVolume has a source.
type: string
required:
- name
Expand All @@ -81,9 +86,9 @@ spec:
message:
type: string
volumeID:
description: 'INSERT ADDITIONAL STATUS FIELD - define observed state
of cluster Important: Run "make" to regenerate code after modifying
this file'
description: |-
INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
Important: Run "make" to regenerate code after modifying this file
type: string
type: object
type: object
Expand Down
Loading

0 comments on commit 2096240

Please sign in to comment.