Skip to content

Commit

Permalink
Prepare project for open sourcing
Browse files Browse the repository at this point in the history
- Use public GH runners
- Cleanup docs
- Cleanup readme
- Add code owners and contrib guide
  • Loading branch information
afritzler committed Mar 3, 2023
1 parent f1ad2cb commit d4ee234
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 176 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@ updates:
schedule:
interval: "daily"
open-pull-requests-limit: 10
reviewers:
- "onmetal/csi-maintainers"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 10
reviewers:
- "onmetal/csi-maintainers"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 10
reviewers:
- "onmetal/csi-maintainers"
2 changes: 1 addition & 1 deletion .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
checks:
name: run
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kustomize-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
kustomize-validation:
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
jobs:
buildAndPush:
if: ${{ github.event.label.name == 'ok-to-image' }} || ${{ github.event.label.name == 'ok-to-🐳' }} || ${{ github.ref == 'refs/heads/main' }}
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/metadata-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
update_release_draft:
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "main"
- uses: release-drafter/release-drafter@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/size-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
size-label:
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- name: size-label
uses: pascalgn/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
checks:
name: run
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# onmetal-csi-driver maintainers
* @onmetal/csi-maintainers
1 change: 1 addition & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Please refer to the [Gardener on Metal code of conduct](https://onmetal.github.io/documentation/contribute/overview/#code-of-conduct).
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
![Gardener on Metal Logo](docs/assets/logo.png)

# onmetal-csi-driver

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![Test](https://github.com/onmetal/onmetal-csi-driver/actions/workflows/test.yml/badge.svg)](https://github.com/onmetal/onmetal-csi-driver/actions/workflows/test.yml)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)
[![GitHub License](https://img.shields.io/static/v1?label=License&message=Apache-2.0&color=blue&style=flat-square)](LICENSE)

> CSI driver for Gardener on Metal
CSI driver for Gardener on Metal

## Overview

The onmetal Container Storage Interface (CSI) driver is a [CSI specification-compliant](https://github.com/onmetal/onmetal-csi-driver/tree/main/docs) driver used by Gardener on Metal to manage the lifecycle of onmetal volumes.

The CSI is a standard for exposing arbitrary block and file storage systems to containerized workloads on Kubernetes.
The onmetal Container Storage Interface (CSI) driver is a [CSI specification-compliant](https://github.com/onmetal/onmetal-csi-driver/tree/main/docs)
driver used by Gardener on Metal to manage the lifecycle of onmetal volumes. The CSI is a standard for exposing
arbitrary block and file storage systems to containerized workloads on Kubernetes.

This driver provides CSI implementation for Gardener on Metal. For any Persistent volume (PVC) created using this driver, it will create a new onmetal volume and mount the relevant disks to machine(s) (VMs).
This driver provides CSI implementation for Gardener on Metal. For any Persistent volume (PVC) created using this
driver, it will create a new onmetal volume and mount the relevant disks to machine(s) (VMs).

## Installation, Usage, and Development

For more details please refer to documentation folder [/docs](https://github.com/onmetal/onmetal-csi-driver/tree/main/docs)

## Contributing
## Feedback and Support

We'd love to get feedback from you.
Please report bugs, suggestions or post questions by opening a [Github issue](https://github.com/onmetal/onmetal-csi-driver/issues)
Feedback and contributions are always welcome!

Please report bugs, suggestions or post questions by opening a [Github issue](https://github.com/onmetal/onmetal-csi-driver/issues).
## License

[Apache License 2.0](/LICENSE)
33 changes: 0 additions & 33 deletions code_of_conduct.md

This file was deleted.

Binary file removed docs/assets/logo.png
Binary file not shown.
107 changes: 0 additions & 107 deletions docs/development/contribution.md

This file was deleted.

33 changes: 16 additions & 17 deletions docs/troubleshooting/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
```
Example:
```
rohit@ubuntu:~/gitrepo/onmetal$ kubectl --kubeconfig=/home/rohit/.kube/config get nodes
kubectl --kubeconfig=/home/<USER>/.kube/config get nodes
NAME STATUS ROLES AGE VERSION
csi-master Ready master 106m v1.18.1
Expand All @@ -23,7 +23,7 @@
```
Example:
```
root@csi-master:~# kubectl get node csi-worker -o yaml | grep -i spec -A 3
kubectl get node csi-worker -o yaml | grep -i spec -A 3
spec:
providerID: onmetal://csi/csi-worker
status:
Expand All @@ -36,7 +36,7 @@
4. Check CSI driver is deployed and Running
```bash
root@node1:~# kubectl get pods -n onmetal-csi
kubectl get pods -n onmetal-csi
NAME READY STATUS RESTARTS AGE
onmetal-csi-driver-0 5/5 Running 0 51s
onmetal-csi-node-mkfs9 2/2 Running 0 29s
Expand All @@ -49,7 +49,7 @@
failed pvc request status:
```bash
root@node1:~# kubectl get pvc -n onmetal-csi
kubectl get pvc -n onmetal-csi
NAMESPACE NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
csi-test pvc-demo Pending onmetal-storageclass-demo 2s
```
Expand All @@ -62,13 +62,13 @@
```
Ideal onmetal volume:
```bash
root@node1:~# kubectl get volume -n onmetal-csi
kubectl get volume -n onmetal-csi
NAMESPACE NAME VOLUMEPOOLREF VOLUMECLASS STATE PHASE AGE
onmetal-csi volume-sample volumepool-sample fast Available Bound 8m43s
```
Ideal pvc status:
```bash
root@node1:~# kubectl get pvc -n onmetal-csi
kubectl get pvc -n onmetal-csi
NAMESPACE NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
onmetal-csi pvc-demo Bound csi-onmetal-44eb33bc46 1Gi RWO onmetal-storageclass-demo 9s
```
Expand All @@ -78,7 +78,7 @@
Example error:
```bash
root@node1:~# kubectl logs -f onmetal-csi-driver-0 -c driver -n onmetal-csi
kubectl logs -f onmetal-csi-driver-0 -c driver -n onmetal-csi
time="2022-05-31T06:41:15Z" level=info msg="request received to publish volume csi-onmetal-44eb33bc46 at node 192.168.0.108\n"
time="2022-05-31T06:41:15Z" level=info msg="get machine with provided name and namespace"
time="2022-05-31T06:41:15Z" level=error msg="could not get machine with name node1,namespace onmetal-csi, error:machines.compute.api.onmetal.de \"node1\" not found"
Expand All @@ -95,14 +95,14 @@
Example error:
```bash
root@node1:~# kubectl logs -f onmetal-csi-driver-0 -c driver -n onmetal-csi
kubectl logs -f onmetal-csi-driver-0 -c driver -n onmetal-csi
time="2022-05-31T06:41:15Z" level=info msg="request received to publish volume csi-onmetal-44eb33bc46 at node 192.168.0.108\n"
time="2022-05-31T06:41:15Z" level=info msg="get machine with provided name and namespace"
time="2022-05-31T06:41:15Z" level=error msg="could not get machine with name node1,namespace onmetal-csi, error:machines.compute.api.onmetal.de \"node1\" not found"
```
3. Check whether the disk to mount is available with volume.
```bash
root@node1:~# kubectl logs -f onmetal-csi-driver-0 -c driver -n onmetal-csi
kubectl logs -f onmetal-csi-driver-0 -c driver -n onmetal-csi
time="2022-05-31T06:51:40Z" level=info msg="request received to publish volume csi-onmetal-4c50e230e1 at node 192.168.0.108\n"
time="2022-05-31T06:51:40Z" level=info msg="get machine with provided name and namespace"
time="2022-05-31T06:51:40Z" level=info msg="update machine with volumeattachment"
Expand All @@ -112,31 +112,30 @@
```
4. Check disk to mount is available at /dev/disks/by-id directory.
Look for the disk by manually entering into the machine at below path `/dev/disk/by-id/`
Example disk-path format: `/dev/disk/by-id/virtio-odc-e50014ee2b3f4627a`
Example error:
```bash
root@node1:~# kubectl logs -f onmetal-csi-node-n9gjf -c driver -n onmetal-csi
kubectl logs -f onmetal-csi-node-n9gjf -c driver -n onmetal-csi
time="2022-05-31T06:35:13Z" level=error msg="failed to stage volume:format of disk \"/host/dev/disk/by-id/virtio-odc-e50014ee2b3f4627a\" failed: type:(\"ext4\") target:(\"/var/lib/kubelet/plugins/kubernetes.io/csi/onmetal-csi-driver/b6fef28a18a856aa16c7a1201db104c250b95a02e4ec959377f589a096655b4e/globalmount\") options:(\"rw,defaults\") errcode:(exit status 1) output:(mke2fs 1.44.5 (15-Dec-2018)\nThe file /host/dev/disk/by-id/virtio-odc-e50014ee2b3f4627a does not exist and no size was specified.\n) "
```
Ideal onmetal machine:
```bash
root@node1:~# kubectl get machine -n onmetal-csi
kubectl get machine -n onmetal-csi
NAME MACHINECLASSREF IMAGE MACHINEPOOLREF STATE AGE
node1 machineclass-sample myimage_repo_location machinepool-sample Running 9m28s
```
Ideal onmetal volume:
```bash
root@node1:~# kubectl get volume -n onmetal-csi
kubectl get volume -n onmetal-csi
NAMESPACE NAME VOLUMEPOOLREF VOLUMECLASS STATE PHASE AGE
onmetal-csi volume-sample volumepool-sample fast Available Bound 24s
```
Volume status with disk available (Wwn):
```bash
root@node1:~# kubectl describe volume volume-sample -n onmetal-csi
kubectl describe volume volume-sample -n onmetal-csi
Name: volume-sample
Namespace: onmetal-csi
...
Expand All @@ -152,12 +151,12 @@
```
Create pod to mount volume:
```bash
root@node1:~# kubectl apply -f onmetal-csi-driver/config/samples/pod.yaml -n onmetal-csi
kubectl apply -f onmetal-csi-driver/config/samples/pod.yaml -n onmetal-csi
pod/pod-demo created
```
```bash
root@node1:~# kubectl get pods pod-demo -n onmetal-csi
kubectl get pods pod-demo -n onmetal-csi
NAME READY STATUS RESTARTS AGE
pod-demo 1/1 Running 0 4m57s
```
Loading

0 comments on commit d4ee234

Please sign in to comment.