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