Skip to content

Commit 0a0b6ce

Browse files
committed
add COSI
1 parent aadaa30 commit 0a0b6ce

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

traefik.d/pc-other.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# GET url
2+
{{ $GETendpoints := list
3+
4+
}}
5+
6+
# POST url
7+
{{ $POSTendpoints := list
8+
"/oss/iam_proxy/buckets_access_keys"
9+
}}
10+
11+
# PUT url
12+
{{ $PUTendpoints := list
13+
14+
}}
15+
16+
# PATCH url
17+
{{ $PATCHendpoints := list
18+
19+
}}
20+
21+
# DELETE url
22+
{{ $DELETEendpoints := list
23+
"/oss/iam_proxy/users/"
24+
}}
25+
26+
{{define "route"}}
27+
{{ .Prefix | replace "/" "." | replace "_" "#" }}-{{ .Method | lower }}:
28+
entryPoints:
29+
- "proxy"
30+
rule: "Host(`{{ default "FQDN_not_configured" (env "FQDN") }}`) && PathPrefix(`{{.Prefix}}`) && Method(`{{.Method}}`)"
31+
service: nutanix-pc
32+
tls: {}
33+
{{end}}
34+
35+
http:
36+
routers:
37+
{{range $prefix := $GETendpoints}}
38+
{{ template "route" dict "Prefix" $prefix "Method" "GET"}}
39+
{{end}}
40+
{{range $prefix := $POSTendpoints}}
41+
{{ template "route" dict "Prefix" $prefix "Method" "POST"}}
42+
{{end}}
43+
{{range $prefix := $PUTendpoints}}
44+
{{ template "route" dict "Prefix" $prefix "Method" "PUT"}}
45+
{{end}}
46+
{{range $prefix := $PATCHendpoints}}
47+
{{ template "route" dict "Prefix" $prefix "Method" "PATCH"}}
48+
{{end}}
49+
{{range $prefix := $DELETEendpoints}}
50+
{{ template "route" dict "Prefix" $prefix "Method" "DELETE"}}
51+
{{end}}

0 commit comments

Comments
 (0)