Skip to content

Commit cd110f1

Browse files
author
Joshua Sierles
committed
Bump ulimit for operator
1 parent c439b88 commit cd110f1

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

build/postgres-operator/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,18 @@ LABEL name="Percona Postgres Operator" \
5050
description="Percona Postgres Operator simplifies and automates all essential actions for stable and continuous database operation during the whole database lifecycle" \
5151
maintainer="Percona Development <[email protected]>"
5252

53-
5453
COPY licenses /licenses
5554

5655
COPY --from=go_builder /usr/local/bin/postgres-operator /usr/local/bin
5756
COPY --from=go_builder /usr/local/bin/extension-installer /usr/local/bin
5857
COPY --from=go_builder /licenses /licenses
5958
COPY build/postgres-operator/install-extensions.sh /usr/local/bin
6059
COPY hack/tools/queries /opt/crunchy/conf
60+
COPY operator-wrapper.sh /usr/local/bin/operator-wrapper.sh
6161

62-
RUN chgrp -R 0 /opt/crunchy/conf && chmod -R g=u opt/crunchy/conf
62+
RUN chgrp -R 0 /opt/crunchy/conf && chmod -R g=u opt/crunchy/conf && \
63+
chmod +x /usr/local/bin/operator-wrapper.sh
6364

6465
USER 2
6566

66-
CMD ["postgres-operator"]
67+
ENTRYPOINT ["/usr/local/bin/operator-wrapper.sh"]

config/manager/manager.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ spec:
1111
containers:
1212
- name: operator
1313
image: postgres-operator
14+
command: ["/usr/local/bin/operator-wrapper.sh"]
1415
env:
1516
- name: PGO_NAMESPACE
1617
valueFrom:

operator-wrapper.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
# Set ulimit before starting the operator
4+
ulimit -n 1000000
5+
6+
# Start the operator
7+
exec /usr/local/bin/postgres-operator "$@"

0 commit comments

Comments
 (0)