You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "duhow (via GitHub)" <gi...@apache.org> on 2024/02/15 12:34:10 UTC

[PR] feat: add authorization to health probes [incubator-devlake-helm-chart]

duhow opened a new pull request, #249:
URL: https://github.com/apache/incubator-devlake-helm-chart/pull/249

   If setting `.ui.basicAuth.enabled: true`, `ui.readinessProbe` and `ui.livenessProbe` fail because the `httpGet` probe replies with `HTTP 401`.
   
   If no `httpHeaders` are added manually in values (to add `Authorization` header), define them based on the `basicAuth.user` and `basicAuth.password` value.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add authorization to health probes [incubator-devlake-helm-chart]

Posted by "ZhangNing10 (via GitHub)" <gi...@apache.org>.
ZhangNing10 merged PR #249:
URL: https://github.com/apache/incubator-devlake-helm-chart/pull/249


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add authorization to health probes [incubator-devlake-helm-chart]

Posted by "ZhangNing10 (via GitHub)" <gi...@apache.org>.
ZhangNing10 commented on code in PR #249:
URL: https://github.com/apache/incubator-devlake-helm-chart/pull/249#discussion_r1493732264


##########
charts/devlake/templates/deployments.yaml:
##########
@@ -56,12 +56,19 @@ spec:
           imagePullPolicy: {{ .Values.ui.image.pullPolicy }}
           ports:
             - containerPort: 4000
+          {{- $httpAuthProbe := (include "devlake.ui.auth.probe" $ | fromYaml | list) }}
           {{- with .Values.ui.livenessProbe }}
           livenessProbe:
+            {{- if not (hasKey .httpGet "httpHeaders") }}
+              {{- $_ := set .httpGet "httpHeaders" ($httpAuthProbe) }}
+            {{- end }}

Review Comment:
   action failed, need to add if condition of basic enabled or not
   ![image](https://github.com/apache/incubator-devlake-helm-chart/assets/135692613/ffce6ce8-cb2a-4d73-8c22-9afa95f79a14)
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add authorization to health probes [incubator-devlake-helm-chart]

Posted by "JoshuaPoddoku (via GitHub)" <gi...@apache.org>.
JoshuaPoddoku commented on PR #249:
URL: https://github.com/apache/incubator-devlake-helm-chart/pull/249#issuecomment-2034312697

   Hi @duhow,
   
   Thank you for your contribution! I'm Joshua Poddoku, a committer at Apache DevLake. We'd love for you to join our Slack community or DM me incase you've joined already: https://join.slack.com/t/devlake-io/shared_invite/zt-18uayb6ut-cHOjiYcBwERQ8VVPZ9cQQw. Could you please share your full name there? We want to recognize your efforts with a certificate of contribution.
   
   Best,
   Joshua 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add authorization to health probes [incubator-devlake-helm-chart]

Posted by "ZhangNing10 (via GitHub)" <gi...@apache.org>.
ZhangNing10 commented on code in PR #249:
URL: https://github.com/apache/incubator-devlake-helm-chart/pull/249#discussion_r1493732309


##########
charts/devlake/templates/deployments.yaml:
##########
@@ -56,12 +56,19 @@ spec:
           imagePullPolicy: {{ .Values.ui.image.pullPolicy }}
           ports:
             - containerPort: 4000
+          {{- $httpAuthProbe := (include "devlake.ui.auth.probe" $ | fromYaml | list) }}
           {{- with .Values.ui.livenessProbe }}
           livenessProbe:
+            {{- if not (hasKey .httpGet "httpHeaders") }}
+              {{- $_ := set .httpGet "httpHeaders" ($httpAuthProbe) }}
+            {{- end }}
             {{- toYaml . | nindent 12 }}
           {{- end }}
           {{- with .Values.ui.readinessProbe }}
           readinessProbe:
+            {{- if not (hasKey .httpGet "httpHeaders") }}
+              {{- $_ := set .httpGet "httpHeaders" ($httpAuthProbe) }}
+            {{- end }}

Review Comment:
   action failed, need to add if condition of basic enabled or not
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org