forked from IBM/varnish-operator
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrating from ibmcom to cinple dockerhub repo (#2)
* Migrating from ibmcom to cinple dockerhub repo * Updated versions and moved gh repo * Removing quotes from variables in Makefile * Updated e2e tests for k8s 1.26 * Added additional k8s versions for e2e tests
- Loading branch information
Showing
70 changed files
with
815 additions
and
1,370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ jobs: | |
cd docs_generated/ | ||
git init | ||
git add . | ||
git config --local user.name \"Tomash Sidei\" | ||
git config --local user.email \"[email protected]\" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "gh-actions" | ||
git commit -m "Deploy Docs from Actions" | ||
git push --force --quiet https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} HEAD:gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,31 +10,31 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
kubernetes-version: [ "1.25", "1.24", "1.23", "1.22"] | ||
kubernetes-version: [ "1.26", "1.25", "1.24", "1.23"] | ||
include: | ||
- kubernetes-version: "1.26" | ||
kind-node: kindest/node:v1.26.3@sha256:61b92f38dff6ccc29969e7aa154d34e38b89443af1a2c14e6cfbd2df6419c66f | ||
- kubernetes-version: "1.25" | ||
kind-node: kindest/node:v1.25.2@sha256:9be91e9e9cdf116809841fc77ebdb8845443c4c72fe5218f3ae9eb57fdb4bace | ||
kind-node: kindest/node:v1.25.8@sha256:00d3f5314cc35327706776e95b2f8e504198ce59ac545d0200a89e69fce10b7f | ||
- kubernetes-version: "1.24" | ||
kind-node: kindest/node:v1.24.6@sha256:97e8d00bc37a7598a0b32d1fabd155a96355c49fa0d4d4790aab0f161bf31be1 | ||
kind-node: kindest/node:v1.24.12@sha256:1e12918b8bc3d4253bc08f640a231bb0d3b2c5a9b28aa3f2ca1aee93e1e8db16 | ||
- kubernetes-version: "1.23" | ||
kind-node: kindest/node:v1.23.12@sha256:9402cf1330bbd3a0d097d2033fa489b2abe40d479cc5ef47d0b6a6960613148a | ||
- kubernetes-version: "1.22" | ||
kind-node: kindest/node:v1.22.15@sha256:bfd5eaae36849bfb3c1e3b9442f3da17d730718248939d9d547e86bbac5da586 | ||
kind-node: kindest/node:v1.23.17@sha256:e5fd1d9cd7a9a50939f9c005684df5a6d145e8d695e78463637b79464292e66c | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ^1.19 | ||
go-version: ^1.20 | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v3 | ||
- name: Get dependencies | ||
run: go mod download | ||
- name: build images | ||
run: | | ||
docker build --platform linux/amd64 -f Dockerfile -t ibmcom/varnish-operator:local . | ||
docker build --platform linux/amd64 -f Dockerfile.varnishd -t ibmcom/varnish:local . | ||
docker build --platform linux/amd64 -f Dockerfile.controller -t ibmcom/varnish-controller:local . | ||
docker build --platform linux/amd64 -f Dockerfile.exporter -t ibmcom/varnish-metrics-exporter:local . | ||
docker build --platform linux/amd64 -f Dockerfile -t ${{ secrets.DOCKERHUB_REPO }}/varnish-operator:local . | ||
docker build --platform linux/amd64 -f Dockerfile.varnishd -t ${{ secrets.DOCKERHUB_REPO }}/varnish:local . | ||
docker build --platform linux/amd64 -f Dockerfile.controller -t ${{ secrets.DOCKERHUB_REPO }}/varnish-controller:local . | ||
docker build --platform linux/amd64 -f Dockerfile.exporter -t ${{ secrets.DOCKERHUB_REPO }}/varnish-metrics-exporter:local . | ||
- name: Create k8s Kind Cluster ${{ matrix.kubernetes-version }} | ||
uses: helm/[email protected] | ||
with: | ||
|
@@ -46,13 +46,13 @@ jobs: | |
run: kubectl create namespace varnish-operator | ||
- name: load images | ||
run: | | ||
kind load --name e2e-tests docker-image ibmcom/varnish-operator:local | ||
kind load --name e2e-tests docker-image ibmcom/varnish:local | ||
kind load --name e2e-tests docker-image ibmcom/varnish-controller:local | ||
kind load --name e2e-tests docker-image ibmcom/varnish-metrics-exporter:local | ||
kind load --name e2e-tests docker-image ${{ secrets.DOCKERHUB_REPO }}/varnish-operator:local | ||
kind load --name e2e-tests docker-image ${{ secrets.DOCKERHUB_REPO }}/varnish:local | ||
kind load --name e2e-tests docker-image ${{ secrets.DOCKERHUB_REPO }}/varnish-controller:local | ||
kind load --name e2e-tests docker-image ${{ secrets.DOCKERHUB_REPO }}/varnish-metrics-exporter:local | ||
- name: install operator | ||
id: helm | ||
run: helm install varnish-operator --debug --namespace=varnish-operator varnish-operator --wait --set container.imagePullPolicy=Never --set container.image=ibmcom/varnish-operator:local | ||
run: helm install varnish-operator --debug --namespace=varnish-operator varnish-operator --wait --set container.imagePullPolicy=Never --set container.image=${{ secrets.DOCKERHUB_REPO }}/varnish-operator:local | ||
- name: run tests | ||
id: e2e | ||
run: go test -count=1 ./tests #-count=1 is to disable tests caching. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
# Image URL to use in all building/pushing image targets | ||
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST)))) | ||
VERSION ?= "local" | ||
PUBLISH_IMG ?= ibmcom/varnish-operator:${VERSION} | ||
VERSION ?= local | ||
REPO ?= cinple | ||
PUBLISH_IMG ?= ${REPO}/varnish-operator:${VERSION} | ||
IMG ?= ${PUBLISH_IMG}-dev | ||
VARNISH_PUBLISH_IMG ?= varnish:${VERSION} | ||
VARNISH_IMG ?= ${VARNISH_PUBLISH_IMG}-dev | ||
|
@@ -18,19 +19,19 @@ all: test varnish-operator varnish-controller | |
|
||
# Run tests | ||
test: generate fmt vet manifests | ||
go test github.com/ibm/varnish-operator/pkg/... github.com/ibm/varnish-operator/cmd/... github.com/ibm/varnish-operator/api/... -coverprofile cover.out | ||
go test github.com/cin/varnish-operator/pkg/... github.com/cin/varnish-operator/cmd/... github.com/cin/varnish-operator/api/... -coverprofile cover.out | ||
|
||
# Run lint tools | ||
lint: | ||
golangci-lint run | ||
|
||
# Build varnish-operator binary | ||
varnish-operator: generate fmt vet | ||
go build -o ${ROOT_DIR}bin/varnish-operator github.com/ibm/varnish-operator/cmd/varnish-operator | ||
go build -o ${ROOT_DIR}bin/varnish-operator github.com/cin/varnish-operator/cmd/varnish-operator | ||
|
||
# Run against the configured Kubernetes cluster in ~/.kube/config | ||
run: generate fmt vet | ||
NAMESPACE=${NAMESPACE} LOGLEVEL=debug LOGFORMAT=console CONTAINER_IMAGE=ibmcom/${VARNISH_IMG} LEADERELECTION_ENABLED=false WEBHOOKS_ENABLED=false go run ${ROOT_DIR}cmd/varnish-operator/main.go | ||
NAMESPACE=${NAMESPACE} LOGLEVEL=debug LOGFORMAT=console CONTAINER_IMAGE=${REPO}/${VARNISH_IMG} LEADERELECTION_ENABLED=false WEBHOOKS_ENABLED=false go run ${ROOT_DIR}cmd/varnish-operator/main.go | ||
|
||
# Deploy controller in the configured Kubernetes cluster in ~/.kube/config | ||
install: manifests | ||
|
@@ -71,7 +72,7 @@ docker-build: test | |
# Tag and push the docker image | ||
docker-tag-push: | ||
ifndef REPO_PATH | ||
$(error must set REPO_PATH, eg "make docker-tag-push REPO_PATH=ibmcom") | ||
$(error must set REPO_PATH, eg "make docker-tag-push REPO_PATH=${REPO}") | ||
endif | ||
ifndef PUBLISH | ||
docker tag ${IMG} ${REPO_PATH}/${IMG} | ||
|
@@ -90,7 +91,7 @@ docker-build-varnish: | |
|
||
docker-tag-push-varnish: | ||
ifndef REPO_PATH | ||
$(error must set REPO_PATH, eg "make docker-tag-push REPO_PATH=ibmcom") | ||
$(error must set REPO_PATH, eg "make docker-tag-push REPO_PATH=${REPO}") | ||
endif | ||
ifndef PUBLISH | ||
docker tag ${VARNISH_IMG} ${REPO_PATH}/${VARNISH_IMG} | ||
|
@@ -106,7 +107,7 @@ docker-build-varnish-controller: fmt vet | |
|
||
docker-tag-push-varnish-controller: | ||
ifndef REPO_PATH | ||
$(error must set REPO_PATH, eg "make docker-tag-push REPO_PATH=ibmcom") | ||
$(error must set REPO_PATH, eg "make docker-tag-push REPO_PATH=${REPO}") | ||
endif | ||
ifndef PUBLISH | ||
docker tag ${VARNISH_CONTROLLER_IMG} ${REPO_PATH}/${VARNISH_CONTROLLER_IMG} | ||
|
@@ -122,7 +123,7 @@ docker-build-varnish-exporter: | |
|
||
docker-tag-push-varnish-exporter: | ||
ifndef REPO_PATH | ||
$(error must set REPO_PATH, eg "make docker-tag-push REPO_PATH=ibmcom") | ||
$(error must set REPO_PATH, eg "make docker-tag-push REPO_PATH=${REPO}") | ||
endif | ||
ifndef PUBLISH | ||
docker tag ${VARNISH_METRICS_IMG} ${REPO_PATH}/${VARNISH_METRICS_IMG} | ||
|
@@ -139,7 +140,7 @@ docker-tag-push-pod: docker-tag-push-varnish docker-tag-push-varnish-exporter do | |
# download controller-gen if necessary | ||
controller-gen: | ||
ifeq (, $(shell which controller-gen)) | ||
go install sigs.k8s.io/controller-tools/cmd/[email protected].1 | ||
go install sigs.k8s.io/controller-tools/cmd/[email protected].3 | ||
CONTROLLER_GEN=$(GOBIN)/controller-gen | ||
else | ||
CONTROLLER_GEN=$(shell which controller-gen) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.