Skip to content

Commit 4059954

Browse files
corangmjnagel
andauthored
feat: add networkpolicy option for keycloak smtp (defenseunicorns#429)
## Description ... ## Related Issue Fixes # <!-- or --> Relates to # ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [ ] Test, docs, adr added or updated as needed - [ ] [Contributor Guide Steps](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md)(https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md#submitting-a-pull-request) followed --------- Co-authored-by: Micah Nagel <[email protected]>
1 parent 9badf9d commit 4059954

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/keycloak/chart/templates/uds-package.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ spec:
4343
- 80
4444
remoteGenerate: Anywhere
4545

46+
{{- if .Values.smtp.enabled }}
47+
- description: "SMTP access"
48+
direction: Egress
49+
selector:
50+
app.kubernetes.io/name: keycloak
51+
port: {{ .Values.smtp.port }}
52+
remoteGenerate: Anywhere
53+
{{- end }}
54+
4655
{{- if not .Values.devMode }}
4756
- description: "PostgresQL Database access"
4857
direction: Egress

src/keycloak/chart/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ clusterDomain: cluster.local
4949
# Sets development mode for Keycloak. This disables caching, Postgres and HPAs and should only be used for testing
5050
devMode: true
5151

52+
# Enable SMTP networkPolicy and config
53+
smtp:
54+
enabled: false
55+
port: 587
56+
5257
# Configure FIPS mode for Keycloak
5358
fips: false
5459

0 commit comments

Comments
 (0)