Skip to content

Commit 005a3a9

Browse files
authored
Merge pull request #349 from andyzhangx/armv7
feat: support armv7 image build
2 parents c90819d + c9d473f commit 005a3a9

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export GOPATH GOBIN GO111MODULE DOCKER_CLI_EXPERIMENTAL
4141
# Generate all combination of all OS, ARCH, and OSVERSIONS for iteration
4242
ALL_OS = linux windows
4343
ALL_ARCH.linux = arm64 amd64
44-
ALL_OS_ARCH.linux = $(foreach arch, ${ALL_ARCH.linux}, linux-$(arch))
44+
ALL_OS_ARCH.linux = linux-arm64 linux-arm-v7 linux-amd64
4545
ALL_ARCH.windows = amd64
4646
ALL_OSVERSIONS.windows := 1809 1903 1909 2004
4747
ALL_OS_ARCH.windows = $(foreach arch, $(ALL_ARCH.windows), $(foreach osversion, ${ALL_OSVERSIONS.windows}, windows-${osversion}-${arch}))
@@ -121,6 +121,10 @@ e2e-teardown:
121121
smb:
122122
CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) go build -a -ldflags ${LDFLAGS} -mod vendor -o _output/${ARCH}/smbplugin ./pkg/smbplugin
123123

124+
.PHONY: smb-armv7
125+
smb-armv7:
126+
CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -a -ldflags ${LDFLAGS} -mod vendor -o _output/arm/v7/smbplugin ./pkg/smbplugin
127+
124128
.PHONY: smb-windows
125129
smb-windows:
126130
CGO_ENABLED=0 GOOS=windows go build -a -ldflags ${LDFLAGS} -mod vendor -o _output/${ARCH}/smbplugin.exe ./pkg/smbplugin
@@ -138,6 +142,11 @@ container-linux:
138142
docker buildx build --pull --output=type=$(OUTPUT_TYPE) --platform="linux/$(ARCH)" \
139143
-t $(IMAGE_TAG)-linux-$(ARCH) --build-arg ARCH=$(ARCH) -f ./pkg/smbplugin/Dockerfile .
140144

145+
.PHONY: container-linux-armv7
146+
container-linux-armv7:
147+
docker buildx build --pull --output=type=$(OUTPUT_TYPE) --platform="linux/arm/v7" \
148+
-t $(IMAGE_TAG)-linux-arm-v7 --build-arg ARCH=arm/v7 -f ./pkg/smbplugin/Dockerfile .
149+
141150
.PHONY: container-windows
142151
container-windows:
143152
docker buildx build --pull --output=type=$(OUTPUT_TYPE) --platform="windows/$(ARCH)" \
@@ -156,6 +165,8 @@ container-all: smb-windows
156165
ARCH=$${arch} $(MAKE) smb; \
157166
ARCH=$${arch} $(MAKE) container-linux; \
158167
done
168+
$(MAKE) smb-armv7
169+
$(MAKE) container-linux-armv7
159170
for osversion in $(ALL_OSVERSIONS.windows); do \
160171
OSVERSION=$${osversion} $(MAKE) container-windows; \
161172
done
-1 Bytes
Binary file not shown.

charts/latest/csi-driver-smb/templates/rbac-csi-smb-controller.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ metadata:
66
name: {{ .Values.serviceAccount.controller }}
77
namespace: {{ .Release.Namespace }}
88
{{ include "smb.labels" . | indent 2 }}
9-
---
10-
{{- end -}}
9+
{{ end }}
1110

1211
{{- if .Values.rbac.create -}}
13-
kind: ClusterRole
12+
---
1413
apiVersion: rbac.authorization.k8s.io/v1
14+
kind: ClusterRole
1515
metadata:
1616
name: {{ .Values.rbac.name }}-external-provisioner-role
1717
{{ include "smb.labels" . | indent 2 }}
@@ -55,4 +55,4 @@ roleRef:
5555
kind: ClusterRole
5656
name: {{ .Values.rbac.name }}-external-provisioner-role
5757
apiGroup: rbac.authorization.k8s.io
58-
{{- end -}}
58+
{{ end }}

0 commit comments

Comments
 (0)