From 6ecf478281b65ab1c8bf06e98a63a0d43ecf17d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20B=C3=A4hler?= Date: Thu, 26 Oct 2023 13:10:01 +0200 Subject: [PATCH 1/4] feat(image): release arm artifact MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Oliver Bähler --- .ko.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.ko.yaml b/.ko.yaml index 9f61007b..203c3f24 100644 --- a/.ko.yaml +++ b/.ko.yaml @@ -1,6 +1,7 @@ defaultPlatforms: - linux/arm64 - linux/amd64 +- linux/arm builds: - id: capsule main: ./ From de868e1e3fec460038e86594398e08bf20b0b800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20B=C3=A4hler?= Date: Thu, 26 Oct 2023 13:11:02 +0200 Subject: [PATCH 2/4] chore(chart): bump 0.4.0-rc.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Oliver Bähler --- charts/capsule/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/capsule/Chart.yaml b/charts/capsule/Chart.yaml index c2b579d2..4019a245 100644 --- a/charts/capsule/Chart.yaml +++ b/charts/capsule/Chart.yaml @@ -22,7 +22,7 @@ sources: version: 0.4.6 # This is the version number of the application being deployed. # This version number should be incremented each time you make changes to the application. -appVersion: 0.4.0-rc.1 +appVersion: 0.4.0-rc.3 annotations: artifacthub.io/operator: "true" artifacthub.io/prerelease: "false" From 54531bab726ce6bf437d55c12e4f3724724c63c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20B=C3=A4hler?= Date: Thu, 26 Oct 2023 13:11:47 +0200 Subject: [PATCH 3/4] chore(ci): change build registry and fix helm test action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Oliver Bähler --- .github/workflows/helm-test.yml | 27 +-------------------------- Makefile | 27 +++++++++++++-------------- 2 files changed, 14 insertions(+), 40 deletions(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index e855e57e..43088661 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -45,29 +45,4 @@ jobs: - name: Run chart-testing (install) run: make helm-test - if: steps.list-changed.outputs.changed == 'true' - - # ATTENTION: This is a workaround for the upcoming ApiVersion Conversions for the capsule CRDs - # With this workflow the current docker image is build and loaded into kind, otherwise the install fails - # In the future this must be removed and the chart-testing-action must be used - - name: Run chart-testing (install) - run: make helm-test - if: steps.list-changed.outputs.changed == 'true' - - ## Create KIND Cluster - - name: Create kind cluster - uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0 - if: steps.list-changed.outputs.changed == 'true' - # Install Required Operators/CRDs - - name: Prepare Cluster Operators/CRDs - run: | - # Cert-Manager CRDs - kubectl create -f https://github.com/cert-manager/cert-manager/releases/download/v1.9.1/cert-manager.crds.yaml - - # Prometheus CRDs - kubectl create -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.58.0/bundle.yaml - if: steps.list-changed.outputs.changed == 'true' - # Install Charts - - name: Run chart-testing (install) - run: ct install --debug --config ./.github/configs/ct.yaml - if: steps.list-changed.outputs.changed == 'true' + if: steps.list-changed.outputs.changed == 'true' \ No newline at end of file diff --git a/Makefile b/Makefile index c2fd231c..e1c1b950 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,6 @@ # Version GIT_HEAD_COMMIT ?= $(shell git rev-parse --short HEAD) -VERSION ?= $(shell git describe --abbrev=0 --tags --match "v*") -ifndef VERSION -VERSION = $(GIT_HEAD_COMMIT) -endif +VERSION ?= $(or $(shell git describe --abbrev=0 --tags --match "v*" 2>/dev/null),$(GIT_HEAD_COMMIT)) # Defaults REGISTRY ?= ghcr.io @@ -90,6 +87,10 @@ apidoc: apidocs-gen # Helm SRC_ROOT = $(shell git rev-parse --show-toplevel) +helm-controller-version: + $(eval VERSION := $(shell grep 'appVersion:' charts/capsule/Chart.yaml | awk '{print "v"$$2}')) + $(eval KO_TAGS := $(shell grep 'appVersion:' charts/capsule/Chart.yaml | awk '{print "v"$$2}')) + helm-docs: HELMDOCS_VERSION := v1.11.0 helm-docs: docker @docker run -v "$(SRC_ROOT):/helm-docs" jnorwood/helm-docs:$(HELMDOCS_VERSION) --chart-search-root /helm-docs @@ -98,10 +99,12 @@ helm-lint: CT_VERSION := v3.3.1 helm-lint: docker @docker run -v "$(SRC_ROOT):/workdir" --entrypoint /bin/sh quay.io/helmpack/chart-testing:$(CT_VERSION) -c "cd /workdir; ct lint --config .github/configs/ct.yaml --lint-conf .github/configs/lintconf.yaml --all --debug" -helm-test: kind ct ko-build-all +helm-test: helm-controller-version kind ct ko-build-all @kind create cluster --wait=60s --name capsule-charts - @kind load docker-image --name capsule-charts $(LOCAL_CAPSULE_IMG) + @kind load docker-image --name capsule-charts $(CAPSULE_IMG):$(VERSION) @kubectl create ns capsule-system + @kubectl create -f https://github.com/cert-manager/cert-manager/releases/download/v1.9.1/cert-manager.crds.yaml + @kubectl create -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.58.0/bundle.yaml @ct install --config $(SRC_ROOT)/.github/configs/ct.yaml --namespace=capsule-system --all --debug @kind delete cluster --name capsule-charts @@ -197,12 +200,10 @@ LD_FLAGS := "-X main.Version=$(VERSION) \ # ------------------ .PHONY: ko-build-capsule -LOCAL_CAPSULE_IMG_BASE := github.com/$(REPOSITORY) -LOCAL_CAPSULE_IMG := $(KO_REGISTRY)/$(LOCAL_CAPSULE_IMG_BASE) ko-build-capsule: ko @echo Building Capsule $(KO_TAGS) >&2 - @LD_FLAGS=$(LD_FLAGS) KOCACHE=$(KOCACHE) KO_DOCKER_REPO=$(KO_REGISTRY) \ - $(KO) build ./ --preserve-import-paths --tags=$(KO_TAGS) --push=false + @LD_FLAGS=$(LD_FLAGS) KOCACHE=$(KOCACHE) KO_DOCKER_REPO=$(CAPSULE_IMG) \ + $(KO) build ./ --bare --tags=$(KO_TAGS) --push=false --local .PHONY: ko-build-all ko-build-all: ko-build-capsule @@ -262,7 +263,7 @@ kustomize: ## Download kustomize locally if necessary. KO = $(shell pwd)/bin/ko KO_VERSION = v0.14.1 ko: - $(call go-install-tool,$(KO),github.com/google/ko@v0.14.1) + $(call go-install-tool,$(KO),github.com/google/ko@$(KO_VERSION)) #################### # -- Helpers @@ -330,8 +331,6 @@ e2e-install: --set 'manager.image.pullPolicy=Never' \ --set 'manager.resources=null'\ --set "manager.image.tag=$(VERSION)" \ - --set 'manager.image.registry=$(KO_REGISTRY)' \ - --set 'manager.image.repository=$(LOCAL_CAPSULE_IMG_BASE)' \ --set 'manager.livenessProbe.failureThreshold=10' \ --set 'manager.readinessProbe.failureThreshold=10' \ --set 'podSecurityContext.seccompProfile=null' \ @@ -340,7 +339,7 @@ e2e-install: .PHONY: e2e-load-image e2e-load-image: ko-build-all - kind load docker-image --nodes capsule-control-plane --name capsule $(LOCAL_CAPSULE_IMG):$(VERSION) + kind load docker-image --nodes capsule-control-plane --name capsule $(CAPSULE_IMG):$(VERSION) .PHONY: e2e-exec e2e-exec: ginkgo From ee991ea03a81b89c3f87d6b5fe2794c0ef76d29d Mon Sep 17 00:00:00 2001 From: Dario Tranchitella Date: Thu, 26 Oct 2023 14:58:10 +0200 Subject: [PATCH 4/4] chore(website): reporting gua code for the clomonitor Signed-off-by: Dario Tranchitella --- docs/src/main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/src/main.js b/docs/src/main.js index e24758d5..f68ee55a 100644 --- a/docs/src/main.js +++ b/docs/src/main.js @@ -9,4 +9,9 @@ export default function (Vue, { router, head, isClient }) { // Set default layout as a global component Vue.component('LayoutDefault', DefaultLayout) Vue.component('LayoutMarkdown', MarkdownLayout) + + head.script.push({ + src: 'https://www.googletagmanager.com/gtag/js?id=G-ZL1M3TWPY2', + async: true + }) }