Skip to content
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

refactor: flux provisioned from init container #208

Merged
merged 68 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
27799d1
refactor: flux provisioned from sidecar container
vsoch Oct 10, 2023
fdb06a7
update entrypoint and curve generation (still not working but testing)
vsoch Oct 10, 2023
2b05c5a
update hello-world test
vsoch Oct 11, 2023
52ae858
ensure go version is updated
vsoch Oct 11, 2023
311697d
ensure go version is updated
vsoch Oct 11, 2023
871ffd4
trivial push to test again
vsoch Oct 12, 2023
4297e56
ignore trailing newlines
vsoch Oct 12, 2023
8b2723f
add volume test back
vsoch Oct 12, 2023
e9532a6
add batch back in
vsoch Oct 12, 2023
464871f
add back in custom-config test
vsoch Oct 12, 2023
7c5f735
add back debug and existing volumes
vsoch Oct 12, 2023
8ad3094
re-enable existing tests
vsoch Oct 13, 2023
2f827b3
add missing components
vsoch Oct 13, 2023
0afea92
pyramid!
vsoch Oct 13, 2023
5efff91
update tests
vsoch Oct 13, 2023
992aa04
test init container design instead of sidecar
vsoch Oct 14, 2023
7b3dde6
fix namespace
vsoch Oct 15, 2023
80b6051
updating elasticity basic example to work with new design
vsoch Oct 15, 2023
8e0ca2f
autoscaling examples working
vsoch Oct 16, 2023
dd66402
shared process namespace example working
vsoch Oct 16, 2023
84d3abc
flux-restful start of working
vsoch Oct 22, 2023
0e97457
remove flux restful API
vsoch Oct 23, 2023
28eab5d
lingering variables that were deleted
vsoch Oct 23, 2023
d0da192
remove service example for now
vsoch Oct 23, 2023
530ef00
admit defeat
vsoch Oct 24, 2023
f2566f8
check / update parsl
vsoch Oct 24, 2023
ba9b632
fireworks working nicely again
vsoch Oct 24, 2023
6985d52
mnist working again
vsoch Oct 24, 2023
d2299d6
updating remainder of ML exampels
vsoch Oct 24, 2023
718fa44
add setup for SOMOSPIE
vsoch Nov 2, 2023
d0fcba6
remove volumes from operator control
vsoch Nov 7, 2023
1e6a8c9
s3 mount with fuse (s3fuse) is working
vsoch Nov 8, 2023
6607270
add back volumes test
vsoch Nov 11, 2023
5a59f21
update volume path
vsoch Nov 11, 2023
b72a0bd
more changes to volumes
vsoch Nov 11, 2023
800c113
update docs for storage and remove singularity examples
vsoch Nov 12, 2023
5a21b01
more work on laghos ball bounce and start of ramble
vsoch Nov 14, 2023
c9c271e
update ramble example
vsoch Nov 14, 2023
7627f5e
add back flux restful example
vsoch Nov 15, 2023
e66475d
sundials working again
vsoch Nov 15, 2023
78f0baa
add mountpoint driver example
vsoch Dec 1, 2023
ac23df4
add parameter that allows disable of pod affinity
vsoch Dec 9, 2023
aaffc38
add example for assigning multiple pods per node
vsoch Dec 10, 2023
baae3e2
add workflow that will make development refactor container always ava…
vsoch Dec 10, 2023
fad34e1
add custom metrics api example
vsoch Dec 13, 2023
982efff
nginx example test needs to specify not to wrap the entrypoint
vsoch Dec 13, 2023
41d745c
add workflow to deploy arm image
vsoch Dec 14, 2023
f5b6520
add example of running flux+application (v1alpha1 design)
vsoch Dec 15, 2023
a83fb02
ensure we run test for disable-view
vsoch Dec 15, 2023
f55883f
cleanup specification of flags
vsoch Dec 29, 2023
aab033a
need to be quiet
vsoch Dec 29, 2023
23f8718
missing quiet flag
vsoch Dec 29, 2023
65f9091
clean up spaces, hopefully update tests
vsoch Dec 29, 2023
eed8ab2
services do not have a custom entrypoint
vsoch Dec 29, 2023
0a119ba
add support for schedulerName
vsoch Dec 29, 2023
289128a
feat: add support for downsize
vsoch Jan 18, 2024
438bf37
do a check for existence of the view
vsoch Jan 26, 2024
a856362
add sidecar example with flux restful
vsoch Jan 27, 2024
acdcb07
add aws example for flux-restful service sidecar
vsoch Jan 27, 2024
187a9b4
bug: pre->command block is run twice
vsoch Feb 22, 2024
a684fd3
api-gen
vsoch Feb 22, 2024
c9b690d
update controller gen
vsoch Feb 22, 2024
97b1244
Merge pull request #216 from flux-framework/fix-controller-gen
vsoch Feb 22, 2024
77250c7
bug: disable view should not update path
vsoch Feb 27, 2024
004ab42
Merge pull request #217 from flux-framework/bug-disable-view-pin-cont…
vsoch Feb 28, 2024
0c81415
fix: testing tim updates for generation
vsoch Mar 4, 2024
ed39f44
Merge pull request #219 from flux-framework/test-tim-updates
vsoch Mar 4, 2024
e3cd944
remove automated refactor build, make wait.sh more flexible
vsoch Mar 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ^1.18.1
go-version: ^1.20
- name: GHCR Login
if: (github.event_name != 'pull_request')
uses: docker/login-action@v2
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ^1.18.1
go-version: ^1.20
- name: GHCR Login
if: (github.event_name != 'pull_request')
uses: docker/login-action@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ^1.18.1
go-version: ^1.20
- name: GHCR Login
if: (github.event_name != 'pull_request')
uses: docker/login-action@v2
Expand Down Expand Up @@ -44,4 +44,4 @@ jobs:
PKG_RESPONSE=$(helm package ./chart)
echo "$PKG_RESPONSE"
CHART_TAR_GZ=$(basename "$PKG_RESPONSE")
helm push "$CHART_TAR_GZ" oci://ghcr.io/flux-framework/flux-operator-helm
helm push "$CHART_TAR_GZ" oci://ghcr.io/flux-framework/flux-operator-helm
52 changes: 26 additions & 26 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,25 @@ jobs:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup black linter
run: conda create --quiet --name black pyflakes

