From 3059062213b74033f0d768f4595439d377f1bc7f Mon Sep 17 00:00:00 2001 From: frostyfan109 Date: Fri, 9 Aug 2024 17:59:13 -0400 Subject: [PATCH 1/6] Add workers value to pass to uvicorn --- templates/deployment.yaml | 2 ++ values.yaml | 1 + 2 files changed, 3 insertions(+) diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 8bc4175..f429e6b 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -37,6 +37,8 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + command: ["python"] + args: ["start.py", "--workers", "{{ .Values.config.data.NUM_WORKERS }}"] ports: - name: http containerPort: {{ .Values.service.port }} diff --git a/values.yaml b/values.yaml index 1a1486a..f11f974 100644 --- a/values.yaml +++ b/values.yaml @@ -96,6 +96,7 @@ config: LDAP_PORT: "636" LDAP_SERVICE_ACCOUNT_BIND_DN: "cn=unc:app:renci:eduhelx,ou=Applications,dc=unc,dc=edu" LDAP_TIMEOUT_SECONDS: "5" + NUM_WORKERS: "4" secretData: # -- # E.g. run `secrets.token_urlsafe(64)` in a Python 3 shell to generate this value. # The JWT secret key is a private key used to sign/verify that a JWT is issued by the server. From bb4549538c8a29bf8d2b9f77cc75cf9b0aa5ed7b Mon Sep 17 00:00:00 2001 From: frostyfan109 Date: Fri, 9 Aug 2024 18:03:49 -0400 Subject: [PATCH 2/6] Add GITEA_ASSIST_AUTH_TOKEN value to secretData config --- values.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/values.yaml b/values.yaml index f11f974..e2e98a5 100644 --- a/values.yaml +++ b/values.yaml @@ -101,6 +101,9 @@ config: # -- # E.g. run `secrets.token_urlsafe(64)` in a Python 3 shell to generate this value. # The JWT secret key is a private key used to sign/verify that a JWT is issued by the server. JWT_SECRET_KEY: "" + # The bearer token used to authenticate with Gitea Assist. The value is encoded in Gitea Assist's + # credential secret (`config.secrets.creds` in the gitea-assist chart values) + GITEA_ASSIST_AUTH_TOKEN: "" # -- The account password for the LDAP service LDAP_SERVICE_ACCOUNT_PASSWORD: "" From 2249fade48a0b8f7e9255d6b5a9d1f9868aa3711 Mon Sep 17 00:00:00 2001 From: Hoid Date: Wed, 21 Aug 2024 13:46:45 -0400 Subject: [PATCH 3/6] Add initialDelaySeconds to liveness and readiness probes --- Chart.yaml | 2 +- templates/deployment.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Chart.yaml b/Chart.yaml index 1d70878..7bdc93b 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -21,7 +21,7 @@ version: 1.0.3 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.0.0" +appVersion: "1.0.1" dependencies: - name: postgresql diff --git a/templates/deployment.yaml b/templates/deployment.yaml index f429e6b..a7749a0 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -47,10 +47,12 @@ spec: httpGet: path: /docs port: 8000 + initialDelaySeconds: 120 readinessProbe: httpGet: path: /docs port: 8000 + initialDelaySeconds: 120 resources: {{- toYaml .Values.resources | nindent 12 }} envFrom: From 398982491f9752f213a801f20253360f175f5f7b Mon Sep 17 00:00:00 2001 From: Hoid Date: Wed, 21 Aug 2024 14:40:22 -0400 Subject: [PATCH 4/6] Reduce initialDelaySeconds to 60 --- templates/deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/deployment.yaml b/templates/deployment.yaml index a7749a0..663216a 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -47,12 +47,12 @@ spec: httpGet: path: /docs port: 8000 - initialDelaySeconds: 120 + initialDelaySeconds: 60 readinessProbe: httpGet: path: /docs port: 8000 - initialDelaySeconds: 120 + initialDelaySeconds: 60 resources: {{- toYaml .Values.resources | nindent 12 }} envFrom: From 4e02285555896ca2623b8c6615487f2613f6e693 Mon Sep 17 00:00:00 2001 From: Hoid Date: Mon, 4 Nov 2024 08:44:07 -0500 Subject: [PATCH 5/6] Initial commit --- templates/deployment.yaml | 10 ++++++---- values.yaml | 7 +++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 663216a..340cb95 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -45,14 +45,16 @@ spec: protocol: TCP livenessProbe: httpGet: - path: /docs + path: /api/v1/health/live port: 8000 - initialDelaySeconds: 60 + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} readinessProbe: httpGet: - path: /docs + path: /api/v1/health/ready port: 8000 - initialDelaySeconds: 60 + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.readinessProbe.periodSeconds }} resources: {{- toYaml .Values.resources | nindent 12 }} envFrom: diff --git a/values.yaml b/values.yaml index e2e98a5..2210962 100644 --- a/values.yaml +++ b/values.yaml @@ -107,6 +107,13 @@ config: # -- The account password for the LDAP service LDAP_SERVICE_ACCOUNT_PASSWORD: "" +livenessProbe: + initialDelaySeconds: 30 + periodSeconds: 30 +readinessProbe: + initialDelaySeconds: 30 + periodSeconds: 10 + postgresql: enabled: true auth: From 2f72c0189866d687ac731c1372abca6d44c8b6b1 Mon Sep 17 00:00:00 2001 From: Hoid Date: Mon, 11 Nov 2024 10:26:13 -0500 Subject: [PATCH 6/6] Increment chart version --- Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chart.yaml b/Chart.yaml index 7bdc93b..1e43a45 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.0.3 +version: 1.0.4 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to