-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[controller] New version of extender scheduler (#5)
Signed-off-by: Viktor Kramarenko <viktor.kramarenko@flant.com>
- Loading branch information
1 parent
3e14607
commit eb910cf
Showing
5 changed files
with
570 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
SHELL := /bin/bash | ||
TEST-ARGS=-race -timeout 30s -count 1 | ||
base_golang_20_alpine := golang:1.20-alpine3.18 | ||
repo_fox := registry.flant.com/deckhouse/storage | ||
image_name := sds-lvm | ||
|
||
|
||
deployment_name=sds-lvm-controller | ||
deployment_container_name=sds-lvm-controller | ||
namespace=d8-sds-lvm | ||
system_namespace=d8-system | ||
pull_secret_name=fox-registry | ||
|
||
USER := $(shell whoami) | ||
image_tag := sds-lvm-controller-$(USER) | ||
|
||
run: ## run go | ||
go run -race ./cmd/main.go | ||
|
||
test: | ||
go test $(TEST-ARGS) ./... | ||
|
||
fox_build_and_push: | ||
docker build --build-arg="BASE_GOLANG_20_ALPINE_BUILDER=$(base_golang_20_alpine)" . -t $(repo_fox)/$(image_name):$(image_tag) | ||
docker push $(repo_fox)/$(image_name):$(image_tag) | ||
|
||
redeploy: | ||
kubectl -n $(namespace) rollout restart deployment $(deployment_name) | ||
kubectl -n $(namespace) rollout restart daemonset $(daemonset_name) | ||
|
||
switch_to_local_dev: | ||
kubectl -n $(system_namespace) scale deployment deckhouse --replicas=0 | ||
kubectl -n $(namespace) patch deployment $(deployment_name) -p \ | ||
'{"spec": {"template": {"spec": {"containers": [{"name": "$(deployment_container_name)", "image": "$(repo_fox)/$(image_name):$(image_tag)"}]}}}}' | ||
kubectl -n $(namespace) patch deployment $(deployment_name) -p \ | ||
'{"spec": {"template": {"spec": {"containers": [{"name": "$(deployment_container_name)", "imagePullPolicy": "Always"}]}}}}' | ||
kubectl -n $(namespace) patch deployment $(deployment_name) --type='json' \ | ||
-p='[{"op": "add", "path": "/spec/template/spec/imagePullSecrets", "value": [{"name": "$(pull_secret_name)"}]}]' | ||
|
||
|
||
.PHONY: switch_to_local_dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.