From ee98401daa894ede6879c6c95766cd5b8427af5c Mon Sep 17 00:00:00 2001 From: Joseph Lombrozo Date: Mon, 12 Dec 2022 15:40:33 -0500 Subject: [PATCH] add skaffold build test (#29) * add skaffold build test * upgrade custom actions * use a later version of skaffold * instruct earthly to create the correct image * fix helm chart, based on skaffold testing. yay! * bump chart --- .github/workflows/on_pull_request.yaml | 22 ++++++++++++++++++- charts/prom-aggregation-gateway/Chart.yaml | 2 +- .../templates/controller.yaml | 6 ++--- .../templates/service.yaml | 4 ++-- .../templates/servicemonitor.yaml | 2 +- skaffold.yaml | 2 +- 6 files changed, 29 insertions(+), 9 deletions(-) diff --git a/.github/workflows/on_pull_request.yaml b/.github/workflows/on_pull_request.yaml index 6a9ebb5..ca46ddd 100644 --- a/.github/workflows/on_pull_request.yaml +++ b/.github/workflows/on_pull_request.yaml @@ -8,7 +8,7 @@ on: - '!.tool-versions' - '!COPYING.LGPL-3' - '!.gitattributes' - - '!..gitignore' + - '!.gitignore' jobs: @@ -33,3 +33,23 @@ jobs: # intentionally avoiding --push, this is just # to test the command - run: earthly +release + + skaffold: + runs-on: ubuntu-22.04 + steps: + - uses: earthly/actions-setup@v1 + with: { version: v0.6.30 } + + - uses: actions/checkout@v3 + + - name: start minikube + uses: hiberbee/github-action-minikube@1.7.0 + + - name: setup helm + uses: hiberbee/github-action-helm@1.13.0 + + - name: run skaffold + uses: hiberbee/github-action-skaffold@1.24.0 + with: + skaffold-version: 2.0.3 + command: run diff --git a/charts/prom-aggregation-gateway/Chart.yaml b/charts/prom-aggregation-gateway/Chart.yaml index bc8f834..4fb6fd7 100644 --- a/charts/prom-aggregation-gateway/Chart.yaml +++ b/charts/prom-aggregation-gateway/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: prom-aggregation-gateway -version: 0.5.0 +version: 0.5.1 home: https://github.com/zapier/prom-aggregation-gateway maintainers: - name: djeebus diff --git a/charts/prom-aggregation-gateway/templates/controller.yaml b/charts/prom-aggregation-gateway/templates/controller.yaml index 5798c5b..e7ea7b5 100644 --- a/charts/prom-aggregation-gateway/templates/controller.yaml +++ b/charts/prom-aggregation-gateway/templates/controller.yaml @@ -33,12 +33,12 @@ spec: {{- end }} {{- end }} args: - - --listen + - --apiListen - :{{ .Values.controller.apiPort }} - - --metricsListen + - --lifecycleListen - :{{ .Values.controller.lifecyclePort }} ports: - - name: apiPort + - name: api-port containerPort: {{ .Values.controller.apiPort }} - name: lifecycle containerPort: {{ .Values.controller.lifecyclePort }} diff --git a/charts/prom-aggregation-gateway/templates/service.yaml b/charts/prom-aggregation-gateway/templates/service.yaml index 89923f4..670c402 100644 --- a/charts/prom-aggregation-gateway/templates/service.yaml +++ b/charts/prom-aggregation-gateway/templates/service.yaml @@ -13,9 +13,9 @@ spec: selector: {{- include "prom-aggregation-gateway.selectorLabels" . | nindent 4 }} ports: - - name: apiPort + - name: api-port port: {{ .Values.service.port }} - targetPort: apiPort + targetPort: api-port {{- if eq .Values.service.type "NodePort" }} nodePort: {{ .Values.service.nodePort }} {{- else if ne (default .Values.controller.nodePort 12345) 12345 }} diff --git a/charts/prom-aggregation-gateway/templates/servicemonitor.yaml b/charts/prom-aggregation-gateway/templates/servicemonitor.yaml index 44d7533..c3709c2 100644 --- a/charts/prom-aggregation-gateway/templates/servicemonitor.yaml +++ b/charts/prom-aggregation-gateway/templates/servicemonitor.yaml @@ -8,5 +8,5 @@ spec: matchLabels: {{- include "prom-aggregation-gateway.selectorLabels" . | nindent 6 }} endpoints: - - port: apiPort + - port: api-port {{- end }} diff --git a/skaffold.yaml b/skaffold.yaml index 12ec1e0..7d8b144 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -7,7 +7,7 @@ build: artifacts: - image: ghcr.io/zapier/prom-aggregation-gateway custom: - buildCommand: earthly +build-docker --version=dev + buildCommand: earthly +build-docker --version=dev --image_name=ghcr.io/zapier/prom-aggregation-gateway tagPolicy: customTemplate: template: dev