Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add ARM64 support #573

Merged
merged 1 commit into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 9 additions & 123 deletions .github/workflows/build_canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,15 @@ on:
branches: [ main ]
workflow_dispatch:

env:
IMAGE_OPERATOR_NAME: ghcr.io/${{ github.repository_owner }}/http-add-on-operator
IMAGE_INTERCEPTOR_NAME: ghcr.io/${{ github.repository_owner }}/http-add-on-interceptor
IMAGE_SCALER_NAME: ghcr.io/${{ github.repository_owner }}/http-add-on-scaler

jobs:
build_operator:

build:
runs-on: ubuntu-20.04

container: ghcr.io/kedacore/build-tools:1.19.5
steps:
- uses: actions/checkout@v3

- name: Set up tags and refs
id: prep
run: |
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=sha::$(git rev-parse --short HEAD)

- name: Set up Buildx
uses: docker/setup-buildx-action@v2
- name: Register workspace path
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Login to GHCR
uses: docker/login-action@v2
Expand All @@ -37,112 +25,10 @@ jobs:
# Server address of Docker registry. If not set then will default to Docker Hub
registry: ghcr.io

- name: Build and push operator image
uses: docker/build-push-action@v3
with:
# Docker repository to tag the image with
tags: |
${{ env.IMAGE_OPERATOR_NAME }}:canary,${{ env.IMAGE_OPERATOR_NAME }}:sha-${{ steps.prep.outputs.sha }}
labels: |
sh.keda.http.image.source=${{github.event.repository.html_url}}
sh.keda.http.image.created=${{steps.prep.outputs.created}}
sh.keda.http.image.revision=${{github.sha}}
build-args: "VERSION=${{ steps.prep.outputs.sha }}"
file: operator/Dockerfile
context: .
push: true

build_interceptor:

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3

- name: Set up tags and refs
id: prep
run: |
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=sha::$(git rev-parse --short HEAD)

- name: Set up Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GHCR
uses: docker/login-action@v2
with:
# Username used to log in to a Docker registry. If not set then no login will occur
username: ${{ github.repository_owner }}
# https://github.blog/changelog/2021-03-24-packages-container-registry-now-supports-github_token/
password: ${{ secrets.GITHUB_TOKEN }}
# Server address of Docker registry. If not set then will default to Docker Hub
registry: ghcr.io

- name: Build and push interceptor image
uses: docker/build-push-action@v3
with:
# Docker repository to tag the image with
tags: ${{ env.IMAGE_INTERCEPTOR_NAME }}:canary,${{ env.IMAGE_INTERCEPTOR_NAME }}:sha-${{steps.prep.outputs.sha}}
labels: |
sh.keda.http.image.source=${{github.event.repository.html_url}}
sh.keda.http.image.created=${{steps.prep.outputs.created}}
sh.keda.http.image.revision=${{github.sha}}
file: interceptor/Dockerfile
context: .
push: true

build_scaler:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3

- name: Set up tags and refs
id: prep
run: |
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=sha::$(git rev-parse --short HEAD)

- name: Set up Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GHCR
uses: docker/login-action@v2
with:
# Username used to log in to a Docker registry. If not set then no login will occur
username: ${{ github.repository_owner }}
# Password or personal access token used to log in to a Docker registry. If not set then no login will occur
password: ${{ secrets.GITHUB_TOKEN }}
# Server address of Docker registry. If not set then will default to Docker Hub
registry: ghcr.io

- name: Build and push scaler image
uses: docker/build-push-action@v3
with:
# Docker repository to tag the image with
tags: ${{ env.IMAGE_SCALER_NAME }}:canary,${{ env.IMAGE_SCALER_NAME }}:sha-${{steps.prep.outputs.sha}}
labels: |
sh.keda.http.image.source=${{github.event.repository.html_url}}
sh.keda.http.image.created=${{steps.prep.outputs.created}}
sh.keda.http.image.revision=${{github.sha}}
file: scaler/Dockerfile
context: .
push: true

e2e_tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: Helm install
uses: Azure/setup-helm@v3

- name: Create k8s v1.23 Kind Cluster
uses: helm/kind-action@main
with:
node_image: kindest/node:v1.23.0@sha256:49824ab1727c04e56a21a5d8372a402fcd32ea51ac96a2706a12af38934f81ac
cluster_name: http-add-on-smoke-tests-cluster

