feat: update upstream_types and set additional spec as optional #27
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: Main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.19 | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Lint golang code | |
run: make lint | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.19 | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Run tests | |
run: make test | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.19 | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Build binary | |
run: make build | |
image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: build image | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: zufardhiyaulhaq/frp-operator:latest | |
e2e: | |
runs-on: ubuntu-latest | |
needs: | |
- image | |
strategy: | |
fail-fast: false | |
matrix: | |
kubernetes: [v1.29.3] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup kubectl | |
uses: azure/setup-kubectl@v1 | |
with: | |
version: 'v1.29.3' | |
- name: Setup helm | |
uses: azure/setup-helm@v1 | |
with: | |
version: 'v3.3.1' | |
- name: install kubernetes | |
uses: nolar/setup-k3d-k3s@v1 | |
with: | |
version: "${{ matrix.kubernetes }}" | |
k3d-args: --no-lb | |
- name: deploy charts | |
run: helm install frp-operator ./charts/frp-operator --values ./charts/frp-operator/values.yaml --set operator.tag=latest | |
- name: deploy applications | |
run: kubectl apply -f ./examples/deployment | |
- name: deploy frp | |
run: kubectl apply -f ./examples/client | |
- name: waiting frp-operator to start | |
run: sleep 180 | |
- name: check client object | |
run: kubectl get client -A | |
- name: check upstream object | |
run: kubectl get upstream -A | |
- name: check pod object | |
run: kubectl get pod -A | |
- name: check configmap object | |
run: kubectl get configmap -A |