This repository has been archived by the owner on Nov 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
403 additions
and
148 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 |
---|---|---|
|
@@ -26,17 +26,17 @@ jobs: | |
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed) | ||
changed=$(ct list-changed --chart-dirs chart) | ||
if [[ -n "$changed" ]]; then | ||
echo "::set-output name=changed::true" | ||
fi | ||
- name: Run chart-testing (lint) | ||
run: ct lint | ||
run: ct lint --chart-dirs chart | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Run chart-testing (install) | ||
run: ct install | ||
run: ct install --chart-dirs chart |
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 |
---|---|---|
|
@@ -4,26 +4,40 @@ on: | |
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- DK-2819 | ||
- master | ||
|
||
jobs: | ||
kind: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
- name: Setup QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
go-version: 1.16.x | ||
platforms: all | ||
- name: Setup Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Restore Go cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: /home/runner/work/_temp/_github_home/go/pkg/mod | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Cache Docker layers | ||
uses: actions/cache@v2 | ||
id: cache | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-ghcache-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx-ghcache- | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16.x | ||
- name: Setup Kubernetes | ||
uses: engineerd/[email protected] | ||
with: | ||
|
@@ -46,8 +60,15 @@ jobs: | |
echo 'run make test and commit changes' | ||
exit 1 | ||
fi | ||
- name: Build container image1 | ||
run: make docker-build IMG=test/k8stcpmap-controller:latest BUILD_PLATFORMS=linux/amd64 BUILD_ARGS=--load | ||
- name: Build container image | ||
run: | | ||
make docker-build IMG=test/k8stcpmap-controller:latest BUILD_PLATFORMS=linux/amd64 \ | ||
BUILD_ARGS="--cache-from=type=local,src=/tmp/.buildx-cache \ | ||
--cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max" | ||
- name: Move cache | ||
run: | | ||
rm -rf /tmp/.buildx-cache | ||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache | ||
- name: Load test image | ||
run: kind load docker-image test/k8stcpmap-controller:latest | ||
- name: Deploy controller | ||
|
@@ -62,7 +83,8 @@ jobs: | |
helm upgrade --wait -i ingress-nginx ingress-nginx/ingress-nginx \ | ||
--version $NGINX_INGRESS_VER \ | ||
--namespace ingress-nginx \ | ||
--set controller.extraArgs.tcp-services-configmap="\$(POD_NAMESPACE)/tcp-services-configmap" | ||
--set controller.extraArgs.tcp-services-configmap="\$(POD_NAMESPACE)/tcp-services-configmap" \ | ||
--set controller.service.type=ClusterIP | ||
- name: Setup podinfo | ||
env: | ||
PODINFO_VER: ${{ '6.0.3' }} | ||
|
@@ -71,11 +93,19 @@ jobs: | |
helm repo add podinfo https://stefanprodan.github.io/podinfo | ||
helm upgrade --install --wait backend podinfo/podinfo \ | ||
--version $PODINFO_VER \ | ||
--namespace podinfo | ||
--namespace podinfo \ | ||
--set replicaCount=2 | ||
- name: Run tcpmap tests | ||
run: | | ||
kubectl -n podinfo apply -f ./config/testdata | ||
kubectl -n podinfo wait tcpingressmappings/backend-podinfo --for=condition=Ready --timeout=1m | ||
electedPort=$(kubectl -n podinfo get tcpingressmappings/backend-podinfo -o jsonpath='{.status.electedPort}') | ||
echo "bound port $electedPort" | ||
kubectl -n ingress-nginx port-forward svc/ingress-nginx-controller 8080:$electedPort &>/dev/null & | ||
#We need to wait a bit til nginx reloaded the map | ||
sleep 10 | ||
curl --haproxy-protocol -v --fail http://localhost:8080 | ||
- name: Logs | ||
run: | | ||
kubectl -n k8stcpmap-system logs deploy/k8stcpmap-controller | ||
|
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 |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Run chart-releaser | ||
uses: helm/chart-releaser-action@v1.2.1 | ||
uses: helm/chart-releaser-action@v1.3.0 | ||
with: | ||
charts_dir: ./chart | ||
env: | ||
|
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
project_name: k8stcpmap-controller | ||
|
||
builds: | ||
- skip: true | ||
|
||
release: | ||
prerelease: "true" | ||
extra_files: | ||
- glob: config/release/*.yaml | ||
|
||
checksum: | ||
extra_files: | ||
- glob: config/release/*.yaml | ||
|
||
source: | ||
enabled: true | ||
name_template: "{{ .ProjectName }}_{{ .Version }}_source_code" | ||
|
||
sboms: | ||
- id: source | ||
artifacts: source | ||
documents: | ||
- "{{ .ProjectName }}_{{ .Version }}_sbom.spdx.json" | ||
|
||
# signs the checksum file | ||
# all files (including the sboms) are included in the checksum | ||
# https://goreleaser.com/customization/sign | ||
#signs: | ||
# - cmd: cosign | ||
# env: | ||
# - COSIGN_EXPERIMENTAL=1 | ||
# certificate: "${artifact}.pem" | ||
# args: | ||
# - sign-blob | ||
# - "--output-certificate=${certificate}" | ||
# - "--output-signature=${signature}" | ||
# - "${artifact}" | ||
# artifacts: checksum | ||
# output: true |
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,9 +1,18 @@ | ||
## Release process | ||
|
||
1. Create pr to master with these changes: | ||
### Controller release | ||
1. Merge all pr's to master which need to be part of the new release | ||
2. Create pr to master with these changes: | ||
1. Bump kustomization | ||
2. Create CHANGELOG.md entry with release and date | ||
3. Merge pr | ||
4. Push a tag following semantic versioning prefixed by 'v'. Do not create a github release, this is done automatically. | ||
5. Create new branch and add the following changes: | ||
1. Bump chart version | ||
2. Bump charts app version | ||
3. Bump kustomizaion | ||
2. Merge pr | ||
3. Push a tag following semantic versioning prefixed by 'v'. | ||
Do not create a github release, this is done automatically. | ||
6. Create pr to master and merge | ||
|
||
### Helm chart change only | ||
1. Create branch with changes | ||
2. Bump chart version | ||
3. Create pr to master and merge |
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,11 +1,14 @@ | ||
apiVersion: v2 | ||
appVersion: 0.0.0 | ||
description: Automated tcp mapping for the nginx ingress controller | ||
appVersion: v0.1.0 | ||
description: Automated tcp port mapping for the nginx ingress controller | ||
home: https://github.com/DoodleScheduling/k8stcpmap-controller | ||
maintainers: | ||
- name: devops | ||
email: [email protected] | ||
keywords: | ||
- kubernetes-controller | ||
- nginx-ingress | ||
name: k8stcpmap-controller | ||
sources: | ||
- https://github.com/DoodleScheduling/k8stcpmap-controller | ||
version: 0.0.0 | ||
version: 0.1.0 |
Oops, something went wrong.