Skip to content

Commit 949d384

Browse files
committed
build: update for arm
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
1 parent 8cbdc8d commit 949d384

9 files changed

Lines changed: 780 additions & 308 deletions

File tree

.github/workflows/slurm-containers.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/checkout@v3
1919
- uses: actions/setup-go@v3
2020
with:
21-
go-version: ^1.23
21+
go-version: ^1.24
2222
- name: GHCR Login
2323
if: (github.event_name != 'pull_request')
2424
uses: docker/login-action@v2
@@ -34,7 +34,7 @@ jobs:
3434
docker buildx inspect --bootstrap
3535
3636
- name: Build and Deploy Container
37-
run: docker buildx build -f docker/Dockerfile.ubuntu --platform linux/arm64 --push -t ${{ env.container }}:ubuntu-arm ./docker
37+
run: docker buildx build -f docker/Dockerfile.ubuntu --build-arg ARCH=arm64 --platform linux/arm64 --push -t ${{ env.container }}:ubuntu-arm ./docker
3838

3939
build-arm:
4040
env:
@@ -46,7 +46,7 @@ jobs:
4646
uses: actions/checkout@v3
4747
- uses: actions/setup-go@v3
4848
with:
49-
go-version: ^1.23
49+
go-version: ^1.24
5050
- name: GHCR Login
5151
if: (github.event_name != 'pull_request')
5252
uses: docker/login-action@v2
@@ -62,7 +62,7 @@ jobs:
6262
docker buildx inspect --bootstrap
6363
6464
- name: Build and Deploy Container
65-
run: docker buildx build -f docker/Dockerfile --platform linux/arm64 --push -t ${{ env.container }}:arm ./docker
65+
run: docker buildx build -f docker/Dockerfile --build-arg ARCH=arm64 --platform linux/arm64 --push -t ${{ env.container }}:arm ./docker
6666

6767

6868
build:

Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ docker-build: test ## Build docker image with the manager.
129129

130130
.PHONY: arm-build
131131
arm-build: test ## Build docker image with the manager.
132-
docker buildx build --platform linux/arm64 -t ${ARMIMG} .
132+
docker buildx build ARCH=arm64 --platform linux/arm64 -t ${ARMIMG} .
133133

134134
.PHONY: arm-deploy
135135
arm-deploy: manifests kustomize
136-
docker buildx build --platform linux/arm64 --push -t ${ARMIMG} .
136+
docker buildx build --platform linux/arm64 --build-arg ARCH=arm64 --push -t ${ARMIMG} .
137137
cd config/manager && $(KUSTOMIZE) edit set image controller=${ARMIMG}
138138
$(KUSTOMIZE) build config/default > examples/dist/slurm-operator-arm.yaml
139139

@@ -218,6 +218,12 @@ test-deploy: manifests kustomize
218218
$(KUSTOMIZE) build config/default > examples/dist/slurm-operator-dev.yaml
219219
sed -i 's/ imagePullPolicy: IfNotPresent/ imagePullPolicy: Always/' examples/dist/slurm-operator-dev.yaml
220220

221+
222+
.PHONY: build-config-arm
223+
build-config-arm: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
224+
cd config/manager && $(KUSTOMIZE) edit set image controller=${ARMIMG}
225+
$(KUSTOMIZE) build config/default > examples/dist/slurm-operator-arm.yaml
226+
221227
.PHONY: test-deploy-recreate
222228
test-deploy-recreate: test-deploy
223229
kubectl delete -f ./examples/dist/slurm-operator-dev.yaml || echo "Already deleted"
@@ -229,7 +235,7 @@ list:
229235

230236
## Tool Versions
231237
KUSTOMIZE_VERSION ?= v3.8.7
232-
CONTROLLER_TOOLS_VERSION ?= v0.14.0
238+
CONTROLLER_TOOLS_VERSION ?= v0.19.0
233239

234240
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
235241
.PHONY: kustomize

config/crd/bases/flux-framework.org_slurms.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.19.0
77
name: slurms.flux-framework.org
88
spec:
99
group: flux-framework.org

config/manager/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ kind: Kustomization
55
images:
66
- name: controller
77
newName: ghcr.io/converged-computing/slurm-operator
8-
newTag: latest
8+
newTag: arm

config/rbac/role.yaml

