Skip to content

Commit bb17131

Browse files
authored
Merge pull request #1 from piraeusdatastore/update-fork
Prepare for first Piraeus release
2 parents 0136a32 + bd58494 commit bb17131

8 files changed

Lines changed: 104 additions & 98 deletions

File tree

.github/workflows/build.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: build
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
branches:
7+
- main
8+
pull_request:
9+
jobs:
10+
build:
11+
name: Build images
12+
runs-on: ubuntu-20.04
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
- name: Set up QEMU
17+
uses: docker/setup-qemu-action@master
18+
with:
19+
platforms: linux/amd64,linux/arm64
20+
- name: Set up Docker Buildx
21+
id: buildx
22+
uses: docker/setup-buildx-action@master
23+
- name: login to registry
24+
if: ${{ github.event_name != 'pull_request' }}
25+
env:
26+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
27+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
28+
run: |
29+
docker login --username=${DOCKER_USERNAME} --password-stdin quay.io <<< "${DOCKER_PASSWORD}"
30+
- name: Docker meta
31+
id: meta
32+
uses: docker/metadata-action@v3
33+
with:
34+
images: |
35+
quay.io/piraeusdatastore/linstor-scheduler-extender
36+
tags: |
37+
type=sha
38+
type=ref,event=tag
39+
type=ref,event=pr
40+
- name: Set VERSION
41+
run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
42+
- name: Build
43+
uses: docker/build-push-action@v2
44+
with:
45+
builder: ${{ steps.buildx.outputs.name }}
46+
platforms: linux/amd64,linux/arm64
47+
push: ${{ github.event_name != 'pull_request' }}
48+
tags: ${{ steps.meta.outputs.tags }}
49+
labels: ${{ steps.meta.outputs.labels }}
50+
build-args: |
51+
VERSION=${{ env.VERSION }}

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [0.2.0] - 2022-02-25
10+
11+
### Changed
12+
13+
- Moved to Piraeus Organization
14+
915
## [0.1.0] - 2022-02-07
1016

1117
### Added
1218

1319
- Initial command, import stork scheduler extender and linstor driver code
1420

15-
[Unreleased]: https://github.com/LINBIT/linstor-wait-until/compare/v0.1.0...HEAD
16-
[0.1.0]: https://github.com/LINBIT/linstor-wait-until/releases/tag/v0.1.0
21+
[Unreleased]: https://github.com/piraeusdatastore/linstor-scheduler-extender/compare/v0.2.0...HEAD
22+
[0.2.0]: https://github.com/piraeusdatastore/linstor-scheduler-extender/releases/tag/v0.2.0
23+
[0.1.0]: https://github.com/piraeusdatastore/linstor-scheduler-extender/releases/tag/v0.1.0

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ARG VERSION=v0.0.0-0.unknown
1414

1515
ARG TARGETOS
1616
ARG TARGETARCH
17-
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags="-X github.com/kvaps/linstor-scheduler-extender/pkg/consts.Version=${VERSION} -extldflags=-static" -v ./cmd/...
17+
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags="-X github.com/piraeusdatastore/linstor-scheduler-extender/pkg/consts.Version=${VERSION} -extldflags=-static" -v ./cmd/...
1818

1919
FROM --platform=$BUILDPLATFORM golang:1.17 as downloader
2020

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# linstor-scheduler-extender
22

