Skip to content

Commit

Permalink
ubi micro update (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
nitesh3108 authored Jun 2, 2023
1 parent b81a95e commit 9bfdc2f
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 22 deletions.
14 changes: 2 additions & 12 deletions Dockerfile.podman
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2021-2022 Dell Inc. or its subsidiaries. All Rights Reserved.
# Copyright © 2021-2023 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -26,17 +26,7 @@ RUN CGO_ENABLED=0 \

# Stage to build the driver image
FROM $BASEIMAGE AS driver
# install necessary packages
# alphabetical order for easier maintenance
RUN microdnf update -y && \
microdnf install -y \
e4fsprogs \
libaio \
libuuid \
nfs-utils \
numactl \
xfsprogs && \
microdnf clean all

# copy in the driver
COPY --from=builder /go/src/csi-isilon /
ENTRYPOINT ["/csi-isilon"]
Expand Down
24 changes: 24 additions & 0 deletions buildubimicro.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# Copyright © 2023 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# 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

# overrides file
# this file, included from the Makefile, will overlay default values with environment variables
#

microcontainer=$(buildah from $1)
micromount=$(buildah mount $microcontainer)
dnf install --installroot $micromount --releasever=8 --nodocs --setopt install_weak_deps=false --setopt=reposdir=/etc/yum.repos.d/ libaio libuuid numactl xfsprogs e4fsprogs nfs-utils -y
dnf clean all --installroot $micromount
buildah umount $microcontainer
buildah commit $microcontainer csipowerscale-ubimicro
3 changes: 3 additions & 0 deletions docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ docker-build-image-push:

podman-build:
@echo "Base Image is set to: $(BASEIMAGE)"
@echo "Adding Driver dependencies to $(BASEIMAGE)"
bash ./buildubimicro.sh $(BASEIMAGE)
@echo "Base image build: SUCCESS" $(eval BASEIMAGE=localhost/csipowerscale-ubimicro:latest)
@echo "Building: $(REGISTRY)/$(IMAGENAME):$(IMAGETAG)"
$(BUILDER) build -t "$(REGISTRY)/$(IMAGENAME):$(IMAGETAG)" -f Dockerfile.podman --target $(BUILDSTAGE) --build-arg GOPROXY=$(GOPROXY) --build-arg BASEIMAGE=$(BASEIMAGE) --build-arg GOVERSION=$(GOVERSION) .

Expand Down
14 changes: 7 additions & 7 deletions helm/csi-isilon/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,47 @@ Return the appropriate sidecar images based on k8s version
{{- define "csi-isilon.attacherImage" -}}
{{- if eq .Capabilities.KubeVersion.Major "1" }}
{{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "27") -}}
{{- print "registry.k8s.io/sig-storage/csi-attacher:v4.2.0" -}}
{{- print "registry.k8s.io/sig-storage/csi-attacher:v4.3.0" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{- define "csi-isilon.provisionerImage" -}}
{{- if eq .Capabilities.KubeVersion.Major "1" }}
{{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "27") -}}
{{- print "registry.k8s.io/sig-storage/csi-provisioner:v3.4.0" -}}
{{- print "registry.k8s.io/sig-storage/csi-provisioner:v3.5.0" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{- define "csi-isilon.snapshotterImage" -}}
{{- if eq .Capabilities.KubeVersion.Major "1" }}
{{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "27") -}}
{{- print "registry.k8s.io/sig-storage/csi-snapshotter:v6.2.1" -}}
{{- print "registry.k8s.io/sig-storage/csi-snapshotter:v6.2.2" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{- define "csi-isilon.resizerImage" -}}
{{- if eq .Capabilities.KubeVersion.Major "1" }}
{{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "27") -}}
{{- print "registry.k8s.io/sig-storage/csi-resizer:v1.7.0" -}}
{{- print "registry.k8s.io/sig-storage/csi-resizer:v1.8.0" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{- define "csi-isilon.registrarImage" -}}
{{- if eq .Capabilities.KubeVersion.Major "1" }}
{{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "27") -}}
{{- print "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.3" -}}
{{- print "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.8.0" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{- define "csi-isilon.healthmonitorImage" -}}
{{- if eq .Capabilities.KubeVersion.Major "1" }}
{{- if and (ge (trimSuffix "+" .Capabilities.KubeVersion.Minor) "21") (le (trimSuffix "+" .Capabilities.KubeVersion.Minor) "27") -}}
{{- print "registry.k8s.io/sig-storage/csi-external-health-monitor-controller:v0.8.0" -}}
{{- print "registry.k8s.io/sig-storage/csi-external-health-monitor-controller:v0.9.0" -}}
{{- end -}}
{{- end -}}
{{- end -}}
Expand All @@ -58,4 +58,4 @@ Return true if storage capacity tracking is enabled and is supported based on k8
{{- true -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
6 changes: 3 additions & 3 deletions overrides.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2020-2022 Dell Inc. or its subsidiaries. All Rights Reserved.
# Copyright © 2020-2023 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -15,8 +15,8 @@
#

# DEFAULT values
# ubi8/ubi-minimal:8.7-1085
DEFAULT_BASEIMAGE="registry.access.redhat.com/ubi8/ubi-minimal@sha256:ab03679e683010d485ef0399e056b09a38d7843ba4a36ee7dec337dd0037f7a7"
# ubi8/ubi-micro:8.8-1
DEFAULT_BASEIMAGE="registry.access.redhat.com/ubi8/ubi-micro:8.8-1"
DEFAULT_GOVERSION="1.20"
DEFAULT_REGISTRY=""
DEFAULT_IMAGENAME="isilon"
Expand Down

0 comments on commit 9bfdc2f

Please sign in to comment.