File tree Expand file tree Collapse file tree 6 files changed +193
-62
lines changed
deployment/helm/charts/onyx Expand file tree Collapse file tree 6 files changed +193
-62
lines changed Original file line number Diff line number Diff line change
1
+ name : Build & Deploy Onyx Webserver
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - dev
7
+ paths :
8
+ - ' web/**'
9
+ - ' .github/workflows/onyx-pipeline-webserver.yaml'
10
+
11
+ env :
12
+ ACR_REPOSITORY : onyx-web-server
13
+ ACR_LOGIN_SERVER : ${{ secrets.ACR_LOGIN_SERVER }}
14
+ HELM_RELEASE : onyx
15
+ HELM_NAMESPACE : onyx
16
+
17
+ jobs :
18
+ build-and-push :
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - name : Checkout Code
22
+ uses : actions/checkout@v4
23
+
24
+ - name : Set IMAGE_TAG
25
+ run : echo "IMAGE_TAG=v1.${{ github.run_number }}" >> $GITHUB_ENV
26
+
27
+ - name : Log in to Azure Container Registry(ACR)
28
+ uses : docker/login-action@v3
29
+ with :
30
+ registry : ${{ secrets.ACR_LOGIN_SERVER }}
31
+ username : ${{ secrets.ACR_USERNAME }}
32
+ password : ${{ secrets.ACR_PASSWORD }}
33
+
34
+ - name : Build & Push Docker Image
35
+ run : |
36
+ docker build -t $ACR_LOGIN_SERVER/$ACR_REPOSITORY:$IMAGE_TAG -t $ACR_LOGIN_SERVER/$ACR_REPOSITORY:latest -f web/Dockerfile ./web
37
+ docker push $ACR_LOGIN_SERVER/$ACR_REPOSITORY:$IMAGE_TAG
38
+ docker push $ACR_LOGIN_SERVER/$ACR_REPOSITORY:latest
39
+
40
+ - name : Setup kubeconfig
41
+ run : |
42
+ echo "${{ secrets.KUBECONFIG }}" | base64 --decode > kubeconfig
43
+ chmod 600 kubeconfig
44
+
45
+ - name : Get pods
46
+ env :
47
+ KUBECONFIG : ${{ github.workspace }}/kubeconfig
48
+ run : kubectl get pods -n onyx
Original file line number Diff line number Diff line change 57
57
name : {{ .Values.config.envConfigMapName }}
58
58
env :
59
59
{{- include "onyx-stack.envSecrets" . | nindent 12}}
60
+ volumeMounts :
61
+ {{- range .Values.api.volumeMounts }}
62
+ - name : {{ .name }}
63
+ mountPath : {{ .mountPath }}
64
+ {{- if .readOnly }}
65
+ readOnly : {{ .readOnly }}
66
+ {{- end }}
67
+ {{- end }}
68
+ volumes :
69
+ {{- range .Values.api.volumes }}
70
+ - name : {{ .name }}
71
+ {{- if .persistentVolumeClaim }}
72
+ persistentVolumeClaim :
73
+ claimName : {{ .persistentVolumeClaim.claimName }}
74
+ {{- else if .secret }}
75
+ secret :
76
+ secretName : {{ .secret.secretName }}
77
+ optional : {{ .secret.optional | default false }}
78
+ {{- end }}
79
+ {{- end }}
80
+
81
+
82
+
Original file line number Diff line number Diff line change 9
9
scaleTargetRef :
10
10
apiVersion : apps/v1
11
11
kind : Deployment
12
- name : {{ include "onyx-stack.fullname" . }}
12
+ name : {{ include "onyx-stack.fullname" . }}-api-deployment
13
13
minReplicas : {{ .Values.api.autoscaling.minReplicas }}
14
14
maxReplicas : {{ .Values.api.autoscaling.maxReplicas }}
15
15
metrics :
30
30
averageUtilization : {{ .Values.api.autoscaling.targetMemoryUtilizationPercentage }}
31
31
{{- end }}
32
32
{{- end }}
33
+
34
+
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : PersistentVolumeClaim
3
+ metadata :
4
+ name : {{ .Values.api.pvc.name }}
5
+ namespace : {{ .Release.Namespace }}
6
+ labels :
7
+ {{- include "onyx-stack.labels" . | nindent 4 }}
8
+ spec :
9
+ accessModes :
10
+ {{- toYaml .Values.api.pvc.accessModes | nindent 4 }}
11
+ resources :
12
+ requests :
13
+ storage : {{ .Values.api.pvc.storage }}
14
+ {{- if .Values.persistent.storageClassName }}
15
+ storageClassName : {{ .Values.persistent.storageClassName }}
16
+ {{- end }}
Original file line number Diff line number Diff line change 9
9
scaleTargetRef :
10
10
apiVersion : apps/v1
11
11
kind : Deployment
12
- name : {{ include "onyx-stack.fullname" . }}
12
+ name : {{ include "onyx-stack.fullname" . }}-webserver
13
13
minReplicas : {{ .Values.webserver.autoscaling.minReplicas }}
14
14
maxReplicas : {{ .Values.webserver.autoscaling.maxReplicas }}
15
15
metrics :
You can’t perform that action at this time.
0 commit comments