Adding sniffer readiness & liveness probes port to values.yaml. Added linkerd to mapper excluded namespaces #1049
Workflow file for this run
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
name: E2E Test | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
- labeled | |
workflow_dispatch: | |
inputs: | |
gcr-registry: | |
required: false | |
type: string | |
intents-operator-tag: | |
required: false | |
type: string | |
credentials-operator-tag: | |
required: false | |
type: string | |
workflow_call: | |
inputs: | |
github_ref: | |
required: false | |
type: string | |
gcr-registry: | |
required: false | |
type: string | |
intents-operator-tag: | |
required: false | |
type: string | |
credentials-operator-tag: | |
required: false | |
type: string | |
secrets: | |
AZURE_CREDENTIALS: | |
required: true | |
B64_GCLOUD_SERVICE_ACCOUNT_JSON: | |
required: false | |
jobs: | |
test-chart-deployment: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# explicitly checkout helm-charts repository since this is a reusable workflow that's called from other repositories | |
repository: 'otterize/helm-charts' | |
ref: ${{ inputs.github_ref }} | |
- name: Set up Helm | |
uses: azure/setup-helm@v4.2.0 | |
- name: Start minikube | |
uses: medyagh/setup-minikube@master | |
with: | |
start-args: "--network-plugin=cni --cni=calico" | |
- name: Wait for Calico startup | |
run: |- | |
kubectl wait pods -n kube-system -l k8s-app=calico-kube-controllers --for condition=Ready --timeout=90s | |
kubectl wait pods -n kube-system -l k8s-app=calico-node --for condition=Ready --timeout=90s | |
kubectl wait pods -n kube-system -l k8s-app=calico-kube-controllers --for condition=Ready --timeout=90s | |
- name: Login to GCR | |
if: "${{ inputs.gcr-registry != '' }}" | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ inputs.gcr-registry }} | |
username: _json_key_base64 | |
password: ${{ secrets.B64_GCLOUD_SERVICE_ACCOUNT_JSON}} | |
- name: Load intents-operator docker image from GCR | |
if: "${{ inputs.gcr-registry != '' && inputs.intents-operator-tag != ''}}" | |
run: |- | |
docker pull ${{ inputs.gcr-registry }}/intents-operator:${{ inputs.intents-operator-tag }} | |
minikube image load ${{ inputs.gcr-registry }}/intents-operator:${{ inputs.intents-operator-tag }} | |
- name: Load credentials-operator docker image from GCR | |
if: "${{ inputs.gcr-registry != '' && inputs.credentials-operator-tag != ''}}" | |
run: |- | |
docker pull ${{ inputs.gcr-registry }}/credentials-operator:${{ inputs.credentials-operator-tag }} | |
minikube image load ${{ inputs.gcr-registry }}/credentials-operator:${{ inputs.credentials-operator-tag }} | |
- name: Deploy Otterize | |
run: |- | |
helm dep up ./otterize-kubernetes | |
# schema validation using kubectl dry run | |
OPERATOR_FLAGS="" | |
if [ -n "${{ inputs.intents-operator-tag }}" ]; then | |
OPERATOR_FLAGS="$OPERATOR_FLAGS --set-string intentsOperator.operator.repository=${{ inputs.gcr-registry }} --set-string intentsOperator.operator.image=intents-operator --set-string intentsOperator.operator.tag=${{ inputs.intents-operator-tag }} --set-string intentsOperator.operator.pullPolicy=Never" | |
fi | |
if [ -n "${{ inputs.credentials-operator-tag }}" ]; then | |
OPERATOR_FLAGS="$OPERATOR_FLAGS --set-string credentialsOperator.operator.repository=${{ inputs.gcr-registry }} --set-string credentialsOperator.operator.image=credentials-operator --set-string credentialsOperator.operator.tag=${{ inputs.credentials-operator-tag }} --set-string credentialsOperator.operator.pullPolicy=Never" | |
fi | |
TELEMETRY_FLAG="--set global.telemetry.enabled=false" | |
kubectl create namespace otterize-system # required for dry-run | |
helm template otterize ./otterize-kubernetes -n otterize-system $OPERATOR_FLAGS $TELEMETRY_FLAG | kubectl apply --dry-run=server -f - | |
kubectl delete namespace otterize-system # clean up | |
# installation | |
helm install otterize ./otterize-kubernetes -n otterize-system --wait --create-namespace $OPERATOR_FLAGS $TELEMETRY_FLAG | |
test-postgresql-integration: | |
permissions: | |
id-token: write | |
contents: read | |
checks: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# explicitly checkout helm-charts repository since this is a reusable workflow that's called from other repositories | |
repository: 'otterize/helm-charts' | |
ref: ${{ inputs.github_ref }} | |
- name: Start minikube | |
uses: medyagh/setup-minikube@master | |
- name: Set up Helm | |
uses: azure/setup-helm@v4.2.0 | |
- name: Setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23.1 | |
cache-dependency-path: tests/go.sum | |
- name: Install go-junit-report | |
run: go install github.com/jstemmer/go-junit-report/v2@latest | |
- name: Set up gotestfmt | |
uses: GoTestTools/gotestfmt-action@v2 | |
with: | |
# Optional: pass GITHUB_TOKEN to avoid rate limiting. | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Helm dependency update | |
run: helm dep up ./otterize-kubernetes | |
- name: Login to GCR | |
if: "${{ inputs.gcr-registry != '' }}" | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ inputs.gcr-registry }} | |
username: _json_key_base64 | |
password: ${{ secrets.B64_GCLOUD_SERVICE_ACCOUNT_JSON}} | |
- name: Load intents-operator docker image from GCR | |
if: "${{ inputs.gcr-registry != '' && inputs.intents-operator-tag != ''}}" | |
run: |- | |
docker pull ${{ inputs.gcr-registry }}/intents-operator:${{ inputs.intents-operator-tag }} | |
minikube image load ${{ inputs.gcr-registry }}/intents-operator:${{ inputs.intents-operator-tag }} | |
- name: Load credentials-operator docker image from GCR | |
if: "${{ inputs.gcr-registry != '' && inputs.credentials-operator-tag != ''}}" | |
run: |- | |
docker pull ${{ inputs.gcr-registry }}/credentials-operator:${{ inputs.credentials-operator-tag }} | |
minikube image load ${{ inputs.gcr-registry }}/credentials-operator:${{ inputs.credentials-operator-tag }} | |
- name: Run E2E tests - PostgreSQL integrations | |
run: | | |
cd tests | |
if [ -n "${{ inputs.intents-operator-tag }}" ]; then | |
export INTENTS_OPERATOR_REPOSITORY=${{ inputs.gcr-registry }} | |
export INTENTS_OPERATOR_TAG=${{ inputs.intents-operator-tag }} | |
export INTENTS_OPERATOR_IMAGE=intents-operator | |
fi | |
if [ -n "${{ inputs.credentials-operator-tag }}" ]; then | |
export CREDENTIALS_OPERATOR_REPOSITORY=${{ inputs.gcr-registry }} | |
export CREDENTIALS_OPERATOR_TAG=${{ inputs.credentials-operator-tag }} | |
export CREDENTIALS_OPERATOR_IMAGE=credentials-operator | |
fi | |
go test -v -json ./databases/postgresql/... | tee /tmp/gotest.log | gotestfmt | |
- name: Archive test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-logs-postgresql | |
path: /tmp/gotest.log | |
if-no-files-found: error | |
if: always() | |
- name: Generate JUnit report | |
run: go-junit-report -parser gojson -in /tmp/gotest.log -out /tmp/test_report.xml | |
if: always() | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
with: | |
name: Test report - PostgreSQL integrations | |
path: /tmp/test_report.xml | |
reporter: java-junit | |
fail-on-error: false | |
badge-title: 'PostgreSQL tests' | |
if: always() && github.event.pull_request.user.login != 'dependabot[bot]' | |
test-mysql-integration: | |
permissions: | |
id-token: write | |
contents: read | |
checks: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# explicitly checkout helm-charts repository since this is a reusable workflow that's called from other repositories | |
repository: 'otterize/helm-charts' | |
ref: ${{ inputs.github_ref }} | |
- name: Start minikube | |
uses: medyagh/setup-minikube@master | |
- name: Set up Helm | |
uses: azure/setup-helm@v4.2.0 | |
- name: Setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23.1 | |
cache-dependency-path: tests/go.sum | |
- name: Install go-junit-report | |
run: go install github.com/jstemmer/go-junit-report/v2@latest | |
- name: Set up gotestfmt | |
uses: GoTestTools/gotestfmt-action@v2 | |
with: | |
# Optional: pass GITHUB_TOKEN to avoid rate limiting. | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Helm dependency update | |
run: helm dep up ./otterize-kubernetes | |
- name: Login to GCR | |
if: "${{ inputs.gcr-registry != '' }}" | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ inputs.gcr-registry }} | |
username: _json_key_base64 | |
password: ${{ secrets.B64_GCLOUD_SERVICE_ACCOUNT_JSON}} | |
- name: Load intents-operator docker image from GCR | |
if: "${{ inputs.gcr-registry != '' && inputs.intents-operator-tag != ''}}" | |
run: |- | |
docker pull ${{ inputs.gcr-registry }}/intents-operator:${{ inputs.intents-operator-tag }} | |
minikube image load ${{ inputs.gcr-registry }}/intents-operator:${{ inputs.intents-operator-tag }} | |
- name: Load credentials-operator docker image from GCR | |
if: "${{ inputs.gcr-registry != '' && inputs.credentials-operator-tag != ''}}" | |
run: |- | |
docker pull ${{ inputs.gcr-registry }}/credentials-operator:${{ inputs.credentials-operator-tag }} | |
minikube image load ${{ inputs.gcr-registry }}/credentials-operator:${{ inputs.credentials-operator-tag }} | |
- name: Run E2E tests - MySQL integrations | |
run: | | |
cd tests | |
if [ -n "${{ inputs.intents-operator-tag }}" ]; then | |
export INTENTS_OPERATOR_REPOSITORY=${{ inputs.gcr-registry }} | |
export INTENTS_OPERATOR_TAG=${{ inputs.intents-operator-tag }} | |
export INTENTS_OPERATOR_IMAGE=intents-operator | |
fi | |
if [ -n "${{ inputs.credentials-operator-tag }}" ]; then | |
export CREDENTIALS_OPERATOR_REPOSITORY=${{ inputs.gcr-registry }} | |
export CREDENTIALS_OPERATOR_TAG=${{ inputs.credentials-operator-tag }} | |
export CREDENTIALS_OPERATOR_IMAGE=credentials-operator | |
fi | |
go test -v -json ./databases/mysql/... | tee /tmp/gotest.log | gotestfmt | |
- name: Archive test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-logs-mysql | |
path: /tmp/gotest.log | |
if-no-files-found: error | |
if: always() | |
- name: Generate JUnit report | |
run: go-junit-report -parser gojson -in /tmp/gotest.log -out /tmp/test_report.xml | |
if: always() | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
with: | |
name: Test report - MySQL integrations | |
path: /tmp/test_report.xml | |
reporter: java-junit | |
fail-on-error: false | |
badge-title: 'MySQL tests' | |
if: always() && github.event.pull_request.user.login != 'dependabot[bot]' | |
test-azure-integration: | |
if: contains(github.event.pull_request.labels.*.name, 'run-azure-e2e-tests') || (github.event_name == 'push' && github.repository == 'otterize/helm-charts' && startsWith(github.ref, 'refs/tags/')) | |
runs-on: ubuntu-latest | |
concurrency: | |
group: azure-e2e-tests # do not allow concurrent runs of this job | |
cancel-in-progress: false | |
steps: | |
- name: Fail on custom registry | |
if: "${{ inputs.gcr-registry != '' }}" | |
run: | | |
echo "This job does not support custom docker registry" | |
exit 1 | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
# explicitly checkout helm-charts repository since this is a reusable workflow that's called from other repositories | |
repository: 'otterize/helm-charts' | |
ref: ${{ inputs.github_ref }} | |
- name: Log in with Azure | |
uses: azure/login@v2 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Azure CLI script | |
uses: azure/CLI@v2 | |
with: | |
inlineScript: | | |
az account show | |
- name: Set AKS context | |
uses: azure/aks-set-context@v4 | |
with: | |
resource-group: 'otterizeGitHubActionsResourceGroup' | |
cluster-name: 'otterizeAzureIAME2EAKSCluster' | |
- name: Setup kubectl | |
uses: azure/setup-kubectl@v4 | |
- name: Set up Helm | |
uses: azure/setup-helm@v4.2.0 | |
- name: Setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23.1 | |
cache-dependency-path: tests/go.sum | |
- name: Install go-junit-report | |
run: go install github.com/jstemmer/go-junit-report/v2@latest | |
- name: Set up gotestfmt | |
uses: GoTestTools/gotestfmt-action@v2 | |
with: | |
# Optional: pass GITHUB_TOKEN to avoid rate limiting. | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Helm dependency update | |
run: helm dep up ./otterize-kubernetes | |
- name: Cleanup test namespaces | |
run: | | |
kubectl delete namespace otterize-tutorial-azure-iam --ignore-not-found=true --wait | |
kubectl delete namespace otterize-system --ignore-not-found=true --wait | |
- name: Run E2E tests - Azure integrations | |
run: | | |
cd tests | |
go test -v -json ./azureiam/... | tee /tmp/gotest.log | gotestfmt | |
- name: Archive test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-logs-azure | |
path: /tmp/gotest.log | |
if-no-files-found: error | |
if: always() | |
- name: Generate JUnit report | |
run: go-junit-report -parser gojson -in /tmp/gotest.log -out /tmp/test_report.xml | |
if: always() | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
with: | |
name: Test report - Azure integrations | |
path: /tmp/test_report.xml | |
reporter: java-junit | |
fail-on-error: false | |
badge-title: 'Azure tests' | |
if: always() && github.event.pull_request.user.login != 'dependabot[bot]' | |
e2e-test: | |
needs: | |
- test-chart-deployment | |
- test-postgresql-integration | |
- test-mysql-integration | |
runs-on: ubuntu-latest | |
steps: | |
- run: |- | |
echo Success! This step is only here to depend on the tests. |