From 51493fff59d04e72e721f07c65c895d5f94d6023 Mon Sep 17 00:00:00 2001 From: Dean Roehrich Date: Mon, 29 Jan 2024 13:00:19 -0600 Subject: [PATCH 1/3] Preserve the service namespace during undeploy (#59) If a pod is on a host that cannot be reached, then any attempt to delete the namespace will hang. So change this to preserve the namespace and leave that pod for k8s to cleanup when it can. Signed-off-by: Dean Roehrich --- Makefile | 5 +++-- deploy.sh | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100755 deploy.sh diff --git a/Makefile b/Makefile index bdcde16..39ff8f7 100644 --- a/Makefile +++ b/Makefile @@ -59,8 +59,9 @@ kind-push: .version ## Push image to Kind environment kind load docker-image $(IMAGE_TAG_BASE):$(VERSION) deploy_overlay: kustomize edit-image ## Deploy controller to the K8s cluster specified in ~/.kube/config. - $(KUSTOMIZE) build deploy/kubernetes/begin | kubectl apply -f - + ./deploy.sh deploy $(KUSTOMIZE) deploy/kubernetes/begin +.PHONY: deploy deploy: OVERLAY ?= base deploy: deploy_overlay @@ -68,7 +69,7 @@ kind-deploy: OVERLAY=overlays/kind kind-deploy: deploy_overlay undeploy_overlay: kustomize ## Undeploy controller from the K8s cluster specified in ~/.kube/config. - $(KUSTOMIZE) build deploy/kubernetes/$(OVERLAY) | kubectl delete -f - + ./deploy.sh undeploy $(KUSTOMIZE) deploy/kubernetes/$(OVERLAY) undeploy: OVERLAY ?= lustre undeploy: undeploy_overlay diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..a8805c5 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# Copyright 2023-2024 Hewlett Packard Enterprise Development LP +# Other additional copyright holders may be indicated within. +# +# The entirety of this work is licensed under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -e + +# Deploy/undeploy controller to the K8s cluster specified in ~/.kube/config. + +CMD=$1 +KUSTOMIZE=$2 +OVERLAY_DIR=$3 + +if [[ $CMD == 'deploy' ]]; then + $KUSTOMIZE build $OVERLAY_DIR | kubectl apply -f - +fi + +if [[ $CMD == 'undeploy' ]]; then + # Do not touch the namespace resource when deleting this service. + $KUSTOMIZE build $OVERLAY_DIR | yq eval 'select(.kind != "Namespace")' | kubectl delete --ignore-not-found -f - +fi + +exit 0 + From 7f6503264938920b259286d1bfd46977bf210367 Mon Sep 17 00:00:00 2001 From: Dean Roehrich Date: Tue, 30 Jan 2024 11:18:27 -0600 Subject: [PATCH 2/3] Bump boilerplate copyright to 2024 (#60) Signed-off-by: Dean Roehrich --- hack/boilerplate.go.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/boilerplate.go.txt b/hack/boilerplate.go.txt index 4798354..1c390a7 100644 --- a/hack/boilerplate.go.txt +++ b/hack/boilerplate.go.txt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Hewlett Packard Enterprise Development LP + * Copyright 2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, From 47e5987546906380df82acd709a11f92ba40e340 Mon Sep 17 00:00:00 2001 From: Anthony Floeder Date: Fri, 9 Feb 2024 10:27:14 -0600 Subject: [PATCH 3/3] Release updates for v0.0.8 Signed-off-by: Anthony Floeder --- charts/lustre-csi-driver/values.yaml | 2 +- deploy/kubernetes/base/kustomization.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/lustre-csi-driver/values.yaml b/charts/lustre-csi-driver/values.yaml index adfe99d..6697b03 100644 --- a/charts/lustre-csi-driver/values.yaml +++ b/charts/lustre-csi-driver/values.yaml @@ -4,4 +4,4 @@ deployment: image: "ghcr.io/hewlettpackard/lustre-csi-driver" - tag: "0.0.7" + tag: "0.0.8" diff --git a/deploy/kubernetes/base/kustomization.yaml b/deploy/kubernetes/base/kustomization.yaml index 60ca27a..60e93c1 100644 --- a/deploy/kubernetes/base/kustomization.yaml +++ b/deploy/kubernetes/base/kustomization.yaml @@ -13,4 +13,4 @@ resources: images: - name: controller newName: ghcr.io/hewlettpackard/lustre-csi-driver - newTag: 0.0.7 + newTag: 0.0.8