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

fix helm deployment #27

Merged
merged 8 commits into from
Sep 14, 2022
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
23 changes: 23 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ security-scan:
script:
- test "$Docker_Hub_User_Parity" -a "$Docker_Hub_Pass_Parity" ||
( echo "no docker credentials provided"; exit 1 )
- echo "Log INFO values for the image that will be built"
- echo
buildah bud
--format=docker
--build-arg VCS_REF="$CI_COMMIT_SHA"
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')"
--build-arg VERSION="$DEPLOYMENT_TAG"
--build-arg PORT="$APP_PORT"
--tag "$DEPLOYMENT_IMAGE_REGISTRY:$DEPLOYMENT_TAG"
--file src/server/Dockerfile .
- buildah bud
--format=docker
--build-arg VCS_REF="$CI_COMMIT_SHA"
Expand Down Expand Up @@ -110,6 +120,19 @@ build-production:
# https://docs.gitlab.com/ee/ci/examples/authenticating-with-hashicorp-vault/#example
- export VAULT_TOKEN="$(vault write -field=token auth/$VAULT_AUTH_PATH/login role=$VAULT_AUTH_ROLE jwt=$CI_JOB_JWT)"
- helm dependency update helm/
- echo "Log INFO values that will be deployed"
- echo
helm secrets upgrade
--install
--atomic
--timeout 300s
--namespace github-issue-sync
--values helm/$VALUES_FILE
--set common.image.tag="$DEPLOYMENT_TAG"
--set common.containerPort="$APP_PORT"
--set common.livenessProbe.httpGet.port="$APP_PORT"
--set common.readinessProbe.httpGet.port="$APP_PORT"
github-issue-sync helm/
- helm secrets upgrade
--install
--atomic
Expand Down
2 changes: 1 addition & 1 deletion helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ version: 0.1.0
appVersion: "1.16.0"
dependencies:
- name: common
version: "0.1.1"
version: "0.6.3"
repository: "https://paritytech.github.io/helm-charts/"

16 changes: 12 additions & 4 deletions helm/values-stg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,19 @@ common:
kubernetes.io/ingress.class: traefik-external
traefik.ingress.kubernetes.io/router.entrypoints: web,websecure
traefik.ingress.kubernetes.io/router.tls: "true"
hosts:

rules:
- host: github-issue-sync.parity-stg.parity.io
paths:
- path: /
pathType: ImplementationSpecific
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: github-issue-sync-common
port:
number: 80

tls:
- secretName: github-issue-sync.parity-stg.parity.io
hosts:
Expand Down
15 changes: 11 additions & 4 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ common:
# Declare variables to be passed into your templates.
fullnameOverride: "github-issue-sync"

## Additional common labels on resources
##
extraLabels:
team: opstooling

replicaCount: 1

image:
repository: paritytech/github-issue-sync
pullPolicy: IfNotPresent
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"

Expand All @@ -28,7 +33,7 @@ common:
# GREETING: "Warm greetings to"
DB_USER: "github-issue-sync"
DB_PASSWORD: ""
DB_HOST: "cloudsql"
DB_HOST: "github-issue-sync-common-cloudsql"
DB_PORT: "5432"
DB_NAME: "github-issue-sync"
LOG_FORMAT: json
Expand Down Expand Up @@ -61,8 +66,10 @@ common:

service:
type: ClusterIP
port: 80
containerPort: 3000
ports:
- name: web
port: 80
targetPort: 3000

# ingress:
# enabled: true
Expand Down