Skip to content

Commit

Permalink
extracted changes for dev experience PR for issue #143
Browse files Browse the repository at this point in the history
  • Loading branch information
imuni4fun committed Feb 16, 2024
1 parent 901c5d2 commit 74edb81
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 222 deletions.
2 changes: 0 additions & 2 deletions .dockerignore

This file was deleted.

3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
/.idea
id_rsa*
.cache
vendor
test/integration/metrics-manifests/rendered-test.yaml
vendor
19 changes: 1 addition & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ IMAGE_BUILDER ?= docker
IMAGE_BUILD_CMD ?= buildx
REGISTRY ?= docker.io/warmmetal
PLATFORM ?= linux/amd64
KIND ?= kind

export IMG = $(REGISTRY)/csi-image:$(VERSION)

Expand Down Expand Up @@ -52,22 +51,6 @@ image:
local:
$(IMAGE_BUILDER) $(IMAGE_BUILD_CMD) build --platform=$(PLATFORM) -t $(REGISTRY)/csi-image:$(VERSION) --load .

# builds and loads csi-image into kind registry
.PHONY: local-kind-load
local-kind-load:
$(IMAGE_BUILDER) $(IMAGE_BUILD_CMD) build --platform=$(PLATFORM) -t $(REGISTRY)/csi-image:$(VERSION) .
kind load docker-image $(REGISTRY)/csi-image:$(VERSION) --name $(KIND)

# installs/upgrades csi-driver into kind via helm
.PHONY: local-kind-install
local-kind-install:
helm upgrade --install container-image-csi-driver charts/warm-metal-csi-driver -n kube-system -f charts/warm-metal-csi-driver/values.yaml --set csiPlugin.image.tag=$(VERSION) --wait --debug

# removes all images which were directly pushed to kind registry
.PHONY: local-kind-flush
local-kind-flush:
docker exec -e CONTAINERD_NAMESPACE=k8s.io kind-control-plane bash -c "crictl images -o json | jq '.images[] | select((.repoTags == []) or (.repoTags[] | contains(\"docker.io/warmmetal/container-image-csi-driver-test:simple-fs\"))) | .id' -r > '/tmp/TMPFILE';cat /tmp/TMPFILE | awk '{print \"crictl rmi \" \$$1}' | sh;systemctl restart containerd"

.PHONY: test-deps
test-deps:
$(IMAGE_BUILDER) $(IMAGE_BUILD_CMD) build --platform=$(PLATFORM) --push -t $(REGISTRY)/container-image-csi-driver-test:simple-fs -f hack/integration-test-image/container-image-csi-driver-test:simple-fs.dockerfile hack/integration-test-image
Expand All @@ -79,4 +62,4 @@ test-deps:
install-util:
GOOS=linux CGO_ENABLED="0" go build \
-ldflags "-X main.Version=$(VERSION) -X main.Registry=$(REGISTRY)" \
-o _output/warm-metal-csi-image-install ./cmd/install
-o _output/warm-metal-csi-image-install ./cmd/install
35 changes: 0 additions & 35 deletions docs/kind.md

This file was deleted.

164 changes: 0 additions & 164 deletions sample/ephemeral-volume-set.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion sample/ephemeral-volume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
volumeAttributes:
image: "docker.io/warmmetal/container-image-csi-driver-test:simple-fs"
# # set pullAlways if you want to ignore local images
pullAlways: "true"
# pullAlways: "true"
# # set secret if the image is private
# secret: "name of the ImagePullSecret"
# secretNamespace: "namespace of the secret"
Expand Down

0 comments on commit 74edb81

Please sign in to comment.