3-
![Latest release](https://img.shields.io/github/v/release/kvaps/linstor-scheduler-extender)
3+
![Latest release](https://img.shields.io/github/v/release/piraeusdatastore/linstor-scheduler-extender)
44

55
LINSTOR scheduler extender plugin for Kubernetes which allows a storage driver to give the Kubernetes scheduler hints about where to place a new pod so that it is optimally located for storage performance.
66

cmd/linstor-scheduler-extender/linstor-scheduler-extender.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,21 @@ import (
77
"os/signal"
88
"syscall"
99

10-
"github.com/kvaps/linstor-scheduler-extender/pkg/consts"
11-
_ "github.com/kvaps/linstor-scheduler-extender/pkg/driver"
1210
"github.com/libopenstorage/stork/drivers/volume"
1311
"github.com/libopenstorage/stork/pkg/extender"
1412
log "github.com/sirupsen/logrus"
1513
"github.com/urfave/cli"
16-
api_v1 "k8s.io/api/core/v1"
14+
apiv1 "k8s.io/api/core/v1"
1715
clientset "k8s.io/client-go/kubernetes"
1816
"k8s.io/client-go/kubernetes/scheme"
19-
core_v1 "k8s.io/client-go/kubernetes/typed/core/v1"
17+
corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
2018
_ "k8s.io/client-go/plugin/pkg/client/auth"
2119
"k8s.io/client-go/rest"
2220
"k8s.io/client-go/tools/record"
2321
"sigs.k8s.io/controller-runtime/pkg/manager"
22+
23+
"github.com/piraeusdatastore/linstor-scheduler-extender/pkg/consts"
24+
_ "github.com/piraeusdatastore/linstor-scheduler-extender/pkg/driver"
2425
)
2526

2627
var ext *extender.Extender
@@ -75,16 +76,16 @@ func run(c *cli.Context) {
7576
}
7677

7778
eventBroadcaster := record.NewBroadcaster()
78-
eventBroadcaster.StartRecordingToSink(&core_v1.EventSinkImpl{Interface: k8sClient.CoreV1().Events("")})
79-
recorder := eventBroadcaster.NewRecorder(scheme.Scheme, api_v1.EventSource{Component: consts.EventComponentName})
79+
eventBroadcaster.StartRecordingToSink(&corev1.EventSinkImpl{Interface: k8sClient.CoreV1().Events("")})
80+
recorder := eventBroadcaster.NewRecorder(scheme.Scheme, apiv1.EventSource{Component: consts.EventComponentName})
8081

8182
d, err := volume.Get("linstor")
8283
if err != nil {
83-
log.Fatalf("Error getting Stork Driver %v: %v", "linstor", err)
84+
log.Fatalf("Error getting Scheduler Driver %v: %v", "linstor", err)
8485
}
8586

8687
if err = d.Init(nil); err != nil {
87-
log.Fatalf("Error initializing Stork Driver %v: %v", "linstor", err)
88+
log.Fatalf("Error initializing Scheduler Driver %v: %v", "linstor", err)
8889
}
8990

9091
ext = &extender.Extender{

deploy/all.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ spec:
4040
command:
4141
- kube-scheduler
4242
- --config=/etc/kubernetes/scheduler-config.yaml
43-
- --leader-elect=true
43+
- --leader-elect=true
4444
- --leader-elect-resource-name=linstor-scheduler
4545
- --leader-elect-resource-namespace=$(NAMESPACE)
4646
env:
@@ -74,7 +74,7 @@ spec:
7474
- mountPath: /etc/kubernetes
7575
name: scheduler-config
7676
- name: linstor-scheduler-extender
77-
image: ghcr.io/kvaps/linstor-scheduler-extender:v0.1.0
77+
image: quay.io/piraeusdatastore/linstor-scheduler-extender:v0.2.0
7878
imagePullPolicy: IfNotPresent
7979
args:
8080
- --verbose=true

go.mod

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
module github.com/kvaps/linstor-scheduler-extender
1+
module github.com/piraeusdatastore/linstor-scheduler-extender
22

33
go 1.17
44

55
replace (
6-
github.com/LINBIT/golinstor => github.com/LINBIT/golinstor v0.39.0
6+
github.com/LINBIT/golinstor => github.com/LINBIT/golinstor v0.41.2
77
github.com/banzaicloud/k8s-objectmatcher => github.com/banzaicloud/k8s-objectmatcher v1.5.1
88
github.com/census-instrumentation/opencensus-proto => github.com/census-instrumentation/opencensus-proto v0.3.0
99
github.com/docker/distribution => github.com/docker/distribution v2.7.0+incompatible
@@ -77,7 +77,7 @@ require (
7777
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
7878
github.com/davecgh/go-spew v1.1.1 // indirect
7979
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c // indirect
80-
github.com/donovanhide/eventsource v0.0.0-20171031113327-3ed64d21fb0b // indirect
80+
github.com/donovanhide/eventsource v0.0.0-20210830082556-c59027999da0 // indirect
8181
github.com/evanphx/json-patch v4.9.0+incompatible // indirect
8282
github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect
8383
github.com/fsnotify/fsnotify v1.4.9 // indirect
@@ -89,7 +89,7 @@ require (
8989
github.com/google/go-cmp v0.5.4 // indirect
9090
github.com/google/go-querystring v1.0.0 // indirect
9191
github.com/google/gofuzz v1.1.0 // indirect
92-
github.com/google/uuid v1.2.0 // indirect
92+
github.com/google/uuid v1.3.0 // indirect
9393
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
9494
github.com/googleapis/gnostic v0.5.1 // indirect
9595
github.com/hashicorp/errwrap v1.0.0 // indirect
@@ -111,17 +111,16 @@ require (
111111
github.com/prometheus/common v0.15.0 // indirect
112112
github.com/prometheus/procfs v0.2.0 // indirect
113113
github.com/russross/blackfriday/v2 v2.0.1 // indirect
114-
github.com/satori/go.uuid v1.2.0 // indirect
115114
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
116115
github.com/spf13/pflag v1.0.5 // indirect
117116
go.opencensus.io v0.22.4 // indirect
118-
golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9 // indirect
119-
golang.org/x/net v0.0.0-20201224014010-6772e930b67b // indirect
117+
golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
118+
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
120119
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5 // indirect
121-
golang.org/x/sys v0.0.0-20210301091718-77cc2087c03b // indirect
122-
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
123-
golang.org/x/text v0.3.4 // indirect
124-
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect
120+
golang.org/x/sys v0.0.0-20220222200937-f2425489ef4c // indirect
121+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
122+
golang.org/x/text v0.3.6 // indirect
123+
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
125124
gomodules.xyz/jsonpatch/v2 v2.1.0 // indirect
126125
google.golang.org/api v0.30.0 // indirect
127126
google.golang.org/appengine v1.6.7 // indirect

0 commit comments

Comments
 (0)