From 3e5015ae9c9ec845dee56b422f3ec4f76543aa0e Mon Sep 17 00:00:00 2001 From: Raymond Date: Wed, 28 Aug 2024 01:40:24 +0900 Subject: [PATCH] test: k3s deploy action --- .github/workflows/k3s-prod.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/k3s-prod.yaml b/.github/workflows/k3s-prod.yaml index 1777f7eb..6444820c 100644 --- a/.github/workflows/k3s-prod.yaml +++ b/.github/workflows/k3s-prod.yaml @@ -168,14 +168,14 @@ jobs: run: | for MODULE in $(echo $CHANGED_MODULES | tr "," "\n"); do cat < deployment-$MODULE.yaml - apiVersion: apps/v1 - kind: Deployment - metadata: + apiVersion: apps/v1 + kind: Deployment + metadata: name: $MODULE-production namespace: default labels: app: $MODULE-production - spec: + spec: replicas: 1 selector: matchLabels: @@ -187,9 +187,9 @@ jobs: spec: containers: - name: $MODULE-production - image: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}/$MODULE:latest + image: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}/$MODULE:${{ env.SHA_SHORT }} ports: - - containerPort: $PORT + - containerPort: 8080 env: - name: TZ value: "Asia/Seoul" @@ -213,22 +213,22 @@ jobs: type: DirectoryOrCreate - name: tokens-volume emptyDir: { } - --- - apiVersion: v1 - kind: Service - metadata: + --- + apiVersion: v1 + kind: Service + metadata: name: $MODULE-service-production namespace: default labels: app: $MODULE-production - spec: + spec: selector: app: $MODULE-production ports: - protocol: TCP port: 80 - targetPort: $PORT - EOF + targetPort: 8080 + EOF done