Skip to content

Commit

Permalink
Update ingress.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
etaques authored Feb 1, 2024
1 parent 940fd73 commit c77a076
Showing 1 changed file with 30 additions and 4 deletions.
34 changes: 30 additions & 4 deletions charts/orb/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,20 @@ spec:
stripPrefix:
prefixes:
- /api/v1
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: orb-sinks-stripprefix
namespace: {{ .Release.Namespace }}
spec:
stripPrefix:
prefixes:
- /api/v1/features
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
annotations:
traefik.ingress.kubernetes.io/router.middlewares: orb-stripprefix@kubernetescrd
{{- if .Values.ingress.annotationsTraefik }}
{{ toYaml .Values.ingress.annotationsTraefik | indent 4 }}
{{- end }}
Expand All @@ -158,41 +165,57 @@ spec:
services:
- name: {{ .Release.Name }}-users
port: {{ .Values.users.httpPort }}
middlewares:
- name: orb-stripprefix
- match: Host(`{{ .Values.ingress.hostname }}`) && PathPrefix(`/password`)
kind: Rule
services:
- name: {{ .Release.Name }}-users
port: {{ .Values.users.httpPort }}
middlewares:
- name: orb-stripprefix
- match: Host(`{{ .Values.ingress.hostname }}`) && PathPrefix(`/tokens`)
kind: Rule
services:
- name: {{ .Release.Name }}-users
port: {{ .Values.users.httpPort }}
middlewares:
- name: orb-stripprefix
- match: Host(`{{ .Values.ingress.hostname }}`) && PathPrefix(`/keys`)
kind: Rule
services:
- name: {{ .Release.Name }}-auth
port: {{ default .Values.auth.httpPort }}
middlewares:
- name: orb-stripprefix
- match: Host(`{{ .Values.ingress.hostname }}`) && PathPrefix(`/agents`)
kind: Rule
services:
- name: {{ .Release.Name }}-fleet
port: {{ default .Values.fleet.httpPort }}
middlewares:
- name: orb-stripprefix
- match: Host(`{{ .Values.ingress.hostname }}`) && PathPrefix(`/agent_groups`)
kind: Rule
services:
- name: {{ .Release.Name }}-fleet
port: {{ default .Values.fleet.httpPort }}
middlewares:
- name: orb-stripprefix
- match: Host(`{{ .Values.ingress.hostname }}`) && PathPrefix(`/sinks`)
kind: Rule
services:
- name: {{ .Release.Name }}-sinks
port: {{ default .Values.sinks.httpPort }}
middlewares:
- name: orb-stripprefix
- match: Host(`{{ .Values.ingress.hostname }}`) && PathPrefix(`/policies`)
kind: Rule
services:
- name: {{ .Release.Name }}-policies
port: {{ default .Values.policies.httpPort }}
middlewares:
- name: orb-stripprefix
tls:
secretName: {{ .Values.ingress.secret }}
---
Expand All @@ -210,12 +233,12 @@ spec:
- web
- websecure
routes:
- match: Host(`{{ .Values.ingress.hostname }}`) && PathPrefix(`/version`)
- match: Host(`{{ .Values.ingress.hostname }}`) && Path(`/version`)
kind: Rule
services:
- name: {{ .Release.Name }}-fleet
port: {{ .Values.fleet.httpPort }}
- match: Host(`{{ required "an ingress.hostname is required!" .Values.ingress.hostname }}`) && PathPrefix(`/`)
- match: Host(`{{ required "an ingress.hostname is required!" .Values.ingress.hostname }}`) && Path(`/`)
kind: Rule
services:
- name: {{ .Release.Name }}-ui
Expand All @@ -227,7 +250,6 @@ apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
annotations:
traefik.ingress.kubernetes.io/router.middlewares: orb-stripprefix@kubernetescrd
{{- if .Values.ingress.annotationsTraefik }}
{{ toYaml .Values.ingress.annotationsTraefik | indent 4 }}
{{- end }}
Expand All @@ -243,11 +265,15 @@ spec:
services:
- name: {{ .Release.Name }}-sinks
port: {{ default .Values.sinks.httpPort }}
middlewares:
- name: orb-sinks-stripprefix
- match: Host(`{{ .Values.ingress.hostname }}`) && PathPrefix(`/authenticationtypes`)
kind: Rule
services:
- name: {{ .Release.Name }}-sinks
port: {{ default .Values.sinks.httpPort }}
middlewares:
- name: orb-sinks-stripprefix
tls:
secretName: {{ .Values.ingress.secret }}
{{- end }}

0 comments on commit c77a076

Please sign in to comment.