- name: Run e2e test
run: |
./tests/e2e-test.sh
- name: Publish on GitHub Container Registry
run: make publish-multiarch
env:
VERSION: canary
123 changes: 9 additions & 114 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,77 +4,21 @@ on:
push:
tags: [ "v[0-9].[0-9].[0-9]" ]

env:
IMAGE_OPERATOR_NAME: ghcr.io/${{ github.repository_owner }}/http-add-on-operator
IMAGE_INTERCEPTOR_NAME: ghcr.io/${{ github.repository_owner }}/http-add-on-interceptor
IMAGE_SCALER_NAME: ghcr.io/${{ github.repository_owner }}/http-add-on-scaler

jobs:
build_operator:

build:
runs-on: ubuntu-20.04

container: ghcr.io/kedacore/build-tools:1.19.5
steps:
- uses: actions/checkout@v3

- name: Set up tags and refs
id: prep
run: |
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')

- name: Get the version
id: get_version
run: |
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}

- name: Set up Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GHCR
uses: docker/login-action@v2
with:
# Username used to log in to a Docker registry. If not set then no login will occur
username: ${{ github.repository_owner }}
# Password or personal access token used to log in to a Docker registry. If not set then no login will occur
password: ${{ secrets.GITHUB_TOKEN }}
# Server address of Docker registry. If not set then will default to Docker Hub
registry: ghcr.io

- name: Build and push operator image
uses: docker/build-push-action@v3
with:
# Docker repository to tag the image with
tags: ${{ env.IMAGE_OPERATOR_NAME }}:latest,${{ env.IMAGE_OPERATOR_NAME }}:${{ steps.get_version.outputs.VERSION }}
labels: |
sh.keda.http.image.source=${{github.event.repository.html_url}}
sh.keda.http.image.created=${{steps.prep.outputs.created}}
sh.keda.http.image.revision=${{github.sha}}
sh.keda.http.image.release=${{github.ref}}
build-args: "VERSION=${{ steps.prep.outputs.VERSION }}"
file: operator/Dockerfile
context: .
push: true

build_interceptor:

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3

- name: Set up tags and refs
id: prep
run: |
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- name: Register workspace path
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Get the version
id: get_version
run: |
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}

- name: Set up Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GHCR
uses: docker/login-action@v2
with:
Expand All @@ -85,59 +29,10 @@ jobs:
# Server address of Docker registry. If not set then will default to Docker Hub
registry: ghcr.io

- name: Build and push interceptor image
uses: docker/build-push-action@v3
with:
# Docker repository to tag the image with
tags: ${{ env.IMAGE_INTERCEPTOR_NAME }}:latest,${{ env.IMAGE_INTERCEPTOR_NAME }}:${{ steps.get_version.outputs.VERSION }}
labels: |
sh.keda.http.image.source=${{github.event.repository.html_url}}
sh.keda.http.image.created=${{steps.prep.outputs.created}}
sh.keda.http.image.revision=${{github.sha}}
sh.keda.http.image.release=${{github.ref}}
file: interceptor/Dockerfile
context: .
push: true

build_scaler:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3

- name: Set up tags and refs
id: prep
run: |
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')

- name: Get the version
id: get_version
run: |
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}

- name: Set up Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GHCR
uses: docker/login-action@v2
with:
# Username used to log in to a Docker registry. If not set then no login will occur
username: ${{ github.repository_owner }}
# Password or personal access token used to log in to a Docker registry. If not set then no login will occur
password: ${{ secrets.GITHUB_TOKEN }}
# Server address of Docker registry. If not set then will default to Docker Hub
registry: ghcr.io

- name: Build and push scaler image
uses: docker/build-push-action@v3
with:
# Docker repository to tag the image with
tags: ${{ env.IMAGE_SCALER_NAME }}:latest,${{ env.IMAGE_SCALER_NAME }}:${{ steps.get_version.outputs.VERSION }}
labels: |
sh.keda.http.image.source=${{github.event.repository.html_url}}
sh.keda.http.image.created=${{steps.prep.outputs.created}}
sh.keda.http.image.revision=${{github.sha}}
sh.keda.http.image.release=${{github.ref}}
file: scaler/Dockerfile
context: .
push: true
- name: Publish on GitHub Container Registry
run: make publish-multiarch
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}
Loading