Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion postgres-appliance/build_scripts/patroni_wale.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if [ "$DEMO" != "true" ]; then
find /usr/share/python-babel-localedata/locale-data -type f ! -name 'en_US*.dat' -delete

pip3 install filechunkio protobuf \
'git+https://github.com/zalando-pg/wal-e.git#egg=wal-e[aws,google,swift]' \
'git+https://github.com/zalando-pg/wal-e.git@ipv6-imds#egg=wal-e[aws,google,swift]' \
'git+https://github.com/zalando/pg_view.git@master#egg=pg-view'

# https://github.com/wal-e/wal-e/issues/318
Expand Down
2 changes: 1 addition & 1 deletion postgres-appliance/runit/patroni/run
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ then
fi

# Only small subset of environment variables is allowed. We don't want accidentally disclose sensitive information
for E in $(printenv -0 | tr '\n' ' ' | sed 's/\x00/\n/g' | grep -vE '^(KUBERNETES_(SERVICE|PORT|ROLE)[_=]|((POD_(IP|NAMESPACE))|HOSTNAME|PATH|PGHOME|LC_ALL|ENABLE_PG_MON)=)' | sed 's/=.*//g'); do
for E in $(printenv -0 | tr '\n' ' ' | sed 's/\x00/\n/g' | grep -vE '^((AWS_EC2_METADATA_SERVICE_ENDPOINT|KUBERNETES_(SERVICE|PORT|ROLE))[_=]|((POD_(IP|NAMESPACE))|HOSTNAME|PATH|PGHOME|LC_ALL|ENABLE_PG_MON)=)' | sed 's/=.*//g'); do
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jFYI: We inject two envars in IPv6 clusters to make the AWS SDKs do the right thing: https://github.com/zalando-incubator/kubernetes-on-aws/blob/f2a56bb4d26eb568541e2c64edfc63f8d5f166a0/cluster/manifests/02-admission-control/config.yaml#L49-L50

Not sure if AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE is needed here, though.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I see that it likely is not relevant based on your wal-e changes in the ipv6-imds branch 👍 )

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

our backup tool uses AWS SDK which uses ipv4 imds endpoint by default and fails when env is not there. so here we prevent env cleanup on the container run

Copy link
Copy Markdown
Member Author

@hughcapet hughcapet Apr 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(backup tool -- wal-g I mean, with wal-e (another backup tool), it unfortunately requires manual code intervention:) )
but both need this env, right

unset $E
done

Expand Down