diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2c18aa6..eb1a49f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,7 +5,7 @@ on: branches: - main - qa - - prod + - rc jobs: build: @@ -43,7 +43,7 @@ jobs: run: | BRANCH_NAME=$(echo ${GITHUB_REF##*/} | tr / -) TAG_NAME="0.0.0" # Adding default tag for main as 0.0.0 - + echo "BRANCH_NAME: ${BRANCH_NAME}" if [ "$BRANCH_NAME" == "main" ]; then LAST_TAG=$(git tag -l "0.*" | sort -V | tail -n 1) if [ -z "$LAST_TAG" ]; then @@ -53,7 +53,7 @@ jobs: NEW_PATCH_VERSION=$((PATCH_VERSION + 1)) TAG_NAME="0.1.$NEW_PATCH_VERSION" fi - elif [ "$BRANCH_NAME" == "prod" ]; then + elif [ "$BRANCH_NAME" == "rc" ]; then LAST_TAG=$(git tag -l "1.*" | sort -V | tail -n 1) if [ -z "$LAST_TAG" ]; then TAG_NAME="1.0.0" @@ -74,14 +74,14 @@ jobs: - name: Create Git Tag run: | - if [ "$BRANCH_NAME" == "main" ] || [ "$BRANCH_NAME" == "prod" ]; then + # if [ "$BRANCH_NAME" == "main" ] || [ "$BRANCH_NAME" == "rc" ]; then git config user.name "github-actions" git config user.email "github-actions@github.com" git tag ${{ env.TAG_NAME }} git push origin ${{ env.TAG_NAME }} - else - echo "Main branch detected, skipping tag" - fi + # else + # echo "Main branch detected, skipping tag" + # fi - name: Install Helm run: | diff --git a/fluxcd/clusters/poc/dev/app/helmrelease.yaml b/fluxcd/clusters/poc/dev/app/helmrelease.yaml index 6de8417..9e69386 100644 --- a/fluxcd/clusters/poc/dev/app/helmrelease.yaml +++ b/fluxcd/clusters/poc/dev/app/helmrelease.yaml @@ -4,7 +4,7 @@ metadata: name: app spec: interval: 10m - releaseName: dummyapp + releaseName: app chart: spec: chart: nodejs @@ -12,4 +12,6 @@ spec: kind: HelmRepository name: ecr namespace: flux-system - version: ">=0.1.0" \ No newline at end of file + version: ">=0.1.0" + values: + network: rinkeby \ No newline at end of file diff --git a/fluxcd/clusters/poc/prod/app/helmrelease.yaml b/fluxcd/clusters/poc/prod/app/helmrelease.yaml index d4c7f35..5580f87 100644 --- a/fluxcd/clusters/poc/prod/app/helmrelease.yaml +++ b/fluxcd/clusters/poc/prod/app/helmrelease.yaml @@ -4,7 +4,7 @@ metadata: name: app spec: interval: 10m - releaseName: dummyapp + releaseName: app chart: spec: chart: nodejs diff --git a/helm/nodejs/templates/deployment.yaml b/helm/nodejs/templates/deployment.yaml index 712e39b..880fb4a 100644 --- a/helm/nodejs/templates/deployment.yaml +++ b/helm/nodejs/templates/deployment.yaml @@ -37,14 +37,6 @@ spec: - name: http containerPort: 3000 protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} diff --git a/helm/nodejs/templates/service.yaml b/helm/nodejs/templates/service.yaml index 4c96f6e..8bb17ce 100644 --- a/helm/nodejs/templates/service.yaml +++ b/helm/nodejs/templates/service.yaml @@ -7,9 +7,8 @@ metadata: spec: type: {{ .Values.service.type }} ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http + - protocol: TCP + port: 80 + targetPort: 3000 selector: {{- include "nodejs.selectorLabels" . | nindent 4 }} diff --git a/helm/nodejs/values.yaml b/helm/nodejs/values.yaml index fb6fe4d..6d547ed 100644 --- a/helm/nodejs/values.yaml +++ b/helm/nodejs/values.yaml @@ -38,7 +38,7 @@ securityContext: {} service: type: ClusterIP - port: 80 + port: 3000 ingress: enabled: false