Skip to content

Upgrade the golang version for the quota-management branch. #313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c03d7c6
update (#298)
kevin85421 Mar 30, 2023
4e8c15a
Upgraded the golang version
z103cb Apr 4, 2023
2413b9c
Updates to go.mod
z103cb Apr 5, 2023
92080d4
Removed unused package.
z103cb Apr 5, 2023
b8bf641
e2e test script updates
z103cb Apr 5, 2023
8f6d3a0
Queue.go updates
z103cb Mar 27, 2023
a491587
Updates to the e2e script
z103cb Apr 5, 2023
0fb9e05
Updates to to local host setup
z103cb Apr 5, 2023
a83bcf7
Changes to the run-e2e-kind.sh locally (#290)
z103cb Apr 5, 2023
cc204e3
Downgraded go to version 1.18 to allow for use of ubi images.
z103cb Apr 6, 2023
0b8d563
Downgraded travis ubuntu distro
z103cb Apr 7, 2023
70cfc8b
Added use of docker builder using ubi8 images
z103cb Apr 7, 2023
394534f
Cleaned up the obsolete build scripts
z103cb Apr 7, 2023
d587352
avoid preempt of failed co-schd pods (#317)
asm582 Apr 7, 2023
bc8fca0
Update CONTROLLER_VERSION
Maxusmusti Apr 7, 2023
50e07ec
Updates to travis and devcontainer
z103cb Apr 10, 2023
eec1ca3
Small updates to the run-e2e test
z103cb Apr 10, 2023
b4033c7
Updated go-restful dependency
z103cb Apr 10, 2023
8086c98
More go.mod updates
z103cb Apr 10, 2023
d5e9b09
Added back in the removal of taints from head node
z103cb Apr 10, 2023
36215a7
Remove whitesapce
z103cb Apr 10, 2023
3c2d181
Small corrections.
z103cb Apr 10, 2023
0499084
Refactoring of env-setup
z103cb Apr 10, 2023
40df1d9
moe arch issues with the kuttl binnary
z103cb Apr 10, 2023
c6fc8ad
Updated the go version in go.mod (#316)
z103cb Apr 13, 2023
301e8f8
Create 1.29.57 release
anishasthana Apr 13, 2023
996e700
Adding Performance test script (#289)
jbusche Apr 18, 2023
38b4d07
fix typo (#326)
lionelvillard Apr 18, 2023
2bde9da
Document updates.
z103cb Apr 19, 2023
e738a4c
remove invalid characters from branch name an replace with - (#328)
KPostOffice Apr 19, 2023
049d0e5
Bump golang.org/x/text from 0.3.4 to 0.3.8 (#321)
dependabot[bot] Apr 19, 2023
ea375fc
Bump golang.org/x/net from 0.0.0-20210405180319-a5a99cb37ef4 to 0.7.0…
dependabot[bot] Apr 20, 2023
35216df
Bump github.com/gogo/protobuf from 1.3.1 to 1.3.2 (#323)
dependabot[bot] Apr 20, 2023
53ede34
Added .devcontainer to gitignore
z103cb Apr 20, 2023
4feef77
Codereview comments.
z103cb Apr 20, 2023
b0c2e61
Bump golang.org/x/crypto from 0.0.0-20201002170205-7f63de1d35b0 to 0.…
dependabot[bot] Apr 20, 2023
ee4acd9
Fixes to the setup part of the script.
z103cb Apr 21, 2023
970dd12
change schedSpec to schedulingSpec and note M1 image for echo server …
sunya-ch Apr 24, 2023
99bd557
Changes user to 1000 (#329)
jbusche Apr 26, 2023
28fe1f4
Address race condition in XController variable (#330)
z103cb Apr 30, 2023
528417a
Merge branch 'main' into quota-management-go-update
z103cb May 2, 2023
39bd977
Fix bad merge.
z103cb May 2, 2023
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,9 @@ kubernetes.tar.gz
/bazel-*
*.pyc

# .devcontainer files
.devcontainer

# .devcontainer files
.devcontainer

8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ services:
- docker

go:
- "1.16.3"
- "1.18.10"

go_import_path: github.com/project-codeflare/multi-cluster-app-dispatcher

install:
- go get -u golang.org/x/lint/golint
install: []


before_script:
- export TEST_LOG_LEVEL=4
- export TEST_LOG_LEVEL=2

script:
- BLUE='\033[34m'
Expand Down
2 changes: 1 addition & 1 deletion CONTROLLER_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.29.55
1.29.58
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM registry.access.redhat.com/ubi8/go-toolset:1.18.10-1 AS BUILDER
ARG GO_BUILD_ARGS
WORKDIR /workdir
USER root

COPY Makefile Makefile
COPY go.mod go.mod
COPY go.sum go.sum
COPY cmd cmd
COPY pkg pkg
COPY hack hack
COPY CONTROLLER_VERSION CONTROLLER_VERSION

RUN cd /workdir && curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/$(go env GOARCH)/kubectl && chmod +x kubectl
ENV GO_BUILD_ARGS=$GO_BUILD_ARGS
RUN echo "Go build args: $GO_BUILD_ARGS" && \
make mcad-controller

FROM registry.access.redhat.com/ubi8/ubi-minimal:latest

COPY --from=BUILDER /workdir/_output/bin/mcad-controller /usr/local/bin
COPY --from=BUILDER /workdir/kubectl /usr/local/bin

RUN true \
&& microdnf update \
&& microdnf clean all \
&& true

WORKDIR /usr/local/bin

RUN chown -R 1000:1000 /usr/local/bin

USER 1000
52 changes: 35 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ VERSION_FILE=./CONTROLLER_VERSION
RELEASE_VER=v$(shell $(CAT_CMD) $(VERSION_FILE))
CURRENT_DIR=$(shell pwd)
GIT_BRANCH:=$(shell git symbolic-ref --short HEAD 2>&1 | grep -v fatal)
#define the GO_BUILD_ARGS if you need to pass additional arguments to the go build
GO_BUILD_ARGS?=

# Reset branch name if this a Travis CI environment
ifneq ($(strip $(TRAVIS_BRANCH)),)
GIT_BRANCH:=${TRAVIS_BRANCH}
Expand All @@ -18,14 +21,23 @@ endif
# Check for current branch name
ifneq ($(strip $(GIT_BRANCH)),)
TAG:=${TAG}${GIT_BRANCH}-

# replace invalid characters that might exist in the branch name
TAG:=$(shell echo ${TAG} | sed 's/[^a-zA-Z0-9]/-/g')
endif
TAG:=${TAG}${RELEASE_VER}

.PHONY: print-global-variables

# Build the controler executable for use in docker image build
mcad-controller: init generate-code
ifeq ($(strip $(GO_BUILD_ARGS)),)
$(info Compiling controller)
CGO_ENABLED=0 GOARCH=amd64 go build -o ${BIN_DIR}/mcad-controller ./cmd/kar-controllers/
CGO_ENABLED=0 go build -o ${BIN_DIR}/mcad-controller ./cmd/kar-controllers/
else
$(info Compiling controller with build arguments: '${GO_BUILD_ARGS}')
go build $(GO_BUILD_ARGS) -o ${BIN_DIR}/mcad-controller ./cmd/kar-controllers/
endif

print-global-variables:
$(info "---")
Expand All @@ -34,6 +46,7 @@ print-global-variables:
$(info " "GIT_BRANCH="$(GIT_BRANCH)")
$(info " "RELEASE_VER="$(RELEASE_VER)")
$(info " "TAG="$(TAG)")
$(info " "GO_BUILD_ARGS="$(GO_BUILD_ARGS)")
$(info "---")

verify: generate-code
Expand All @@ -48,32 +61,42 @@ verify-tag-name: print-global-variables
# Check for invalid tag name
t=${TAG} && [ $${#t} -le 128 ] || { echo "Target name $$t has 128 or more chars"; false; }

generate-code:
$(info Compiling deepcopy-gen...)
go build -o ${BIN_DIR}/deepcopy-gen ./cmd/deepcopy-gen/
generate-code: pkg/apis/controller/v1beta1/zz_generated.deepcopy.go

pkg/apis/controller/v1beta1/zz_generated.deepcopy.go: ${BIN_DIR}/deepcopy-gen
$(info Generating deepcopy...)
${BIN_DIR}/deepcopy-gen -i ./pkg/apis/controller/v1beta1/ -O zz_generated.deepcopy
${BIN_DIR}/deepcopy-gen -i ./pkg/apis/quotaplugins/quotasubtree/v1 -O zz_generated.deepcopy

images: verify-tag-name
${BIN_DIR}/deepcopy-gen:
$(info Compiling deepcopy-gen...)
go build -o ${BIN_DIR}/deepcopy-gen ./cmd/deepcopy-gen/

images: verify-tag-name generate-code
$(info List executable directory)
$(info repo id: ${git_repository_id})
$(info branch: ${GIT_BRANCH})
ls -l ${CURRENT_DIR}/_output/bin
$(info Build the docker image)
docker build --quiet --no-cache --tag mcad-controller:${TAG} -f ${CURRENT_DIR}/deployment/Dockerfile.both ${CURRENT_DIR}/_output/bin
ifeq ($(strip $(GO_BUILD_ARGS)),)
docker build --quiet --no-cache --tag mcad-controller:${TAG} -f ${CURRENT_DIR}/Dockerfile ${CURRENT_DIR}
else
docker build --no-cache --tag mcad-controller:${TAG} --build-arg GO_BUILD_ARGS=$(GO_BUILD_ARGS) -f ${CURRENT_DIR}/Dockerfile ${CURRENT_DIR}
endif

images-podman: verify-tag-name
images-podman: verify-tag-name generate-code
$(info List executable directory)
$(info repo id: ${git_repository_id})
$(info branch: ${GIT_BRANCH})
ls -l ${CURRENT_DIR}/_output/bin
$(info Build the docker image)
podman build --quiet --no-cache --tag mcad-controller:${TAG} -f ${CURRENT_DIR}/deployment/Dockerfile.both ${CURRENT_DIR}/_output/bin
ifeq ($(strip $(GO_BUILD_ARGS)),)
podman build --quiet --no-cache --tag mcad-controller:${TAG} -f ${CURRENT_DIR}/Dockerfile ${CURRENT_DIR}
else
podman build --no-cache --tag mcad-controller:${TAG} --build-arg GO_BUILD_ARGS=$(GO_BUILD_ARGS) -f ${CURRENT_DIR}/Dockerfile ${CURRENT_DIR}
endif

push-images: verify-tag-name
ifeq ($(strip $(quay_repository)),)
$(info No registry information provide. To push images to a docker registry please set)
$(info No registry information provided. To push images to a docker registry please set)
$(info environment variables: quay_repository, quay_token, and quay_id. Environment)
$(info variables do not need to be set for github Travis CICD.)
else
Expand All @@ -94,7 +117,7 @@ run-test:
$(info Running unit tests...)
hack/make-rules/test.sh $(WHAT) $(TESTS)

run-e2e: mcad-controller verify-tag-name
run-e2e: verify-tag-name
ifeq ($(strip $(quay_repository)),)
echo "Running e2e with MCAD local image: mcad-controller ${TAG} IfNotPresent."
hack/run-e2e-kind.sh mcad-controller ${TAG} IfNotPresent
Expand All @@ -103,13 +126,8 @@ else
hack/run-e2e-kind.sh ${quay_repository}/mcad-controller ${TAG}
endif

mcad-controller-private: init generate-code
$(info Compiling controller)
CGO_ENABLED=0 GOARCH=amd64 GOPRIVATE=github.ibm.com/* go build -tags private -modfile ./private.mod -o ${BIN_DIR}/mcad-controller ./cmd/kar-controllers/

coverage:
# KUBE_COVER=y hack/make-rules/test.sh $(WHAT) $(TESTS)

clean:
rm -rf _output/
rm -f mcad-controllers
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Multi-Cluster App Dispatcher
==

The `multi-cluster-app-dispatcher` is a Kubernetes controller providing mechanisms for applications to manage batch jobs in a single or mult-cluster environment.
The `multi-cluster-app-dispatcher` is a Kubernetes controller providing mechanisms for applications to manage batch jobs in a single or multi-cluster environment.

The `multi-cluster-app-dispatcher` (`MCAD`) controller is capable of (i) providing an abstraction for wrapping all resources of the job/application and treating them holistically, (ii) queuing job/application creation requests and applying different queuing policies, e.g., First In First Out, Priority, (iii) dispatching the job to one of multiple clusters, where a `MCAD` queuing agent runs, using configurable dispatch policies, and (iv) auto-scaling pod sets, balancing job demands and cluster availability (future work).

Expand Down
21 changes: 0 additions & 21 deletions deployment/Dockerfile.both

This file was deleted.

31 changes: 0 additions & 31 deletions deployment/build-inside-container-private.sh

This file was deleted.

15 changes: 0 additions & 15 deletions deployment/build-inside-container.sh

This file was deleted.

9 changes: 0 additions & 9 deletions deployment/build-podman.sh

This file was deleted.

24 changes: 0 additions & 24 deletions deployment/build-private.sh

This file was deleted.

9 changes: 0 additions & 9 deletions deployment/build.sh

This file was deleted.

8 changes: 0 additions & 8 deletions deployment/image-podman.sh

This file was deleted.

8 changes: 0 additions & 8 deletions deployment/image.sh

This file was deleted.

Loading