Skip to content

Commit bbe842d

Browse files
authored
Merge pull request #27 from paritytech/radu-debug-helm
fix helm deployment
2 parents 91fc50a + 8a80192 commit bbe842d

File tree

4 files changed

+47
-9
lines changed

4 files changed

+47
-9
lines changed

.gitlab-ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ security-scan:
7575
script:
7676
- test "$Docker_Hub_User_Parity" -a "$Docker_Hub_Pass_Parity" ||
7777
( echo "no docker credentials provided"; exit 1 )
78+
- echo "Log INFO values for the image that will be built"
79+
- echo
80+
buildah bud
81+
--format=docker
82+
--build-arg VCS_REF="$CI_COMMIT_SHA"
83+
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')"
84+
--build-arg VERSION="$DEPLOYMENT_TAG"
85+
--build-arg PORT="$APP_PORT"
86+
--tag "$DEPLOYMENT_IMAGE_REGISTRY:$DEPLOYMENT_TAG"
87+
--file src/server/Dockerfile .
7888
- buildah bud
7989
--format=docker
8090
--build-arg VCS_REF="$CI_COMMIT_SHA"
@@ -110,6 +120,19 @@ build-production:
110120
# https://docs.gitlab.com/ee/ci/examples/authenticating-with-hashicorp-vault/#example
111121
- export VAULT_TOKEN="$(vault write -field=token auth/$VAULT_AUTH_PATH/login role=$VAULT_AUTH_ROLE jwt=$CI_JOB_JWT)"
112122
- helm dependency update helm/
123+
- echo "Log INFO values that will be deployed"
124+
- echo
125+
helm secrets upgrade
126+
--install
127+
--atomic
128+
--timeout 300s
129+
--namespace github-issue-sync
130+
--values helm/$VALUES_FILE
131+
--set common.image.tag="$DEPLOYMENT_TAG"
132+
--set common.containerPort="$APP_PORT"
133+
--set common.livenessProbe.httpGet.port="$APP_PORT"
134+
--set common.readinessProbe.httpGet.port="$APP_PORT"
135+
github-issue-sync helm/
113136
- helm secrets upgrade
114137
--install
115138
--atomic

helm/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ version: 0.1.0
66
appVersion: "1.16.0"
77
dependencies:
88
- name: common
9-
version: "0.1.1"
9+
version: "0.6.3"
1010
repository: "https://paritytech.github.io/helm-charts/"
1111

helm/values-stg.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,19 @@ common:
2424
kubernetes.io/ingress.class: traefik-external
2525
traefik.ingress.kubernetes.io/router.entrypoints: web,websecure
2626
traefik.ingress.kubernetes.io/router.tls: "true"
27-
hosts:
27+
28+
rules:
2829
- host: github-issue-sync.parity-stg.parity.io
29-
paths:
30-
- path: /
31-
pathType: ImplementationSpecific
30+
http:
31+
paths:
32+
- path: /
33+
pathType: ImplementationSpecific
34+
backend:
35+
service:
36+
name: github-issue-sync-common
37+
port:
38+
number: 80
39+
3240
tls:
3341
- secretName: github-issue-sync.parity-stg.parity.io
3442
hosts:

helm/values.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,16 @@ common:
33
# Declare variables to be passed into your templates.
44
fullnameOverride: "github-issue-sync"
55

6+
## Additional common labels on resources
7+
##
8+
extraLabels:
9+
team: opstooling
10+
611
replicaCount: 1
712

813
image:
914
repository: paritytech/github-issue-sync
10-
pullPolicy: IfNotPresent
15+
pullPolicy: Always
1116
# Overrides the image tag whose default is the chart appVersion.
1217
tag: "latest"
1318

@@ -28,7 +33,7 @@ common:
2833
# GREETING: "Warm greetings to"
2934
DB_USER: "github-issue-sync"
3035
DB_PASSWORD: ""
31-
DB_HOST: "cloudsql"
36+
DB_HOST: "github-issue-sync-common-cloudsql"
3237
DB_PORT: "5432"
3338
DB_NAME: "github-issue-sync"
3439
LOG_FORMAT: json
@@ -61,8 +66,10 @@ common:
6166

6267
service:
6368
type: ClusterIP
64-
port: 80
65-
containerPort: 3000
69+
ports:
70+
- name: web
71+
port: 80
72+
targetPort: 3000
6673

6774
# ingress:
6875
# enabled: true

0 commit comments

Comments
 (0)