Skip to content

Commit c50a3fe

Browse files
committed
Adds Env Vars for PGAdmin Kerberos Support
1 parent c09468c commit c50a3fe

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

internal/controller/standalone_pgadmin/pod.go

+13
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,19 @@ func pod(
118118
Name: "PGADMIN_LISTEN_PORT",
119119
Value: fmt.Sprintf("%d", pgAdminPort),
120120
},
121+
// Setting the KRB5_CONFIG for kerberos
122+
// - https://web.mit.edu/kerberos/krb5-current/doc/admin/conf_files/krb5_conf.html
123+
{
124+
Name: "KRB5_CONFIG",
125+
Value: configMountPath + "/krb5.conf",
126+
},
127+
// In testing it was determined that we need to set this env var for the replay cache
128+
// otherwise it defaults to the read-only location `/var/tmp/`
129+
// - https://web.mit.edu/kerberos/krb5-current/doc/basic/rcache_def.html#replay-cache-types
130+
{
131+
Name: "KRB5RCACHEDIR",
132+
Value: "/tmp",
133+
},
121134
},
122135
VolumeMounts: []corev1.VolumeMount{
123136
{

internal/controller/standalone_pgadmin/pod_test.go

+8
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ containers:
9696
9797
- name: PGADMIN_LISTEN_PORT
9898
value: "5050"
99+
- name: KRB5_CONFIG
100+
value: /etc/pgadmin/conf.d/krb5.conf
101+
- name: KRB5RCACHEDIR
102+
value: /tmp
99103
name: pgadmin
100104
ports:
101105
- containerPort: 5050
@@ -279,6 +283,10 @@ containers:
279283
280284
- name: PGADMIN_LISTEN_PORT
281285
value: "5050"
286+
- name: KRB5_CONFIG
287+
value: /etc/pgadmin/conf.d/krb5.conf
288+
- name: KRB5RCACHEDIR
289+
value: /tmp
282290
image: new-image
283291
imagePullPolicy: Always
284292
name: pgadmin

0 commit comments

Comments
 (0)