-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ct install performs locally & ci loads current capsule build
Signed-off-by: Oliver Bähler <[email protected]>
- Loading branch information
1 parent
8216112
commit 6493ecf
Showing
4 changed files
with
49 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,23 +42,31 @@ jobs: | |
else | ||
echo -e '\033[0;32mDocumentation up to date\033[0m ✔' | ||
fi | ||
# Create KIND Cluster | ||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
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 | ||
# 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: ct install --debug --config ./.github/configs/ct.yaml | ||
run: make helm-test | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
## Create KIND Cluster | ||
#- name: Create kind cluster | ||
# uses: helm/[email protected] | ||
# 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' | ||
release: | ||
if: startsWith(github.ref, 'refs/tags/helm-v') | ||
runs-on: ubuntu-latest | ||
|
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 |
---|---|---|
|
@@ -29,6 +29,3 @@ bin | |
**/*.key | ||
.DS_Store | ||
*.tgz | ||
|
||
capsule | ||
|
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 |
---|---|---|
|
@@ -86,8 +86,15 @@ 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 | ||
|
||
helm-lint: docker | ||
@docker run -v "$(SRC_ROOT):/workdir" --entrypoint /bin/sh quay.io/helmpack/chart-testing:v3.3.1 -c "cd /workdir && ct lint --config .github/configs/ct.yaml --lint-conf .github/configs/lintconf.yaml --all --debug" | ||
helm-lint: ct | ||
@ct lint --config $(SRC_ROOT)/.github/configs/ct.yaml --lint-conf $(SRC_ROOT)/.github/configs/lintconf.yaml --all --debug | ||
|
||
helm-test: kind ct docker-build | ||
@kind create cluster --wait=60s --name capsule-charts | ||
@kind load docker-image --name capsule-charts ${IMG} | ||
@kubectl create ns capsule-system | ||
@ct install --config $(SRC_ROOT)/.github/configs/ct.yaml --namespace=capsule-system --all --debug | ||
@kind delete cluster --name capsule-charts | ||
|
||
docker: | ||
@hash docker 2>/dev/null || {\ | ||
|
@@ -172,6 +179,14 @@ GINKGO = $(shell pwd)/bin/ginkgo | |
ginkgo: ## Download ginkgo locally if necessary. | ||
$(call go-install-tool,$(GINKGO),github.com/onsi/ginkgo/[email protected]) | ||
|
||
CT = $(shell pwd)/bin/ct | ||
ct: ## Download ct locally if necessary. | ||
$(call go-install-tool,$(CT),github.com/helm/chart-testing/v3/[email protected]) | ||
|
||
KIND = $(shell pwd)/bin/kind | ||
kind: ## Download kind locally if necessary. | ||
$(call go-install-tool,$(KIND),sigs.k8s.io/kind/cmd/[email protected]) | ||
|
||
KUSTOMIZE = $(shell pwd)/bin/kustomize | ||
kustomize: ## Download kustomize locally if necessary. | ||
$(call install-kustomize,$(KUSTOMIZE),3.8.7) | ||
|
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
fullnameOverride: capsule | ||
manager: | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 512Mi | ||
requests: | ||
cpu: 200m | ||
memory: 128Mi |