Skip to content

Commit 6b5db04

Browse files
test: Let the Garage nginx sidecar run as an arbitrary UID (#1027)
1 parent ae4fa72 commit 6b5db04

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

‎tests/templates/kuttl/iceberg-hive/20_garage.yaml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ data:
3535
# Garage terminates no TLS on any endpoint, so nginx does it and forwards to
3636
# Garage on loopback. Mounted over /etc/nginx/nginx.conf, hence the full file.
3737
nginx.conf: |
38+
# OpenShift runs the container as an arbitrary UID, which may not write to
39+
# /run. This file replaces the one in the image, so it must be set here.
40+
pid /tmp/nginx.pid;
41+
3842
events {}
3943
http {
4044
server {
@@ -137,6 +141,11 @@ spec:
137141
subPath: nginx.conf
138142
- name: tls
139143
mountPath: /stackable/tls
144+
# nginx creates its temp dirs here on startup even though the proxy
145+
# buffering above is off, and the image owns /var/cache/nginx by the
146+
# image UID, not the arbitrary one OpenShift assigns.
147+
- name: nginx-cache
148+
mountPath: /var/cache/nginx
140149
resources:
141150
requests:
142151
cpu: 100m
@@ -147,6 +156,8 @@ spec:
147156
name: garage
148157
- name: data
149158
emptyDir: {}
159+
- name: nginx-cache
160+
emptyDir: {}
150161
- name: tls
151162
ephemeral:
152163
volumeClaimTemplate:

‎tests/templates/kuttl/iceberg-rest/20_garage.yaml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ data:
3131
# Garage terminates no TLS on any endpoint, so nginx does it and forwards to
3232
# Garage on loopback. Mounted over /etc/nginx/nginx.conf, hence the full file.
3333
nginx.conf: |
34+
# OpenShift runs the container as an arbitrary UID, which may not write to
35+
# /run. This file replaces the one in the image, so it must be set here.
36+
pid /tmp/nginx.pid;
37+
3438
events {}
3539
http {
3640
server {
@@ -133,6 +137,11 @@ spec:
133137
subPath: nginx.conf
134138
- name: tls
135139
mountPath: /stackable/tls
140+
# nginx creates its temp dirs here on startup even though the proxy
141+
# buffering above is off, and the image owns /var/cache/nginx by the
142+
# image UID, not the arbitrary one OpenShift assigns.
143+
- name: nginx-cache
144+
mountPath: /var/cache/nginx
136145
resources:
137146
requests:
138147
cpu: 100m
@@ -143,6 +152,8 @@ spec:
143152
name: garage
144153
- name: data
145154
emptyDir: {}
155+
- name: nginx-cache
156+
emptyDir: {}
146157
- name: tls
147158
ephemeral:
148159
volumeClaimTemplate:

0 commit comments

Comments
 (0)