Skip to content

🌱 Allow reattach on node with different name. #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
contact_links:
- name: Question
url: https://github.com/topolvm/topolvm/discussions
url: https://github.com/syself/csi-topolvm/discussions
about: Support request or question
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ assignees: ''

<!--
For questions or requests for help, we would be happy if you post it on discussions.
https://github.com/topolvm/topolvm/discussions
https://github.com/syself/csi-topolvm/discussions
-->
**What should the feature do:**

Expand Down
32 changes: 16 additions & 16 deletions .github/ISSUE_TEMPLATE/update_supporting_kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ assignees: ''

## Update Procedure

- Read [this document](https://github.com/topolvm/topolvm/blob/main/docs/maintenance.md).
- Read [this document](https://github.com/syself/csi-topolvm/blob/main/docs/maintenance.md).

## Before Check List

Expand All @@ -20,44 +20,44 @@ There is a check list to confirm depending libraries or tools are released. The
Must update Kubernetes with each new version of Kubernetes.

- [ ] k8s.io/api
- https://github.com/kubernetes/api/tags
- <https://github.com/kubernetes/api/tags>
- The supported Kubernetes version is written in the description of each tag.
- [ ] k8s.io/apimachinery
- https://github.com/kubernetes/apimachinery/tags
- <https://github.com/kubernetes/apimachinery/tags>
- The supported Kubernetes version is written in the description of each tag.
- [ ] k8s.io/client-go
- https://github.com/kubernetes/client-go/tags
- <https://github.com/kubernetes/client-go/tags>
- The supported Kubernetes version is written in the description of each tag.
- [ ] k8s.io/mount-utils
- https://github.com/kubernetes/mount-utils/tags
- <https://github.com/kubernetes/mount-utils/tags>
- The supported Kubernetes version is written in the description of each tag.
- [ ] sigs.k8s.io/controller-runtime
- https://github.com/kubernetes-sigs/controller-runtime/releases
- <https://github.com/kubernetes-sigs/controller-runtime/releases>
- [ ] sigs.k8s.io/controller-tools
- https://github.com/kubernetes-sigs/controller-tools/releases
- <https://github.com/kubernetes-sigs/controller-tools/releases>
- [ ] external provisioner
- https://github.com/kubernetes-csi/external-provisioner/tree/master/CHANGELOG
- <https://github.com/kubernetes-csi/external-provisioner/tree/master/CHANGELOG>
- [ ] external resizer
- https://github.com/kubernetes-csi/external-resizer/tree/master/CHANGELOG
- <https://github.com/kubernetes-csi/external-resizer/tree/master/CHANGELOG>
- [ ] external snapshotter
- https://github.com/kubernetes-csi/external-snapshotter/tree/master/CHANGELOG
- <https://github.com/kubernetes-csi/external-snapshotter/tree/master/CHANGELOG>
- [ ] kind
- https://github.com/kubernetes-sigs/kind/releases
- <https://github.com/kubernetes-sigs/kind/releases>
- [ ] minikube
- https://github.com/kubernetes/minikube/releases
- <https://github.com/kubernetes/minikube/releases>
- [ ] crictl
- https://github.com/kubernetes-sigs/cri-tools/releases
- <https://github.com/kubernetes-sigs/cri-tools/releases>

### Semi-required Dependencies

These are not released on the occasion of a Kubernetes version upgrade, so if there is a release that corresponds to a Kubernetes version, use it.

- [ ] node driver registrar
- https://github.com/kubernetes-csi/node-driver-registrar/tree/master/CHANGELOG
- <https://github.com/kubernetes-csi/node-driver-registrar/tree/master/CHANGELOG>
- [ ] liveness probe
- https://github.com/kubernetes-csi/livenessprobe/tree/master/CHANGELOG
- <https://github.com/kubernetes-csi/livenessprobe/tree/master/CHANGELOG>
- [ ] cri-docker
- https://github.com/Mirantis/cri-dockerd/releases
- <https://github.com/Mirantis/cri-dockerd/releases>

### Release notes check

Expand Down
31 changes: 16 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Welcome! We are glad that you want to contribute to our project!
As you get started, you are in the best position to give us feedback on areas of
our project that we need help with including:

* Problems found during setting up a new developer environment
* Gaps in our Quickstart Guide or documentation
* Bugs in our automation scripts
- Problems found during setting up a new developer environment
- Gaps in our Quickstart Guide or documentation
- Bugs in our automation scripts

If anything doesn't make sense, or doesn't work when you run it, please open a
bug report and let us know!
Expand All @@ -26,16 +26,16 @@ bug report and let us know!

We welcome many different types of contributions including:

* New features
* Builds, CI/CD
* Bug fixes
* Documentation
* Issue Triage
* Answering questions on GitHub Discussions
* Communications / Social Media / Blog Posts
* Release management
- New features
- Builds, CI/CD
- Bug fixes
- Documentation
- Issue Triage
- Answering questions on GitHub Discussions
- Communications / Social Media / Blog Posts
- Release management

Not everything happens through a GitHub pull request. Please [contact us](https://github.com/topolvm/topolvm/discussions)
Not everything happens through a GitHub pull request. Please [contact us](https://github.com/syself/csi-topolvm/discussions)
and let's discuss how we can work together.

## Find an Issue
Expand All @@ -49,7 +49,7 @@ your first pull request.
Sometimes there won’t be any issues with these labels. That’s ok! There is
likely still something for you to work on. If you want to contribute but you
don’t know where to start or can't find a suitable issue, you can ask for an
issue to work on the [Discussions](https://github.com/topolvm/topolvm/discussions).
issue to work on the [Discussions](https://github.com/syself/csi-topolvm/discussions).

Once you see an issue that you'd like to work on, please post a comment saying
that you want to work on it. Something like "I want to work on this" is fine.
Expand All @@ -58,7 +58,7 @@ that you want to work on it. Something like "I want to work on this" is fine.

The best way to reach us with a question when contributing is to ask on:

* The original github issue
- The original github issue

## Pull Request Lifecycle

Expand Down Expand Up @@ -109,6 +109,7 @@ we suggest preparing a dedicated physical or virtual machine.
## Sign Your Commits

### DCO

Licensing is important to open source projects. It provides some assurances that
the software will continue to be available based under the terms that the
author(s) desired. We require that contributors sign off on commits submitted to
Expand All @@ -128,7 +129,7 @@ Git has a `-s` command line option to do this automatically:
git commit -s -m 'This is my commit message'

If you forgot to do this and have not yet pushed your changes to the remote
repository, you can amend your commit with the sign-off by running
repository, you can amend your commit with the sign-off by running

git commit --amend -s

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
18 changes: 11 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ help: ## Display this help.
##@ Development

pkg/lvmd/proto/lvmd.pb.go: pkg/lvmd/proto/lvmd.proto
$(PROTOC) --go_out=module=github.com/topolvm/topolvm:. $<
$(PROTOC) --go_out=module=github.com/syself/csi-topolvm:. $<

pkg/lvmd/proto/lvmd_grpc.pb.go: pkg/lvmd/proto/lvmd.proto
$(PROTOC) --go-grpc_out=module=github.com/topolvm/topolvm:. $<
$(PROTOC) --go-grpc_out=module=github.com/syself/csi-topolvm:. $<

docs/lvmd-protocol.md: pkg/lvmd/proto/lvmd.proto
$(PROTOC) --doc_out=./docs --doc_opt=markdown,$@ $<
Expand All @@ -95,7 +95,7 @@ manifests: generate-legacy-api ## Generate WebhookConfiguration, ClusterRole and
cat config/crd/bases/topolvm.cybozu.com_logicalvolumes.yaml | xargs -d" " printf "$$LEGACY_CRD_TEMPLATE" > charts/topolvm/templates/crds/topolvm.cybozu.com_logicalvolumes.yaml

.PHONY: generate-api ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
generate-api:
generate-api:
$(CONTROLLER_GEN) object:headerFile="./hack/boilerplate.go.txt" paths="./api/..."

.PHONY: generate-legacy-api
Expand Down Expand Up @@ -133,6 +133,7 @@ test: lint ## Run lint and unit tests.

mkdir -p $(ENVTEST_ASSETS_DIR)
source <($(BINDIR)/setup-envtest use $(ENVTEST_KUBERNETES_VERSION) --bin-dir=$(ENVTEST_ASSETS_DIR) -p env); GOLANG_PROTOBUF_REGISTRATION_CONFLICT=warn go test -count=1 -race -v --timeout=120s ./...
## hack source <($(BINDIR)/setup-envtest use $(ENVTEST_KUBERNETES_VERSION) --bin-dir=$(ENVTEST_ASSETS_DIR) -p env); GOLANG_PROTOBUF_REGISTRATION_CONFLICT=warn go test -count=1 -race -v --timeout=120s ./internal/controller

groupname-test: ## Run unit tests that depends on the groupname.
go install ./...
Expand Down Expand Up @@ -160,11 +161,11 @@ build-topolvm: build/hypertopolvm build/lvmd

build/hypertopolvm: $(GO_FILES)
mkdir -p build
GOARCH=$(GOARCH) go build -o $@ -ldflags "-w -s -X github.com/topolvm/topolvm.Version=$(TOPOLVM_VERSION)" ./cmd/hypertopolvm
GOARCH=$(GOARCH) go build -o $@ -ldflags "-w -s -X github.com/syself/csi-topolvm.Version=$(TOPOLVM_VERSION)" ./cmd/hypertopolvm

build/lvmd: $(GO_FILES)
mkdir -p build
GOARCH=$(GOARCH) CGO_ENABLED=0 go build -o $@ -ldflags "-w -s -X github.com/topolvm/topolvm.Version=$(TOPOLVM_VERSION)" ./cmd/lvmd
GOARCH=$(GOARCH) CGO_ENABLED=0 go build -o $@ -ldflags "-w -s -X github.com/syself/csi-topolvm.Version=$(TOPOLVM_VERSION)" ./cmd/lvmd

.PHONY: csi-sidecars
csi-sidecars: ## Build sidecar binaries.
Expand Down Expand Up @@ -203,8 +204,12 @@ multi-platform-images: multi-platform-image-normal multi-platform-image-with-sid
.PHONY: multi-platform-image-normal
multi-platform-image-normal:
mkdir -p build
# removed that:
# --platform linux/amd64,linux/arm64/v8,linux/ppc64le \
# otherwise:
# ERROR: Multi-platform build is not supported for the docker driver.
# Switch to a different driver, or turn on the containerd image store, and try again.
docker buildx build --no-cache $(BUILDX_PUSH_OPTIONS) \
--platform linux/amd64,linux/arm64/v8,linux/ppc64le \
-t $(IMAGE_PREFIX)topolvm:$(IMAGE_TAG) \
--build-arg TOPOLVM_VERSION=$(TOPOLVM_VERSION) \
--target topolvm \
Expand All @@ -214,7 +219,6 @@ multi-platform-image-normal:
multi-platform-image-with-sidecar:
mkdir -p build
docker buildx build --no-cache $(BUILDX_PUSH_OPTIONS) \
--platform linux/amd64,linux/arm64/v8,linux/ppc64le \
-t $(IMAGE_PREFIX)topolvm-with-sidecar:$(IMAGE_TAG) \
--build-arg TOPOLVM_VERSION=$(TOPOLVM_VERSION) \
--target topolvm-with-sidecar \
Expand Down
4 changes: 2 additions & 2 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ domain: io
layout:
- go.kubebuilder.io/v4
projectName: topolvm
repo: github.com/topolvm/topolvm
repo: github.com/syself/csi-topolvm
resources:
- api:
crdVersion: v1
controller: true
domain: io
group: topolvm
kind: LogicalVolume
path: github.com/topolvm/topolvm/api/v1
path: github.com/syself/csi-topolvm/api/v1
version: v1
- controller: true
group: core
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
![TopoLVM logo](./docs/img/TopoLVM_logo.svg)
[![GitHub release](https://img.shields.io/github/v/release/topolvm/topolvm.svg?maxAge=60)][releases]
[![Main](https://github.com/topolvm/topolvm/workflows/Main/badge.svg)](https://github.com/topolvm/topolvm/actions)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/topolvm/topolvm?tab=overview)](https://pkg.go.dev/github.com/topolvm/topolvm?tab=overview)
[![Go Report Card](https://goreportcard.com/badge/github.com/topolvm/topolvm)](https://goreportcard.com/badge/github.com/topolvm/topolvm)
[![Main](https://github.com/syself/csi-topolvm/workflows/Main/badge.svg)](https://github.com/syself/csi-topolvm/actions)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/syself/csi-topolvm?tab=overview)](https://pkg.go.dev/github.com/syself/csi-topolvm?tab=overview)
[![Go Report Card](https://goreportcard.com/badge/github.com/syself/csi-topolvm)](https://goreportcard.com/badge/github.com/syself/csi-topolvm)

# TopoLVM

Expand All @@ -20,11 +20,11 @@ Our supported platform are:
- Filesystems: ext4, xfs, btrfs(experimental)
- lvm version 2.02.163 or later (adds JSON output support)

\*1 The host's Linux Kernel must be v4.9 or later which supports `rmapbt` and `reflink`, if you use xfs filesystem with an official docker image.
\*2 Tier1 support. The official docker images are provided and all functionalities are tested by CI.
\*3 Tier2 support. The official docker images are provided, but no tests run by CI.
\*1 The host's Linux Kernel must be v4.9 or later which supports `rmapbt` and `reflink`, if you use xfs filesystem with an official docker image.
\*2 Tier1 support. The official docker images are provided and all functionalities are tested by CI.
\*3 Tier2 support. The official docker images are provided, but no tests run by CI.

Docker images are available on [ghcr.io](https://github.com/orgs/topolvm/packages).
Docker images are available on [ghcr.io](https://github.com/orgs/topolvm/packages).

## Getting Started

Expand All @@ -49,7 +49,7 @@ started contributing, please see our [Contributing Guide](CONTRIBUTING.md).
- Extended scheduler: TopoLVM extends the general Pod scheduler to prioritize Nodes having larger storage capacity.
- Volume metrics: Usage stats are exported as Prometheus metrics from `kubelet`.
- [Volume Expansion](https://kubernetes-csi.github.io/docs/volume-expansion.html): Volumes can be expanded by editing `PersistentVolumeClaim` objects.
- [Storage capacity tracking](https://github.com/topolvm/topolvm/tree/main/deploy#storage-capacity-tracking): You can enable Storage Capacity Tracking mode instead of using topolvm-scheduler.
- [Storage capacity tracking](https://github.com/syself/csi-topolvm/tree/main/deploy#storage-capacity-tracking): You can enable Storage Capacity Tracking mode instead of using topolvm-scheduler.
- [Snapshot](https://kubernetes-csi.github.io/docs/snapshot-restore-feature.html): Snapshots can be taken when using thin provisioning.

### Planned Features
Expand All @@ -58,20 +58,20 @@ started contributing, please see our [Contributing Guide](CONTRIBUTING.md).

## Communications

If you have any questions or ideas, please use [discussions](https://github.com/topolvm/topolvm/discussions).
If you have any questions or ideas, please use [discussions](https://github.com/syself/csi-topolvm/discussions).

## Resources

[docs](docs/) directory contains the user manual, designs and specifications, and so on.

A diagram of components is available in [docs/design.md](docs/design.md#diagram).

TopoLVM maintainers presented the motivation and implementation of TopoLVM at KubeCon Europe 2020: https://kccnceu20.sched.com/event/ZerD
TopoLVM maintainers presented the motivation and implementation of TopoLVM at KubeCon Europe 2020: <https://kccnceu20.sched.com/event/ZerD>

## License

This project is licensed under [Apache License 2.0](LICENSE).

[releases]: https://github.com/topolvm/topolvm/releases
[releases]: https://github.com/syself/csi-topolvm/releases
[CSI]: https://github.com/container-storage-interface/spec
[kind]: https://github.com/kubernetes-sigs/kind
17 changes: 8 additions & 9 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The result should look something like:
Bump version
------------

1. Determine a new version number by [checking the differences](https://github.com/topolvm/topolvm/compare/vX.Y.Z...main) since the last release. Then, define the `VERSION` variable.
1. Determine a new version number by [checking the differences](https://github.com/syself/csi-topolvm/compare/vX.Y.Z...main) since the last release. Then, define the `VERSION` variable.

```console
VERSION=1.2.3
Expand All @@ -58,9 +58,9 @@ Bump version
creates a draft release note for the tagged version,
builds a tar archive for the new release,
and attaches it to the release note.
Visit https://github.com/topolvm/topolvm/releases to check
the result.

Visit <https://github.com/syself/csi-topolvm/releases> to check
the result.

4. Edit the auto-generated release note
and remove PRs which contain changes only to the helm chart.
Expand All @@ -72,15 +72,15 @@ Bump Chart Version
TopoLVM Helm Chart will be released independently.
This will prevent the TopoLVM version from going up just by modifying the Helm Chart.

1. Determine a new version number by [checking the differences](https://github.com/topolvm/topolvm/compare/topolvm-chart-vX.Y.Z...main) since the last release. Then, manually run the workflow to create a PR to update the Helm Chart.
1. Determine a new version number by [checking the differences](https://github.com/syself/csi-topolvm/compare/topolvm-chart-vX.Y.Z...main) since the last release. Then, manually run the workflow to create a PR to update the Helm Chart.

https://github.com/topolvm/topolvm/actions/workflows/create-chart-update-pr.yaml
<https://github.com/syself/csi-topolvm/actions/workflows/create-chart-update-pr.yaml>

2. Review and merge the auto-created PR.

3. Manually run the GitHub Actions workflow for the release.

https://github.com/topolvm/topolvm/actions/workflows/helm-release.yaml
<https://github.com/syself/csi-topolvm/actions/workflows/helm-release.yaml>

When you run workflow, [helm/chart-releaser-action](https://github.com/helm/chart-releaser-action) will automatically create a GitHub Release.

Expand All @@ -90,5 +90,4 @@ This will prevent the TopoLVM version from going up just by modifying the Helm C
3. Remove PRs which do not contain changes to the helm chart.

[semver]: https://semver.org/spec/v2.0.0.html
[example]: https://github.com/cybozu-go/etcdpasswd/commit/77d95384ac6c97e7f48281eaf23cb94f68867f79
[GitHub Actions]: https://github.com/topolvm/topolvm/actions
[GitHub Actions]: https://github.com/syself/csi-topolvm/actions
1 change: 1 addition & 0 deletions api/legacy/v1/logicalvolume_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type LogicalVolumeSpec struct {

Name string `json:"name"`
NodeName string `json:"nodeName"`
ProviderID string `json:"providerID"`
Size resource.Quantity `json:"size"`
DeviceClass string `json:"deviceClass,omitempty"`
LvcreateOptionClass string `json:"lvcreateOptionClass,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions api/v1/logicalvolume_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type LogicalVolumeSpec struct {

Name string `json:"name"`
NodeName string `json:"nodeName"`
ProviderID string `json:"providerID"`
Size resource.Quantity `json:"size"`
DeviceClass string `json:"deviceClass,omitempty"`
LvcreateOptionClass string `json:"lvcreateOptionClass,omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions charts/topolvm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apiVersion: v2
type: application

home: https://github.com/topolvm/topolvm
home: https://github.com/syself/csi-topolvm
name: topolvm
description: Topolvm
version: 14.1.1
appVersion: 0.28.0
sources:
- https://github.com/topolvm/topolvm
- https://github.com/syself/csi-topolvm

dependencies:
- name: cert-manager
Expand Down
Loading