mirror of
https://github.com/eliasstepanik/caddy-ingess.git
synced 2026-01-10 03:58:28 +00:00
Fix chart test CI (#81)
This commit is contained in:
parent
e9c594cd55
commit
eb23bf53e1
3
.github/workflows/helmchart-release.yml
vendored
3
.github/workflows/helmchart-release.yml
vendored
@ -3,6 +3,9 @@ name: Release Charts
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
paths:
|
||||
- 'charts/**'
|
||||
- '.github/workflows/helmchart-release.yml'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
|
||||
48
.github/workflows/main.yml
vendored
48
.github/workflows/main.yml
vendored
@ -17,22 +17,18 @@ jobs:
|
||||
|
||||
- name: Docker meta
|
||||
id: docker_meta
|
||||
uses: crazy-max/ghaction-docker-meta@v1
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: caddy/ingress
|
||||
tag-sha: true
|
||||
tags: |
|
||||
type=semver,pattern={{raw}}
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=sha
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
@ -46,8 +42,8 @@ jobs:
|
||||
push: true
|
||||
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
lint-test:
|
||||
name: Test and lint charts
|
||||
@ -60,29 +56,25 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@v2.0.1
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v1
|
||||
with:
|
||||
version: v3.8.1
|
||||
|
||||
- name: Run chart-testing (list-changed)
|
||||
id: list-changed
|
||||
run: |
|
||||
changed=$(ct list-changed)
|
||||
if [[ -n "$changed" ]]; then
|
||||
echo "::set-output name=changed::true"
|
||||
fi
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@v2.2.1
|
||||
|
||||
- name: Run chart-testing (lint)
|
||||
run: ct lint
|
||||
run: ct lint --config ct.yaml
|
||||
|
||||
- name: Create kind cluster
|
||||
uses: helm/kind-action@v1.1.0
|
||||
with:
|
||||
version: "v0.9.0"
|
||||
# Only build a kind cluster if there are chart changes to test.
|
||||
if: steps.list-changed.outputs.changed == 'true'
|
||||
uses: helm/kind-action@v1.2.0
|
||||
|
||||
- name: Install MetalLB to allow LoadBalancer services
|
||||
if: steps.list-changed.outputs.changed == 'true'
|
||||
run: |
|
||||
kubectl create ns metallb-system
|
||||
kubectl apply -f https://raw.githubusercontent.com/google/metallb/v0.9.3/manifests/metallb.yaml
|
||||
|
||||
@ -58,3 +58,16 @@ curl -H 'Host: example2.kubernetes.localhost http://127.0.0.1:80/hello2
|
||||
- You can change local port forwarded by skaffold by changing the port values in the `skaffold.yaml` file on section `portForward` `localPort`. Remind that you can forward only port greather than 1024 if you execute it as non root user
|
||||
- You can delete your local cluster with the command `kind delete cluster`
|
||||
- To use TLS your domain should be publically resolved to your cluster IP in order to allow Let's Encript to validate the domain
|
||||
|
||||
## Releasing new helm chart version
|
||||
|
||||
If you want to release a new version of the `caddy-ingress-controller` chart, you'll need
|
||||
to create a new PR with:
|
||||
- The new chart's `version` in `Chart.yaml`
|
||||
- The new `image.tag` in `values.yaml` (if you want to update the default image used in the chart)
|
||||
- The new `appVersion` in `Chart.yaml` (if you did the previous line)
|
||||
|
||||
## Releasing a new app version
|
||||
|
||||
To release a new caddy-ingress-controller image, you need to create a new semver tag.
|
||||
It will build and push an image to https://hub.docker.com/r/caddy/ingress.
|
||||
|
||||
@ -5,6 +5,7 @@ description: A helm chart for the Caddy Kubernetes ingress controller
|
||||
icon: https://caddyserver.com/resources/images/caddy-circle-lock.svg
|
||||
type: application
|
||||
version: 0.0.1-rc4
|
||||
appVersion: "0.1.0"
|
||||
keywords:
|
||||
- ingress-controller
|
||||
- caddyserver
|
||||
|
||||
@ -9,7 +9,7 @@ minikube: false
|
||||
image:
|
||||
repository: caddy/ingress
|
||||
pullPolicy: IfNotPresent
|
||||
tag: "latest"
|
||||
tag: "v0.1.0"
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user