Skip to content

Commit

Permalink
Merge pull request #200 from sunya-ch/v1.2.4-rebase
Browse files Browse the repository at this point in the history
chore: increase version to 1.2.4
  • Loading branch information
sunya-ch authored Dec 6, 2024
2 parents 1dd8ae3 + e4b4fa7 commit fb7466d
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 42 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_push_concheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: Build and push connection check image
on:
push:
branches:
- v1.2.3
- v1.2.4
paths:
- connection-check/**

env:
IMAGE_VERSION: '1.2.3'
IMAGE_VERSION: '1.2.4'
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_push_controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build and push controller and its bundle image
on:
push:
branches:
- v1.2.3
- v1.2.4
paths:
- controllers/**
- compute/**
Expand All @@ -16,7 +16,7 @@ on:
- ./Makefile

env:
VERSION: '1.2.3'
VERSION: '1.2.4'
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
DAEMON_REGISTRY: ghcr.io/${{ github.repository_owner }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_push_daemon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: Build and push daemon image
on:
push:
branches:
- v1.2.3
- v1.2.4
paths:
- daemon/**
- cni/**
- Makefile

env:
IMAGE_VERSION: '1.2.3'
IMAGE_VERSION: '1.2.4'
DAEMON_REGISTRY: ghcr.io/${{ github.repository_owner }}

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daemon_unittest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Perform unittest for daemon
on:
pull_request:
branches:
- v1.2.3
- v1.2.4
push:
paths:
- daemon/**
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
pull_request:
push:

env:
GOLANGCI_LINT_VERSION: v1.54.2

jobs:
golangci:
name: lint
Expand All @@ -18,4 +21,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --timeout=10m
args: --timeout=10m
version: ${{ env.GOLANGCI_LINT_VERSION }}
2 changes: 1 addition & 1 deletion .github/workflows/integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: e2e test
on:
pull_request:
branches:
- v1.2.3
- v1.2.4
push:
paths:
- controllers/**
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unittest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Perform unittest for controller
on:
pull_request:
branches:
- v1.2.3
- v1.2.4
push:
paths:
- controllers/**
Expand Down
45 changes: 21 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@
#
include daemon/Makefile

DOCKER ?= $(shell command -v podman 2> /dev/null || echo docker)

export IMAGE_REGISTRY ?= ghcr.io/foundation-model-stack
ifneq ($(shell kubectl get po -A --selector app=multus --ignore-not-found),)
export CNI_BIN_HOSTPATH = $(shell kubectl get po -A --selector app=multus -o jsonpath='{.items[0].spec.volumes[?(@.name=="cnibin")].hostPath.path}')
else
export CNI_BIN_HOSTPATH = /var/lib/cni/bin
endif


# VERSION defines the project version for the bundle.
# Update this value when you upgrade the version of your project.
# 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.0.1
VERSION ?= 1.2.3
VERSION ?= 1.2.4
export CHANNELS = "beta"

# CHANNELS define the bundle channels used in the bundle.
Expand Down Expand Up @@ -114,18 +112,18 @@ run: manifests generate fmt vet ## Run a controller from your host.
go run ./main.go

golint:
docker pull golangci/golangci-lint:latest
docker run --tty --rm \
$(DOCKER) pull golangci/golangci-lint:v1.54.2
$(DOCKER) run --tty --rm \
--volume '$(BASE_DIR):/app' \
--workdir /app \
golangci/golangci-lint \
golangci/golangci-lint:v1.54.2 \
golangci-lint run --verbose

docker-build: test ## Build docker image with the manager.
docker build -t ${IMG} .
$(DOCKER) build -t ${IMG} .

docker-push: ## Push docker image with the manager.
docker push ${IMG}
$(DOCKER) push ${IMG}

##@ Deployment

Expand Down Expand Up @@ -163,8 +161,8 @@ daemon-secret: ## Modify kustomization files for image pull secret of daemon
envsubst < config/samples/patches/image_pull_secret.template > config/samples/patches/image_pull_secret.yaml
cd config/samples;$(KUSTOMIZE) edit add patch --path patches/image_pull_secret.yaml

concheck:
@kubectl create -f connection-check/concheck.yaml
concheck:
@kubectl create -f connection-check/concheck.yaml
@echo "Wait for job/multi-nic-concheck to complete"
@kubectl wait --for=condition=complete job/multi-nic-concheck --timeout=3000s
@kubectl logs job/multi-nic-concheck
Expand All @@ -174,11 +172,10 @@ clean-concheck:
@kubectl delete pod -n default --selector multi-nic-concheck
@kubectl delete job -n default --selector multi-nic-concheck


export SERVER_HOST_NAME ?= $(shell kubectl get nodes|tail -n 2|head -n 1|awk '{ print $1 }')
export CLIENT_HOST_NAME ?= $(shell kubectl get nodes|tail -n 1|awk '{ print $1 }')
sample-concheck:
@echo "Test connection from ${CLIENT_HOST_NAME} to ${SERVER_HOST_NAME}"
@export SERVER_HOST_NAME ?= $(shell kubectl get nodes|tail -n 2|head -n 1|awk '{ print $1 }')
@export CLIENT_HOST_NAME ?= $(shell kubectl get nodes|tail -n 1|awk '{ print $1 }')
@echo "Test connection from ${CLIENT_HOST_NAME} to ${SERVER_HOST_NAME}"ƒ
@cd ./live-migration && chmod +x live_migrate.sh && ./live_migrate.sh live_iperf3 ${SERVER_HOST_NAME} ${CLIENT_HOST_NAME} 5

CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
Expand Down Expand Up @@ -264,16 +261,16 @@ catalog-push: ## Push a catalog image.
$(MAKE) docker-push IMG=$(CATALOG_IMG)

test-daemon:
docker build -t daemon-test:latest -f ./daemon/dockerfiles/Dockerfile.multi-nicd-test .
docker run -i --privileged daemon-test /bin/bash -c "cd /usr/local/build/cni&&make test"
docker run -i --privileged daemon-test /bin/bash -c "cd /usr/local/build/daemon/src&&make test-verbose"
$(DOCKER) build -t daemon-test:latest -f ./daemon/dockerfiles/Dockerfile.multi-nicd-test .
$(DOCKER) run -i --privileged daemon-test /bin/bash -c "cd /usr/local/build/cni&&make test"
$(DOCKER) run -i --privileged daemon-test /bin/bash -c "cd /usr/local/build/daemon/src&&make test-verbose"

build-push-kbuilder-base:
docker build -t $(IMAGE_TAG_BASE)-kbuilder -f ./daemon/dockerfiles/Dockerfile.kbuilder .
docker push $(IMAGE_TAG_BASE)-kbuilder
$(DOCKER) build -t $(IMAGE_TAG_BASE)-kbuilder -f ./daemon/dockerfiles/Dockerfile.kbuilder .
$(DOCKER) push $(IMAGE_TAG_BASE)-kbuilder

daemon-build: test-daemon ## Build docker image with the manager.
docker tag daemon-test:latest $(IMAGE_TAG_BASE)-daemon:v$(VERSION)
$(DOCKER) tag daemon-test:latest $(IMAGE_TAG_BASE)-daemon:v$(VERSION)

daemon-push:
docker push $(IMAGE_TAG_BASE)-daemon:v$(VERSION)
$(DOCKER) push $(IMAGE_TAG_BASE)-daemon:v$(VERSION)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Recommended to deploy in the same default namespace for [health check service](.
```
##### by bundle with operator-sdk
```bash
operator-sdk run bundle ghcr.io/foundation-model-stack/multi-nic-cni-bundle:v1.2.3 -n multi-nic-cni-operator
operator-sdk run bundle ghcr.io/foundation-model-stack/multi-nic-cni-bundle:v1.2.4 -n multi-nic-cni-operator
```
#### Deploy MultiNicNetwork resource
1. Prepare `network.yaml` as shown in the [example](#multinicnetwork)
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ kind: Kustomization
images:
- name: controller
newName: ghcr.io/foundation-model-stack/multi-nic-cni-controller
newTag: v1.2.3
newTag: v1.2.4
2 changes: 1 addition & 1 deletion config/samples/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
value: "11000"
- name: RT_TABLE_PATH
value: /opt/rt_tables
image: ghcr.io/foundation-model-stack/multi-nic-cni-daemon:v1.2.3
image: ghcr.io/foundation-model-stack/multi-nic-cni-daemon:v1.2.4
imagePullPolicy: Always
mounts:
- hostpath: /var/lib/cni/bin
Expand Down
2 changes: 1 addition & 1 deletion config/samples/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ kind: Kustomization
images:
- name: multi-nic-cni-daemon
newName: ghcr.io/foundation-model-stack/multi-nic-cni-daemon
newTag: v1.2.3
newTag: v1.2.4
2 changes: 1 addition & 1 deletion connection-check/concheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ spec:
serviceAccountName: multi-nic-concheck-account
containers:
- name: concheck
image: ghcr.io/foundation-model-stack/multi-nic-cni-concheck:v1.2.3
image: ghcr.io/foundation-model-stack/multi-nic-cni-concheck:v1.2.4
imagePullPolicy: Always
securityContext:
privileged: true
2 changes: 1 addition & 1 deletion daemon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export DAEMON_REGISTRY ?= ghcr.io/foundation-model-stack

# DAEMON_IMG defines the image:tag used for daemon
IMAGE_TAG_BASE = $(DAEMON_REGISTRY)/multi-nic-cni
IMAGE_VERSION ?= 1.2.3
IMAGE_VERSION ?= 1.2.4
DAEMON_IMG ?= $(IMAGE_TAG_BASE)-daemon:v$(IMAGE_VERSION)


Expand Down
4 changes: 2 additions & 2 deletions daemon/dockerfiles/Dockerfile.kbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ RUN curl -sSLo kubebuilder_2.0.0-alpha.1_linux_amd64.tar.gz https://github.com/k
RUN curl -sSLo setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.7.2/hack/setup-envtest.sh

RUN cd /tmp && \
git clone -b v1.2.3 https://github.com/containernetworking/plugins.git && \
git clone -b v1.2.4 https://github.com/containernetworking/plugins.git && \
cd plugins && \
./build_linux.sh && \
ls /tmp/plugins/bin && \
cp /tmp/plugins/bin/ipvlan /usr/local/build/cni/test-bin/ipvlan && \
cp /tmp/plugins/bin/static /usr/local/build/cni/test-bin/static && \
rm -r /tmp/plugins
rm -r /tmp/plugins

0 comments on commit fb7466d

Please sign in to comment.