Lines changed: 9 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -7,151 +7,18 @@ rules:
77
- apiGroups:
88
- ""
99
resources:
10-
- events
11-
verbs:
12-
- create
13-
- update
14-
- watch
15-
- apiGroups:
16-
- batch
17-
resources:
18-
- jobs
19-
verbs:
20-
- create
21-
- delete
22-
- exec
23-
- get
24-
- list
25-
- patch
26-
- update
27-
- watch
28-
- apiGroups:
29-
- batch
30-
resources:
31-
- jobs/status
32-
verbs:
33-
- create
34-
- delete
35-
- exec
36-
- get
37-
- list
38-
- patch
39-
- update
40-
- watch
41-
- apiGroups:
4210
- ""
43-
resources:
44-
- ""
45-
verbs:
46-
- create
47-
- delete
48-
- get
49-
- list
50-
- patch
51-
- update
52-
- watch
53-
- apiGroups:
54-
- ""
55-
resources:
5611
- batch
57-
verbs:
58-
- create
59-
- delete
60-
- get
61-
- list
62-
- patch
63-
- update
64-
- watch
65-
- apiGroups:
66-
- ""
67-
resources:
6812
- configmaps
69-
verbs:
70-
- create
71-
- delete
72-
- get
73-
- list
74-
- patch
75-
- update
76-
- watch
77-
- apiGroups:
78-
- ""
79-
resources:
80-
- events
81-
verbs:
82-
- create
83-
- patch
84-
- apiGroups:
85-
- ""
86-
resources:
8713
- jobs
88-
verbs:
89-
- create
90-
- delete
91-
- get
92-
- list
93-
- patch
94-
- update
95-
- watch
96-
- apiGroups:
97-
- ""
98-
resources:
99-
- networks
100-
verbs:
101-
- create
102-
- patch
103-
- apiGroups:
104-
- ""
105-
resources:
10614
- persistentvolumeclaims
107-
verbs:
108-
- create
109-
- delete
110-
- get
111-
- list
112-
- patch
113-
- update
114-
- watch
115-
- apiGroups:
116-
- ""
117-
resources:
11815
- persistentvolumes
119-
verbs:
120-
- create
121-
- delete
122-
- get
123-
- list
124-
- patch
125-
- update
126-
- watch
127-
- apiGroups:
128-
- ""
129-
resources:
13016
- pods
131-
verbs:
132-
- create
133-
- delete
134-
- get
135-
- list
136-
- patch
137-
- update
138-
- watch
139-
- apiGroups:
140-
- ""
141-
resources:
14217
- pods/exec
143-
verbs:
144-
- create
145-
- delete
146-
- get
147-
- list
148-
- patch
149-
- update
150-
- watch
151-
- apiGroups:
152-
- ""
153-
resources:
15418
- pods/log
19+
- secrets
20+
- services
21+
- statefulsets
15522
verbs:
15623
- create
15724
- delete
@@ -163,34 +30,28 @@ rules:
16330
- apiGroups:
16431
- ""
16532
resources:
166-
- secrets
33+
- events
16734
verbs:
16835
- create
169-
- delete
170-
- get
171-
- list
17236
- patch
17337
- update
17438
- watch
17539
- apiGroups:
17640
- ""
17741
resources:
178-
- services
42+
- networks
17943
verbs:
18044
- create
181-
- delete
182-
- get
183-
- list
18445
- patch
185-
- update
186-
- watch
18746
- apiGroups:
188-
- ""
47+
- batch
18948
resources:
190-
- statefulsets
49+
- jobs
50+
- jobs/status
19151
verbs:
19252
- create
19353
- delete
54+
- exec
19455
- get
19556
- list
19657
- patch

docker/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
FROM rockylinux:9
22

3+
# docker build --network=host -t ghcr.io/converged-computing/slurm:arm-hpc7g .
4+
ARG ARCH=amd64
5+
ENV ARCH=$ARCH
6+
37
# From https://github.com/giovtorres/slurm-docker-cluster/blob/52b5f9e5a9a7b149900404077e377e8daedf1a8c/Dockerfile
48
# Moved here to have automated build
59
LABEL org.opencontainers.image.source="https://github.com/converged-computing/slurm-operator" \
@@ -42,8 +46,8 @@ RUN set -ex \
4246
RUN pip3 install Cython nose
4347

4448
RUN set -ex \
45-
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" \
46-
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64.asc" \
49+
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-${ARCH}" \
50+
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-${ARCH}.asc" \
4751
&& export GNUPGHOME="$(mktemp -d)" \
4852
&& gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
4953
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \

docker/Dockerfile.ubuntu

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM ubuntu:24.04
22

3+
# for arm, hpc7g on aws 4/22/2026
4+
# docker build --network=host -f Dockerfile.ubuntu -t ghcr.io/converged-computing/slurm:ubuntu-arm-hpc7g .
5+
36
LABEL org.opencontainers.image.source="https://github.com/converged-computing/slurm-operator" \
47
org.opencontainers.image.title="slurm-operator" \
58
org.opencontainers.image.description="Slurm in Kubernetes on Ubuntu" \

0 commit comments

Comments
 (0)