Skip to content

Sync secret update #170

Sync secret update

Sync secret update #170

Workflow file for this run

# Copyright 2022 StreamNative
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Operator E2e tests
on:
pull_request:
branches:
- '*'
paths:
- '**.go'
- '.github/workflows/e2e_test.yml'
jobs:
e2e-test:
name: E2e tests for Operators
runs-on: ubuntu-latest
env:
GOPRIVATE: github.com/streamnative
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
IMAGE: apachepulsar/pulsar:latest
WATCH_CERT_MANAGER_CRDS: "false"
steps:
- name: clean disk
run: |
df -h
sudo swapoff -a
sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo apt clean
docker rmi $(docker images -q) -f
df -h
- name: Set up Go 1.20
uses: actions/setup-go@v3
with:
go-version: '1.20'
id: go
- name: Set up Git token
run: |
git config --global url."https://${ACCESS_TOKEN}:@github.com/".insteadOf "https://github.com/"
- name: Set up Ginkgo
run: |
go install github.com/onsi/ginkgo/ginkgo@latest
- name: Checkout
uses: actions/checkout@v3
# TODO the k8s version should be configurable
- name: Setup K8s cluster
run: |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64
chmod +x ./kind
export PATH="$PWD:$PATH"
kind version
./hack/kind-cluster-build.sh --nodeNum 1 --k8sVersion v1.22.17
- name: Initialize K8s cluster
run: |
docker pull "$IMAGE"
kind load docker-image --name pulsar-dev --nodes pulsar-dev-worker "$IMAGE"
docker pull docker.cloudsmith.io/streamnative/operators/kubebuilder/kube-rbac-proxy:v0.8.0
kind load docker-image --name pulsar-dev docker.cloudsmith.io/streamnative/operators/kubebuilder/kube-rbac-proxy:v0.8.0
df -h
- name: Install Pulsar Operators and sn-platform
run: |
helm repo add streamnative https://charts.streamnative.io
helm repo add jetstack https://charts.jetstack.io
helm repo update
kubectl create namespace sn-system
helm install pulsar-operators --namespace sn-system streamnative/pulsar-operator
helm install cert-manager --namespace sn-system jetstack/cert-manager --set installCRDs=true
helm install test streamnative/sn-platform --version 1.2.38 --set initialize=true,auth.authentication.enabled=false,auth.authorization.enabled=false,components.toolset=false,components.streamnative_console=false,components.vault=false,components.pulsar_detector=false,monitoring.prometheus=false,monitoring.grafana=false,monitoring.node_exporter=false,monitoring.alert_manager=false,zookeeper.resources.requests.cpu=10m,bookkeeper.resources.requests.cpu=10m,broker.resources.requests.cpu=10m,proxy.resources.requests.cpu=10m
df -h
- name: Build and Setup Pulsar Resources Operator
run: |
make docker-build
kind load docker-image --name pulsar-dev controller:latest
make deploy
kubectl get crds
kubectl wait --for condition=available --timeout=360s deployment/pulsar-resources-operator-controller-manager -npulsar-resources-operator-system
df -h
- name: Run Operator Test
run: |
cd tests
go mod tidy
~/go/bin/ginkgo --trace --progress ./operator
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15
if: failure()