Skip to content
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

update modules, workflows and rename organization, use Cinder V3 #132

Merged
merged 5 commits into from
Dec 12, 2023
Merged
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/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
${{ runner.os }}-go-
- uses: actions/setup-go@v4
with:
go-version: '1.17.0'
go-version: '1.20.4'
- name: make all
run: |
make all
4 changes: 2 additions & 2 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
${{ runner.os }}-go-
- uses: actions/setup-go@v4
with:
go-version: '1.17.0'
go-version: '1.20.4'
- name: make all
run: |
make all
- name: generate changelog from git
run: |
echo "Image is available at \`docker.pkg.github.com/daimler/kosmoo/kosmoo:$(git describe --tags --exact-match)\`." > ${{ github.workflow }}-CHANGELOG.txt
echo "Image is available at \`docker.pkg.github.com/mercedes-benz/kosmoo/kosmoo:$(git describe --tags --exact-match)\`." > ${{ github.workflow }}-CHANGELOG.txt
git log --format=format:"* %h %s" $(git describe --tags --abbrev=0 @^)..@ >> ${{ github.workflow }}-CHANGELOG.txt
- name: push to package registry
run: |
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ VERSION ?= $(shell git describe --tags --exact-match || \

SRCS = $(shell find . -type f -name '*.go' -not -path "./vendor/*")

REGISTRY ?= docker.pkg.github.com/daimler/kosmoo
REGISTRY ?= docker.pkg.github.com/mercedes-benz/kosmoo

all: test build docker

Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// SPDX-License-Identifier: MIT
module github.com/daimler/kosmoo
module github.com/mercedes-benz/kosmoo

go 1.12

require (
github.com/gophercloud/gophercloud v0.22.0
github.com/gophercloud/gophercloud v1.3.0
github.com/prometheus/client_golang v1.14.0
gopkg.in/ini.v1 v1.66.4
k8s.io/api v0.22.2
k8s.io/apimachinery v0.22.2
k8s.io/client-go v0.22.2
k8s.io/klog/v2 v2.60.1
gopkg.in/ini.v1 v1.67.0
k8s.io/api v0.26.5
k8s.io/apimachinery v0.26.5
k8s.io/client-go v0.26.5
k8s.io/klog/v2 v2.80.1
)
192 changes: 128 additions & 64 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion hack/check_golangci-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

set -e

GOLANGCILINT_VERSION="1.50.0"
GOLANGCILINT_VERSION="1.52.2"
GOLANGCILINT_FILENAME="golangci-lint-${GOLANGCILINT_VERSION}-linux-amd64.tar.gz"
GOLANGCILINT_URL="https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCILINT_VERSION}/${GOLANGCILINT_FILENAME}"

Expand Down
2 changes: 1 addition & 1 deletion kubernetes/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
FROM alpine:3.17.3
FROM alpine:3.18.0

LABEL description="Kosmoo"

Expand Down
2 changes: 1 addition & 1 deletion kubernetes/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
- args:
- -refresh-interval=300
- -cloud-conf=/etc/cloud.conf
image: docker.pkg.github.com/daimler/kosmoo/kosmoo:latest
image: docker.pkg.github.com/mercedes-benz/kosmoo/kosmoo:latest
imagePullPolicy: Always
name: exporter
ports:
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/overlays/examples/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ kind: Kustomization
bases:
- ../../base
images:
- name: docker.pkg.github.com/daimler/kosmoo/kosmoo
- name: docker.pkg.github.com/mercedes-benz/kosmoo/kosmoo
newName: other/kosmoo
newTag: new
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"sync"
"time"

"github.com/daimler/kosmoo/pkg/metrics"
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/openstack"
"github.com/prometheus/client_golang/prometheus"
Expand All @@ -20,6 +19,8 @@ import (
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/klog/v2"

"github.com/mercedes-benz/kosmoo/pkg/metrics"
)

var (
Expand Down Expand Up @@ -294,7 +295,7 @@ func updateMetrics(provider *gophercloud.ProviderClient, eo gophercloud.Endpoint
}

func getClients(provider *gophercloud.ProviderClient, endpointOpts gophercloud.EndpointOpts) (cinder, neutron, loadbalancer, compute *gophercloud.ServiceClient, err error) {
cinderClient, err := openstack.NewBlockStorageV2(provider, endpointOpts)
cinderClient, err := openstack.NewBlockStorageV3(provider, endpointOpts)
if err != nil {
return nil, nil, nil, nil, fmt.Errorf("unable to get cinder client: %v", err)
}
Expand Down