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

wip-los-csi-work #45

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
54 changes: 54 additions & 0 deletions Makefile.lb
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Copyright (C) 2016--2020 Lightbits Labs Ltd.
# SPDX-License-Identifier: Apache-2.0

include $(WORKSPACE_TOP)/common/Makefile.env

DOCKER_REGISTRY := $(or $(DOCKER_REGISTRY),lbdocker:5000)
SIDECAR_DOCKER_REGISTRY := $(or $(SIDECAR_DOCKER_REGISTRY),lbdocker:5000)

HELM_CHART_REPOSITORY := $(or $(HELM_CHART_REPOSITORY),http://helm-repo:8080)
HELM_CHART_REPOSITORY_USERNAME := $(or $(HELM_CHART_REPOSITORY_USERNAME),light)
HELM_CHART_REPOSITORY_PASSWORD := $(or $(HELM_CHART_REPOSITORY_PASSWORD),light)

INSTALL_PATH ?= $(shell component-tool localpath --repo=los-csi --type=$(BUILD_TYPE) lb-csi-plugin)

ifeq ($(INSTALL_PATH),"")
$(error "lb-csi install path is not specified")
endif

override BUILD_HASH := $(shell component-tool version --repo los-csi --type=$(BUILD_TYPE) lb-csi-plugin)

override DISCOVERY_CLIENT_BUILD_HASH := $(shell component-tool version --repo discovery-client lb-nvme-discovery-client)

BUILD_FLAGS := DOCKER_REGISTRY=$(DOCKER_REGISTRY) \
SIDECAR_DOCKER_REGISTRY=$(SIDECAR_DOCKER_REGISTRY) \
BUILD_HASH=$(BUILD_HASH) \
DISCOVERY_CLIENT_BUILD_HASH=$(DISCOVERY_CLIENT_BUILD_HASH) \
HELM_CHART_REPOSITORY=$(HELM_CHART_REPOSITORY) \
HELM_CHART_REPOSITORY_USERNAME=$(HELM_CHART_REPOSITORY_USERNAME) \
HELM_CHART_REPOSITORY_PASSWORD=$(HELM_CHART_REPOSITORY_PASSWORD)

.PHONY: all checkout_deps build clean install_dir install checkin

all: docker-build docker-bundle install

checkout_deps:
$(Q)lb-build -d -o

clean:
$(Q)$(MAKE) -f Makefile clean

install_dir:
$(Q)mkdir -p $(INSTALL_PATH)

install: |install_dir
$(Q) $(BUILD_FLAGS) $(MAKE) -f Makefile push
$(Q)cp -r deploy $(INSTALL_PATH)/
$(Q)$(call save_manifest,lb-csi:lb-csi-plugin,$(INSTALL_PATH))

checkin:
$(Q)component-tool checkin -v --repo=lb-csi lb-csi-plugin

.DEFAULT: ## passthrough each command to the Makefile with predefined lightbits specific variables.
$(Q)$(BUILD_FLAGS) $(MAKE) --no-print-directory -f Makefile "$@"

2 changes: 1 addition & 1 deletion deploy/helm/lb-csi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ imagePullPolicy: IfNotPresent
imagePullSecrets: []
discoveryClientInContainer: false
maxIOQueues: 0
discoveryClientImage: "lb-nvme-discovery-client:1.14.0"
discoveryClientImage: "lb-nvme-discovery-client:6b979cb7"
controllerServiceAccountName: lb-csi-ctrl-sa
nodeServiceAccountName: lb-csi-node-sa
kubeletRootDir: /var/lib/kubelet
Expand Down
32 changes: 32 additions & 0 deletions lb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
los-csi:
lb-csi-plugin:
build:
- make -f Makefile.lb docker-build docker-bundle
install:
- make -f Makefile.lb install
checkin:
- make -f Makefile.lb checkin
deps:
- file://Makefile
- file://Makefile.lb
- file://main.go
- file://pkg
- file://deploy/Dockerfile
- file://Dockerfile.builder
- file://deploy/licenses
- file://go.mod
- file://go.sum
- file://VERSION
- file://lb.yaml
lb-csi-bundle:
build:
- make -f Makefile.lb docker-bundle
deps:
- file://Makefile
- file://Makefile.lb
- file://main.go
- file://pkg
- file://deploy
- file://go.mod
- file://go.sum
- file://VERSION