Skip to content

Commit

Permalink
nginx and GCP compatible ingress controller (#142)
Browse files Browse the repository at this point in the history
* gcp and nginx compatible ingress controller

* blank space fixes

* default to prefix if not CLB
  • Loading branch information
fuziontech authored Oct 1, 2021
1 parent 3b11f25 commit c36d7ec
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions charts/posthog/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,13 @@ spec:
- http:
{{- end }}
paths:
{{- if (ne (include "ingress.type" .) "clb") }}
- pathType: Prefix
path: "/"
{{- else }}
- pathType: ImplementationSpecific
path: "/*"
{{- end }}
backend:
{{- if semverCompare ">=1.19.0" .Capabilities.KubeVersion.Version }}
service:
Expand All @@ -68,8 +73,13 @@ spec:
serviceName: {{ template "posthog.fullname" . }}-web
servicePort: {{ .Values.service.externalPort }}
{{- end }}
{{- if (ne (include "ingress.type" .) "clb") }}
- pathType: Prefix
path: "/batch"
{{- else }}
- pathType: ImplementationSpecific
path: "/batch/*"
{{- end }}
backend: &INGESTION
{{- if semverCompare ">=1.19.0" .Capabilities.KubeVersion.Version }}
service:
Expand All @@ -80,6 +90,23 @@ spec:
serviceName: {{ template "posthog.fullname" . }}-events
servicePort: {{ .Values.service.externalPort }}
{{- end }}
{{- if (ne (include "ingress.type" .) "clb") }}
- pathType: Prefix
path: "/capture"
backend: *INGESTION
- pathType: Prefix
path: "/decide"
backend: *INGESTION
- pathType: Prefix
path: "/e"
backend: *INGESTION
- pathType: Prefix
path: "/track"
backend: *INGESTION
- pathType: Prefix
path: "/s"
backend: *INGESTION
{{- else }}
- pathType: ImplementationSpecific
path: "/capture/*"
backend: *INGESTION
Expand All @@ -95,6 +122,7 @@ spec:
- pathType: ImplementationSpecific
path: "/s/*"
backend: *INGESTION
{{- end }}
{{- if .Values.ingress.tls }}
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end -}}
Expand Down

0 comments on commit c36d7ec

Please sign in to comment.