Skip to content

Commit 1d083c6

Browse files
authored
change router naming convention (#49)
1 parent 1f1cfcb commit 1d083c6

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

traefik.d/pc-v1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}}
1717

1818
{{define "route"}}
19-
{{ .Method | lower }}-{{ .Prefix | replace "/PrismGateway/services/rest/" "" | replace "/" "-" }}:
19+
{{ .Prefix | trimPrefix "/PrismGateway/services/rest/" | replace "/" "." | replace "_" "#" }}-{{ .Method | lower }}:
2020
entryPoints:
2121
- "proxy"
2222
rule: "Host(`{{ default "FQDN_not_configured" (env "FQDN") }}`) && PathPrefix(`{{.Prefix}}`) && Method(`{{.Method}}`)"

traefik.d/pc-v2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}}
1717

1818
{{define "route"}}
19-
{{ .Method | lower }}-{{ .Prefix | replace "/api/nutanix/" "" | replace "/" "-" }}:
19+
{{ .Prefix | trimPrefix "/api/nutanix/" | replace "/" "." | replace "_" "#" }}-{{ .Method | lower }}:
2020
entryPoints:
2121
- "proxy"
2222
rule: "Host(`{{ default "FQDN_not_configured" (env "FQDN") }}`) && PathPrefix(`{{.Prefix}}`) && Method(`{{.Method}}`)"

traefik.d/pc-v3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
}}
4444

4545
{{define "route"}}
46-
{{ .Method | lower }}-{{ .Prefix | replace "/api/nutanix/" "" | replace "/" "-" }}:
46+
{{ .Prefix | trimPrefix "/api/nutanix/" | replace "/" "." | replace "_" "#" }}-{{ .Method | lower }}:
4747
entryPoints:
4848
- "proxy"
4949
rule: "Host(`{{ default "FQDN_not_configured" (env "FQDN") }}`) && PathPrefix(`{{.Prefix}}`) && Method(`{{.Method}}`)"

traefik.d/pc-v4.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
}}
4747

4848
{{define "route"}}
49-
{{ .Method | lower }}-{{ .Prefix | replace "/api/" "" | replace "/" "-" }}::
49+
{{ .Prefix | trimPrefix "/api/" | replace "/" "." | replace "_" "#" }}-{{ .Method | lower }}:
5050
entryPoints:
5151
- "proxy"
5252
rule: "Host(`{{ default "FQDN_not_configured" (env "FQDN") }}`) && PathPrefix(`{{.Prefix}}`) && Method(`{{.Method}}`)"

0 commit comments

Comments
 (0)