Skip to content
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
78 changes: 78 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Builds
on:
push:
branches: [master]
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README*'
- 'docs/**'
pull_request:
branches: [master]
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README*'
- 'docs/**'

defaults:
run:
# reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
shell: bash --noprofile --norc -eo pipefail -x {0}

jobs:
linux-build:
runs-on: ubuntu-18.04
steps:
- name: checkout
uses: actions/checkout@v2

- name: setup golang
uses: actions/setup-go@v2
with:
go-version: 1.16

- name: install deps
run: tests/scripts/helper.sh install_deps

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks this script is missing in the PR?
https://github.com/thotz/ceph-cosi/runs/3161179496#step:4:7

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yaa, it looks like. Let me recheck everyhting


- name: setup minikube
uses: manusa/actions-setup-minikube@v2.4.2
with:
minikube version: 'v1.21.0'
kubernetes version: 'v1.19.2'
start args: --memory 6g --cpus=2
github token: ${{ secrets.GITHUB_TOKEN }}

- name: build ceph-cosi
run: |
GOPATH=$(go env GOPATH) make clean && make build
docker tag ceph-cosi-driver:latest ceph/ceph-cosi-driver:latest

- name: setup ceph cluster
run: tests/scripts/helper.sh setup_ceph_cluster

- name: set up cosi
run: |
kubectl create -k github.com/kubernetes-sigs/container-object-storage-interface-api
kubectl create -k github.com/kubernetes-sigs/container-object-storage-interface-controller
kubectl create -k github.com/kubernetes-sigs/container-object-storage-interface-csi-adapter

- name: set up ceph cosi driver
run: |
tests/scripts/helper.sh update_secret_file
kubectl apply -k .

- name: create bucket class and bucket request
run: |
kubectl create -f examples/bucketclass.yaml
kubectl create -f examples/bucketrequest.yaml

- name: create bucket access class and bucket access request
run: |
kubectl create -f examples/bucketaccessclass.yaml
kubectl create -f examples/bucketrequest.yaml

- name: setup tmate session for debugging
if: failure()
uses: mxschmitt/action-tmate@v3
timeout-minutes: 120
3 changes: 0 additions & 3 deletions examples/bucketaccessclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@ kind: BucketAccessClass
apiVersion: objectstorage.k8s.io/v1alpha1
metadata:
name: sample-bac
policyActionsConfigMap:
name: sample-cm
namespace: default
9 changes: 9 additions & 0 deletions pkg/driver/error.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package driver

import "errors"

var (
errNilProtocol = errors.New("protocol is nil")
errs3ProtocolMissing = errors.New("S3 protocol not defined")
)

6 changes: 3 additions & 3 deletions resources/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ metadata:
app.kubernetes.io/name: cosi-driver-ceph
type: Opaque
stringData:
ENDPOINT: "http://rgw:8080"
ACCESSKEY: "ceph"
SECRETKEY: "ceph123"
ENDPOINT: "http://fedora:8080"
ACCESSKEY: "QV1KGMKUYZA4H2VSN9VO"
SECRETKEY: "1ilAvQvSYjGXTr8pzQDpkN2xJqyVcViRTus4d59h"