-
Notifications
You must be signed in to change notification settings - Fork 29
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
7 changed files
with
160 additions
and
19 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
on: | ||
pull_request: | ||
paths: | ||
- 'chart/**' | ||
- 'test/**' | ||
- '**.go' | ||
- '.github/workflows/topology_tests.yml' | ||
name: Test Topology | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
.bin | ||
key: cache-${{ hashFiles('**/go.sum') }}-${{ hashFiles('.bin/*') }} | ||
restore-keys: | | ||
cache- | ||
- uses: azure/setup-helm@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} # only needed if version is 'latest' | ||
id: install | ||
- name: Setup Operator | ||
run: | | ||
./test/setup-operator.sh |
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
# The script tests the push subcommand as well as postgres convectivity for canary-checker. | ||
|
||
set -e | ||
|
||
export KUBECONFIG=~/.kube/config | ||
export KARINA="karina -c $(pwd)/test/karina.yaml" | ||
export DOCKER_API_VERSION=1.39 | ||
export CLUSTER_NAME=kind-test | ||
export PATH=$(pwd)/.bin:$PATH | ||
export ROOT=$(pwd) | ||
|
||
echo "::group::Provisioning" | ||
if [[ ! -e .certs/root-ca.key ]]; then | ||
$KARINA ca generate --name root-ca --cert-path .certs/root-ca.crt --private-key-path .certs/root-ca.key --password foobar --expiry 1 | ||
$KARINA ca generate --name ingress-ca --cert-path .certs/ingress-ca.crt --private-key-path .certs/ingress-ca.key --password foobar --expiry 1 | ||
$KARINA ca generate --name sealed-secrets --cert-path .certs/sealed-secrets-crt.pem --private-key-path .certs/sealed-secrets-key.pem --password foobar --expiry 1 | ||
fi | ||
|
||
if $KARINA provision kind-cluster -e name=$CLUSTER_NAME -v ; then | ||
echo "::endgroup::" | ||
else | ||
echo "::endgroup::" | ||
exit 1 | ||
fi | ||
|
||
kubectl config use-context kind-$CLUSTER_NAME | ||
|
||
echo "::group::Operator Setup" | ||
|
||
export IMG=docker.io/flanksource/canary-checker:test | ||
make docker | ||
kind load docker-image $IMG --name kind-$CLUSTER_NAME | ||
|
||
|
||
helm dependency build $ROOT/chart | ||
helm install -f $ROOT/test/values.yaml canary-checker $ROOT/chart -n default | ||
|
||
|
||
sleep 90 | ||
|
||
|
||
kubectl get po -n default | ||
kubectl logs -n default -l app.kubernetes.io/name=canary-checker | ||
|
||
echo "::endgroup::" |
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,76 @@ | ||
# Default values for canary-checker. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
|
||
replicas: 1 | ||
|
||
image: | ||
repository: docker.io/flanksource/canary-checker | ||
pullPolicy: IfNotPresent | ||
# Overrides the image tag whose default is the chart appVersion. | ||
tag: "test" | ||
|
||
dockerSocket: true | ||
containerdSocket: false | ||
|
||
# Turn on pprof /debug endpoint | ||
debug: false | ||
logLevel: "-v" | ||
|
||
db: | ||
embedded: | ||
# If the database is embedded, setting this to true will persist the contents of the database | ||
# through a persistent volume | ||
persist: true | ||
|
||
nameOverride: "" | ||
|
||
ingress: | ||
enabled: false | ||
className: "" | ||
annotations: | ||
{} | ||
# kubernetes.io/ingress.class: nginx | ||
# kubernetes.io/tls-acme: "true" | ||
host: canary-checker | ||
tls: [] | ||
# - secretName: chart-example-tls | ||
# hosts: | ||
# - chart-example.local | ||
|
||
flanksource-ui: | ||
enabled: false # Disable canary-checker-ui by default. | ||
nameOverride: "canary-checker-ui" | ||
fullnameOverride: "canary-checker-ui" | ||
oryKratosURL: "" | ||
backendURL: "" | ||
ingress: | ||
enabled: true | ||
host: "canary-checker-ui.local" | ||
|
||
|
||
resources: | ||
requests: | ||
cpu: 200m | ||
memory: 200Mi | ||
limits: | ||
memory: 1512Mi | ||
|
||
extra: | ||
# nodeSelector: | ||
# key: value | ||
# tolerations: | ||
# - key: "key1" | ||
# operator: "Equal" | ||
# value: "value1" | ||
# effect: "NoSchedule" | ||
# affinity: | ||
# nodeAffinity: | ||
# requiredDuringSchedulingIgnoredDuringExecution: | ||
# nodeSelectorTerms: | ||
# - matchExpressions: | ||
# - key: kubernetes.io/e2e-az-name | ||
# operator: In | ||
# values: | ||
# - e2e-az1 | ||
# - e2e-az2 |