- name: Check Spelling
uses: crate-ci/typos@7ad296c72fa8265059cc03d1eda562fbdfcd6df2 # v1.9.0
with:
files: ./docs/*/*.md ./docs/*/*/*.md ./docs/*.md ./README.md ./config/samples ./docs/*.md
files: ./docs/*/*.md ./docs/*/*/*.md ./docs/*.md ./README.md ./docs/*.md

unit-tests:
name: Unit Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ^1.18
go-version: ^1.20
- name: fmt check
run: make fmt

Expand Down Expand Up @@ -62,22 +61,23 @@ jobs:
strategy:
fail-fast: false
matrix:
test: [["hello-world", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["custom-config", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["minimal-service", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["post", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["batch", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["singularity", "ghcr.io/rse-ops/singularity:tag-mamba", 60],
["nginx-sidecar-service", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["nginx-service", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["lammps", "ghcr.io/rse-ops/lammps:flux-sched-focal-v0.24.0", 60],
["pokemon", "ghcr.io/rse-ops/pokemon:app-latest", 60],
["timed", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["debug", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["flux-resource-list", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["existing-volumes", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["volumes", "ghcr.io/flux-framework/flux-restful-api:latest", 60],
["snakemake", "ghcr.io/rse-ops/atacseq:app-latest", 60]]
test: [["post", "", 100],
["batch", "", 100],
["timed", "", 100],
["debug", "", 100],
["volumes", "", 100],
["hello-world", "", 100],
["nginx-service", "", 100],
["custom-config", "", 100],
["minimal-service", "", 100],
["existing-volumes", "", 100],
["flux-resource-list", "", 100],
["nginx-sidecar-service", "", 100],
["pokemon", "ghcr.io/rse-ops/pokemon:app-latest", 100],
["snakemake", "ghcr.io/rse-ops/atacseq:app-latest", 100],
["singularity", "ghcr.io/rse-ops/singularity:tag-mamba", 100],
["lammps", "ghcr.io/converged-computing/metric-lammps:latest", 100],
["disable-view", "ghcr.io/rse-ops/lammps:flux-sched-focal", 100]]

steps:
- name: Clone the code
Expand All @@ -86,17 +86,14 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ^1.18
go-version: ^1.20

- name: Install zeromq
run: sudo apt-get update && sudo apt-get install -y libsodium-dev libzmq3-dev libczmq-dev

- name: Start minikube
uses: medyagh/setup-minikube@697f2b7aaed5f70bf2a94ee21a4ec3dde7b12f92 # v0.0.9

- name: Create the namespace
run: kubectl create namespace flux-operator

- name: Pull Docker Containers to MiniKube
env:
container: ${{ matrix.test[1] }}
Expand All @@ -105,10 +102,13 @@ jobs:
run: |
export SHELL=/bin/bash
eval $(minikube -p minikube docker-env)
minikube ssh docker pull ${container}
if [[ "${container}" != "" ]]; then
minikube ssh docker pull ${container}
fi
if [[ "${test}" == "nginx-service" ]]; then
minikube ssh docker pull nginx
fi
minikube ssh docker pull ghcr.io/converged-computing/flux-view-rocky:tag-9
make deploy-local
minikube image load ghcr.io/flux-framework/flux-operator:test
kubectl apply -f examples/dist/flux-operator-local.yaml
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
echo "tag=${{ inputs.release_tag }}" >> ${GITHUB_ENV}
- uses: actions/setup-go@v3
with:
go-version: ^1.18.1
go-version: ^1.20
- name: GHCR Login
uses: docker/login-action@v2
with:
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ^1.18.1
go-version: ^1.20
- name: Set tag
run: |
echo "Tag for release is ${{ inputs.release_tag }}"
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ^1.18.1
go-version: ^1.20
- name: Set tag
run: |
echo "Tag for release is ${{ inputs.release_tag }}"
Expand All @@ -106,7 +106,7 @@ jobs:
run: |
export PATH="/usr/share/miniconda/bin:$PATH"
source activate fo
cd sdk/python/v1alpha1/
cd sdk/python/v1alpha2/
pip install -e .
python setup.py sdist bdist_wheel
cd dist
Expand Down
83 changes: 0 additions & 83 deletions .github/workflows/test-python.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and **Merged pull requests**. Critical items to know are:
The versions coincide with releases on pip. Only major versions will be released as tags on Github.

## [0.0.x](https://github.com/flux-framework/flux-operator/tree/main) (0.0.x)
- refactor design to allow for any base image, v1alpha2 release (0.2.0)
- control of volumes removed (only support for existing volumes)
- fluxoperator-gen command added and restructure for more modular generation (0.1.1)
- First release supporting experimenting bursting / scaling and customization (0.1.0)
- Support for automated testing of examples/tests (0.0.x)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.18 as builder
FROM golang:1.20 as builder

WORKDIR /workspace

Expand Down
37 changes: 20 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 0.1.1
API_VERSION ?= v1alpha1
VERSION ?= 0.2.0
API_VERSION ?= v1alpha2

# CHANNELS define the bundle channels used in the bundle.
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
Expand Down Expand Up @@ -107,7 +107,8 @@ manifests: controller-gen
.PHONY: generate
generate: controller-gen openapi-gen
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
${OPENAPI_GEN} --logtostderr=true -i ./api/${API_VERSION}/ -o "" -O zz_generated.openapi -p ./api/${API_VERSION}/ -h ./hack/boilerplate.go.txt -r "-"
rm -rf ./api/${API_VERSION}/zz_generated.openapi.go
${OPENAPI_GEN} --logtostderr=true --output-file zz_generated.openapi.go --output-pkg "github.com/flux-framework/flux-operator/api/${API_VERSION}" --output-dir ./api/${API_VERSION}/ --go-header-file ./hack/boilerplate.go.txt -r "-" ./api/${API_VERSION}/

.PHONY: api
api: generate api
Expand Down Expand Up @@ -145,7 +146,7 @@ test: manifests generate fmt vet envtest ## Run tests.

.PHONY: list
list:
kubectl get -n flux-operator pods
kubectl get pods

.PHONY: reset
reset:
Expand All @@ -162,11 +163,11 @@ clean:
# kubectl delete -n flux-operator secret --all --grace-period=0 --force
kubectl delete -n flux-operator cm --all --grace-period=0 --force
# pods, pvc, and pv need to be deleted in this order
kubectl delete -n flux-operator pods --all --grace-period=0 --force
kubectl delete pods --all --grace-period=0 --force
kubectl delete -n flux-operator pvc --all --grace-period=0 --force
kubectl delete -n flux-operator pv --all --grace-period=0 --force
kubectl delete -n flux-operator jobs --all --grace-period=0 --force
kubectl delete -n flux-operator MiniCluster --all --grace-period=0 --force
kubectl delete jobs --all --grace-period=0 --force
kubectl delete MiniCluster --all --grace-period=0 --force

# This applies the basic minicluster (and not extended examples)
apply:
Expand All @@ -186,9 +187,6 @@ redo: clean apply run
redo_example: clean example run
redo_test: clean applytest run

log:
kubectl logs -n flux-operator job.batch/flux-sample $@

##@ Test
# NOTE these are not fully developed yet

Expand Down Expand Up @@ -222,20 +220,20 @@ images:

.PHONY: build
build: generate fmt vet ## Build manager binary.
mv ./controllers/flux/keygen.go ./controllers/flux/keygen.go.backup
cp ./controllers/flux/keygen.go.template ./controllers/flux/keygen.go
mv ./pkg/flux/keygen.go ./pkg/flux/keygen.go.backup
cp ./pkg/flux/keygen.go.template ./pkg/flux/keygen.go
$(BUILDENVVAR) go build -o bin/manager main.go
mv ./controllers/flux/keygen.go.backup ./controllers/flux/keygen.go
mv ./pkg/flux/keygen.go.backup ./pkg/flux/keygen.go

.PHONY: build-container
build-container: generate fmt vet
cp ./controllers/flux/keygen.go.template ./controllers/flux/keygen.go
cp ./pkg/flux/keygen.go.template ./pkg/flux/keygen.go
$(BUILDENVVAR) go build -a -o ./manager main.go
$(BUILDENVVAR) go build -o ./bin/fluxoperator-gen cmd/gen/gen.go

.PHONY: helpers
helpers: $(LOCALBIN)
cp ./controllers/flux/keygen.go.template ./controllers/flux/keygen.go
cp ./pkg/flux/keygen.go.template ./pkg/flux/keygen.go
$(BUILDENVVAR) go build -o ./bin/fluxoperator-gen cmd/gen/gen.go

.PHONY: run
Expand Down Expand Up @@ -291,6 +289,11 @@ test-deploy: manifests kustomize
cd config/manager && $(KUSTOMIZE) edit set image controller=${DEVIMG}
$(KUSTOMIZE) build config/default > examples/dist/flux-operator-dev.yaml

.PHONY: test-deploy-recreate
test-deploy-recreate: test-deploy
kubectl delete -f ./examples/dist/flux-operator-dev.yaml || echo "Already deleted"
kubectl apply -f ./examples/dist/flux-operator-dev.yaml

.PHONY: arm-deploy
arm-deploy: manifests kustomize
docker buildx build --platform linux/arm64 --push -t ${ARMIMG} .
Expand Down Expand Up @@ -328,7 +331,7 @@ SWAGGER_API_JSON ?= ./api/${API_VERSION}/swagger.json

## Tool Versions
KUSTOMIZE_VERSION ?= v3.8.7
CONTROLLER_TOOLS_VERSION ?= v0.9.0
CONTROLLER_TOOLS_VERSION ?= v0.14.0

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
Expand All @@ -345,7 +348,7 @@ $(CONTROLLER_GEN): $(LOCALBIN)
.PHONY: openapi-gen
openapi-gen: $(OPENAPI_GEN) ## Download controller-gen locally if necessary.
$(OPENAPI_GEN): $(LOCALBIN)
which ${OPENAPI_GEN} > /dev/null || (git clone --depth 1 https://github.com/kubernetes/kube-openapi /tmp/kube-openapi && cd /tmp/kube-openapi && go build -o ${OPENAPI_GEN} ./cmd/openapi-gen)
which ${OPENAPI_GEN} > /dev/null || (git clone https://github.com/kubernetes/kube-openapi /tmp/kube-openapi && cd /tmp/kube-openapi && go build -o ${OPENAPI_GEN} ./cmd/openapi-gen)

.PHONY: swagger-jar
swagger-jar: $(SWAGGER_JAR) ## Download controller-gen locally if necessary.
Expand Down
Loading
Loading