Skip to content

Commit

Permalink
Merge pull request #58 from HewlettPackard/release-v0.0.7
Browse files Browse the repository at this point in the history
Release v0.0.7
  • Loading branch information
ajfloeder authored Jan 12, 2024
2 parents 6c57f75 + fb4bc47 commit daa1cff
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,8 @@ testbin/*
.version

# Go-generated vendor/ directory
vendor/
vendor/

# Generated overlay for setting image tag
deploy/kubernetes/begin/*

12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021-2023 Hewlett Packard Enterprise Development LP
# Copyright 2021-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,
Expand Down Expand Up @@ -28,6 +28,7 @@ IMAGE_TAG_BASE ?= ghcr.io/hewlettpackard/lustre-csi-driver
# Or, make kind-deploy
# To deploy the base lustre config:
# make deploy
OVERLAY ?= overlays/kind

all: build

Expand All @@ -51,14 +52,14 @@ docker-build: .version Dockerfile fmt vet

edit-image: VERSION ?= $(shell cat .version)
edit-image: .version ## Replace plugin.yaml image with name "controller" -> ghcr tagged container reference
cd deploy/kubernetes/base && $(KUSTOMIZE) edit set image controller=$(IMAGE_TAG_BASE):$(VERSION)
$(KUSTOMIZE_IMAGE_TAG) deploy/kubernetes/begin $(OVERLAY) $(IMAGE_TAG_BASE) $(VERSION)

kind-push: VERSION ?= $(shell cat .version)
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/$(OVERLAY) | kubectl apply -f -
$(KUSTOMIZE) build deploy/kubernetes/begin | kubectl apply -f -

deploy: OVERLAY ?= base
deploy: deploy_overlay
Expand Down Expand Up @@ -100,15 +101,16 @@ $(LOCALBIN):
mkdir -p $(LOCALBIN)

## Tool Binaries
KUSTOMIZE_IMAGE_TAG ?= ./hack/make-kustomization.sh
KUSTOMIZE ?= $(LOCALBIN)/kustomize

## Tool Versions
KUSTOMIZE_VERSION ?= v4.5.7
KUSTOMIZE_VERSION ?= v5.1.1

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
kustomize: $(LOCALBIN) ## Download kustomize locally if necessary.
if [[ ! -s $(LOCALBIN)/kustomize || $$($(LOCALBIN)/kustomize version | awk '{print $$1}' | awk -F/ '{print $$2}') != $(KUSTOMIZE_VERSION) ]]; then \
if [[ ! -s $(LOCALBIN)/kustomize || ! $$($(LOCALBIN)/kustomize version) =~ $(KUSTOMIZE_VERSION) ]]; then \
rm -f $(LOCALBIN)/kustomize && \
{ curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); }; \
fi
2 changes: 1 addition & 1 deletion charts/lustre-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

deployment:
image: "ghcr.io/hewlettpackard/lustre-csi-driver"
tag: "0.0.6"
tag: "0.0.7"
2 changes: 1 addition & 1 deletion deploy/kubernetes/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ resources:
images:
- name: controller
newName: ghcr.io/hewlettpackard/lustre-csi-driver
newTag: 0.0.6
newTag: 0.0.7
18 changes: 18 additions & 0 deletions hack/boilerplate.go.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright 2023 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.
*/
42 changes: 42 additions & 0 deletions hack/make-kustomization.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

# Copyright 2023 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

OVERLAY_DIR=$1
OVERLAY=$2
IMAGE_TAG_BASE=$3
TAG=$4

if [[ ! -d $OVERLAY_DIR ]]
then
mkdir "$OVERLAY_DIR"
fi

cat <<EOF > "$OVERLAY_DIR"/kustomization.yaml
resources:
- ../$OVERLAY
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: $IMAGE_TAG_BASE
newTag: $TAG
EOF

0 comments on commit daa1cff

Please sign in to comment.