diff --git a/Dockerfile b/Dockerfile index 3b4b87c..c156417 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,23 @@ +# +# 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, +# 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. + # Builder stage for compiling go source code -FROM golang:1.19 as builder +FROM golang:1.21 as builder WORKDIR /workspace @@ -31,4 +49,4 @@ COPY --from=builder /workspace/lustre-csi-driver . # See mount.lustre description in sbin/README.md COPY sbin/mount.lustre-cray /sbin/mount.lustre -ENTRYPOINT ["/lustre-csi-driver"] \ No newline at end of file +ENTRYPOINT ["/lustre-csi-driver"] diff --git a/go.mod b/go.mod index c4e7a3e..1b176ca 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/HewlettPackard/lustre-csi-driver -go 1.19 +go 1.21 require ( github.com/container-storage-interface/spec v1.5.0 diff --git a/hack/make-kustomization.sh b/hack/make-kustomization.sh index 78034df..362a298 100755 --- a/hack/make-kustomization.sh +++ b/hack/make-kustomization.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2023 Hewlett Packard Enterprise Development LP +# 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, @@ -29,10 +29,44 @@ then mkdir "$OVERLAY_DIR" fi +COMPONENT_LABELS=" + - op: add + path: /metadata/labels/app.kubernetes.io~1version + value: "$TAG" + - op: add + path: /metadata/labels/app.kubernetes.io~1component + value: lustre-csi-driver +" + +NNF_VER_LABELS="" +if [[ -n $NNF_VERSION ]] +then + NNF_VER_LABELS=" + - op: add + path: /metadata/labels/app.kubernetes.io~1nnf-version + value: "$NNF_VERSION" + - op: add + path: /metadata/labels/app.kubernetes.io~1part-of + value: nnf +" +fi + cat < "$OVERLAY_DIR"/kustomization.yaml resources: - ../$OVERLAY +patches: +- target: + kind: Deployment + patch: |- +$COMPONENT_LABELS +$NNF_VER_LABELS +- target: + kind: DaemonSet + patch: |- +$COMPONENT_LABELS +$NNF_VER_LABELS + apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: