Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/one_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ jobs:
make docker-build UNSTABLE="${UNSTABLE}" IMAGE_NAME=populate_jail DOCKERFILE=populate_jail/populate_jail.dockerfile
make docker-push UNSTABLE="${UNSTABLE}" IMAGE_NAME=populate_jail

echo "Building image of the soperatorchecks"
make docker-build UNSTABLE="${UNSTABLE}" IMAGE_NAME=soperatorchecks DOCKERFILE=soperatorchecks.dockerfile IMAGE_VERSION="$OPERATOR_IMAGE_TAG"
echo "Pushing image of the soperatorchecks"
make docker-push UNSTABLE="${UNSTABLE}" IMAGE_NAME=soperatorchecks IMAGE_VERSION="$OPERATOR_IMAGE_TAG"

echo "Building image of the operator"
make docker-build UNSTABLE="${UNSTABLE}" IMAGE_NAME=slurm-operator DOCKERFILE=Dockerfile IMAGE_VERSION="$OPERATOR_IMAGE_TAG"
echo "Pushing image of the operator"
Expand Down
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,7 @@ endif
ifndef DOCKERFILE
$(error DOCKERFILE is not set, docker image cannot be built)
endif
ifeq (${IMAGE_NAME},slurm-operator)
docker build $(DOCKER_BUILD_ARGS) --tag $(IMAGE_REPO)/${IMAGE_NAME}:${IMAGE_VERSION} --target ${IMAGE_NAME} ${DOCKER_IGNORE_CACHE} ${DOCKER_LOAD} ${DOCKER_BUILD_PLATFORM} -f ${DOCKERFILE} ${DOCKER_OUTPUT} .
else ifeq ($(IMAGE_NAME),rebooter)
ifeq ($(filter ${IMAGE_NAME},slurm-operator rebooter soperatorchecks),${IMAGE_NAME})
docker build $(DOCKER_BUILD_ARGS) --tag $(IMAGE_REPO)/${IMAGE_NAME}:${IMAGE_VERSION} --target ${IMAGE_NAME} ${DOCKER_IGNORE_CACHE} ${DOCKER_LOAD} ${DOCKER_BUILD_PLATFORM} -f ${DOCKERFILE} ${DOCKER_OUTPUT} .
else
cd images && docker build $(DOCKER_BUILD_ARGS) --tag $(IMAGE_REPO)/${IMAGE_NAME}:${IMAGE_VERSION} --target ${IMAGE_NAME} ${DOCKER_IGNORE_CACHE} ${DOCKER_LOAD} ${DOCKER_BUILD_PLATFORM} -f ${DOCKERFILE} ${DOCKER_OUTPUT} .
Expand Down
3 changes: 3 additions & 0 deletions config/soperatorchecks/soperatorchecks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ spec:
- /usr/bin/soperatorchecks
args:
- --leader-elect
env:
- name: SLURM_OPERATOR_WATCH_NAMESPACES
value: "*"
image: controller:1.18.2
imagePullPolicy: Always
name: manager
Expand Down
2 changes: 2 additions & 0 deletions helm/soperatorchecks/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ spec:
command:
- /usr/bin/soperatorchecks
env:
- name: SLURM_OPERATOR_WATCH_NAMESPACES
value: {{ quote .Values.checks.manager.env.slurmOperatorWatchNamespaces }}
- name: KUBERNETES_CLUSTER_DOMAIN
value: {{ quote .Values.kubernetesClusterDomain }}
image: {{ .Values.checks.manager.image.repository }}:{{ .Values.checks.manager.image.tag
Expand Down
2 changes: 2 additions & 0 deletions helm/soperatorchecks/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ checks:
capabilities:
drop:
- ALL
env:
slurmOperatorWatchNamespaces: '*'
image:
repository: cr.eu-north1.nebius.cloud/soperator/soperatorchecks
tag: 1.18.2
Expand Down
30 changes: 30 additions & 0 deletions soperatorchecks.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM golang:1.23@sha256:927112936d6b496ed95f55f362cc09da6e3e624ef868814c56d55bd7323e0959 AS soperatorchecks_builder

ARG GO_LDFLAGS=""
ARG BUILD_TIME
ARG CGO_ENABLED=0
ARG GOOS=linux
ARG GOARCH=amd64

WORKDIR /operator

COPY . ./

RUN go mod download

RUN GOOS=$GOOS GOARCH=$GOARCH CGO_ENABLED=$CGO_ENABLED GO_LDFLAGS=$GO_LDFLAGS \
go build -o soperatorchecks ./cmd/soperatorchecks

#######################################################################################################################
FROM alpine:latest@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c AS soperatorchecks

COPY --from=soperatorchecks_builder /operator/soperatorchecks /usr/bin/

RUN addgroup -S -g 1001 soperatorchecks && \
adduser -S -u 1001 soperatorchecks -G soperatorchecks soperatorchecks && \
chown 1001:1001 /usr/bin/soperatorchecks && \
chmod 755 /usr/bin/soperatorchecks

USER 1001

CMD ["/usr/bin/soperatorchecks"]
Loading