Skip to content

Commit

Permalink
Merge pull request #1941 from GiganticMinecraft/add-argo-workflows-re…
Browse files Browse the repository at this point in the history
…verse-proxy

argo-workflows用のリバースプロキシを定義する
  • Loading branch information
outductor authored May 6, 2024
2 parents 6f49180 + fee9086 commit 23870f4
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ spec:
external-hostname: wiki.onp-k8s.admin.seichi.click
internal-authority: "growi.growi-system:3000"

# Argo Workflows に対する POST リクエストのみを受け付けるためのリバースプロキシ。
- name: argo-workflows-reverse-proxy
external-hostname: argo-workflows-webhook.onp-k8s.admin.seichi.click
internal-authority: "argo-workflows-reverse-proxy.argocd:80"

template:
metadata:
name: "cloudflared-tunnel-http-exit--{{name}}"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 外部から Argo Workflows を発火するためには Cloudflared を使えば機能的には問題がないが、
# 任意のクライアントから GET を受け付けると面倒なので、POST だけに限定するためのリバースプロキシを挟む。
apiVersion: v1
kind: Deployment
metadata:
name: argo-workflows-reverse-proxy
namespace: argocd
spec:
containers:
- name: nginx
image: nginx:1.26.0
volumeMounts:
- name: conf
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
volumes:
- name: conf
configMap:
name: argo-workflows-reverse-proxy-config-map
---
apiVersion: v1
kind: ConfigMap
metadata:
name: argo-workflows-reverse-proxy-config-map
namespace: argocd
data:
nginx.conf: |
http {
server {
listen 80;
server_name argo-workflows-webhook.onp-k8s.admin.seichi.click;
location / {
if ($request_method !~ ^(POST)$ ) {
return 405;
}
proxy_pass http://argo-workflows-server.argo:2746;
}
}
}

0 comments on commit 23870f4

Please sign in to comment.