Skip to content

Commit de8e2c8

Browse files
committed
Adding traefik sticky annotations to services
ref: FORGEOPS-6765
1 parent 3ab9b21 commit de8e2c8

14 files changed

Lines changed: 62 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,19 @@ The `amster`, `ds-set-passwords`, and `keystore-create` Kubernetes job names in
5757
`identity-platform` Helm chart now include the Helm release revision as a suffix
5858
(e.g. `amster-3`, `ds-set-passwords-3`, `keystore-create-3`). This ensures each
5959
`helm upgrade` produces a distinct job name, preventing failures caused by Kubernetes'
60-
immutability constraint on existing jobs.
60+
immutability constraint on existing jobs.
61+
62+
### Adding annotations for Traefik sticky sessions
63+
64+
The `forgeops prereqs` command installs Traefik in Nginx compatibility mode.
65+
This was done to make it a more seamless transition from the old and
66+
unmaintained Nginx ingress. However, some users are installing Traefik manually
67+
and running into issues with sticky sessions not working. The traefik specific
68+
annotations for sticky sessions has been added.
69+
70+
## How-tos
71+
72+
The `custom-secrets.md` how-to has been modified to remove references to
73+
migrating to secret-generator. The references regarding migrating from
74+
secret-generator have been left in for any users that made the switch already.
75+

charts/identity-platform/templates/admin-ui-service.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ apiVersion: v1
33
kind: Service
44
metadata:
55
name: admin-ui
6+
annotations:
7+
{{- with .Values.platform.service.annotations }}
8+
{{- toYaml . | nindent 4 }}
9+
{{- end }}
610
labels:
711
{{- include "identity-platform.labels" . | nindent 4 }}
812
{{- with .Values.admin_ui.podLabels }}

charts/identity-platform/templates/am-service.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ apiVersion: v1
33
kind: Service
44
metadata:
55
name: am
6+
annotations:
7+
{{- with .Values.platform.service.annotations }}
8+
{{- toYaml . | nindent 4 }}
9+
{{- end }}
610
labels:
711
{{- include "identity-platform.labels" . | nindent 4 }}
812
{{- with .Values.am.podLabels }}

charts/identity-platform/templates/end-user-ui-service.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ apiVersion: v1
33
kind: Service
44
metadata:
55
name: end-user-ui
6+
annotations:
7+
{{- with .Values.platform.service.annotations }}
8+
{{- toYaml . | nindent 4 }}
9+
{{- end }}
610
labels:
711
{{- include "identity-platform.labels" . | nindent 4 }}
812
{{- with .Values.end_user_ui.podLabels }}

charts/identity-platform/templates/idm-service.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ apiVersion: v1
33
kind: Service
44
metadata:
55
name: idm
6+
annotations:
7+
{{- with .Values.platform.service.annotations }}
8+
{{- toYaml . | nindent 4 }}
9+
{{- end }}
610
labels:
711
{{- include "identity-platform.labels" . | nindent 4 }}
812
{{- with .Values.idm.podLabels }}

charts/identity-platform/templates/login-ui-service.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ apiVersion: v1
33
kind: Service
44
metadata:
55
name: login-ui
6+
annotations:
7+
{{- with .Values.platform.service.annotations }}
8+
{{- toYaml . | nindent 4 }}
9+
{{- end }}
610
labels:
711
{{- include "identity-platform.labels" . | nindent 4 }}
812
{{- with .Values.login_ui.podLabels }}

charts/identity-platform/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ platform:
8383
# crt: # base64 encoded string (Ex: base64 -w 0 <domain-file>.pem)
8484
# key: # base64 encoded string (Ex: base64 -w 0 <domain-file>.key)
8585

86+
service:
87+
annotations:
88+
traefik.ingress.kubernetes.io/service.sticky.cookie: "true"
89+
traefik.ingress.kubernetes.io/service.sticky.cookie.name: "route"
90+
8691
notes:
8792
enabled: true
8893
storage:

kustomize/base/admin-ui/admin-ui-service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ apiVersion: v1
44
kind: Service
55
metadata:
66
name: admin-ui
7+
annotations:
8+
traefik.ingress.kubernetes.io/service.sticky.cookie: "true"
9+
traefik.ingress.kubernetes.io/service.sticky.cookie.name: "route"
710
labels:
811
helm.sh/chart: identity-platform-1.0.0
912
app.kubernetes.io/name: identity-platform

kustomize/base/am/secret-agent/am-service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ apiVersion: v1
44
kind: Service
55
metadata:
66
name: am
7+
annotations:
8+
traefik.ingress.kubernetes.io/service.sticky.cookie: "true"
9+
traefik.ingress.kubernetes.io/service.sticky.cookie.name: "route"
710
labels:
811
helm.sh/chart: identity-platform-1.0.0
912
app.kubernetes.io/name: identity-platform

kustomize/base/am/secret-generator/am-service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ apiVersion: v1
44
kind: Service
55
metadata:
66
name: am
7+
annotations:
8+
traefik.ingress.kubernetes.io/service.sticky.cookie: "true"
9+
traefik.ingress.kubernetes.io/service.sticky.cookie.name: "route"
710
labels:
811
helm.sh/chart: identity-platform-1.0.0
912
app.kubernetes.io/name: identity-platform

0 commit comments

Comments
 (0)