Skip to content

Commit 593f698

Browse files
authored
Merge branch 'master' into add-citus-support
2 parents 15a056a + bb39d81 commit 593f698

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ Spilo is currently evolving: Its creators are working on a Postgres operator tha
1414
How to Use This Docker Image
1515
============================
1616

17+
.. important::
18+
We encourage users to build the Docker images themselves from source code using the latest tags to benefit from ongoing improvements and fixes. The team continues to maintain the project and address issues, but does not make regular releases nor publishes latest Docker images.
19+
1720
Spilo's setup assumes that you've correctly configured a load balancer (HAProxy, ELB, Google load balancer) that directs client connections to the master. There are two ways to achieve this: A) if the load balancer relies on the status code to distinguish between the healthy and failed nodes (like ELB), then one needs to configure it to poll the API URL; otherwise, B) you can use callback scripts to change the load balancer configuration dynamically.
1821

1922
**Available container registry and image architectures**

postgres-appliance/build_scripts/base.sh

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,15 @@ for version in $DEB_PG_SUPPORTED_VERSIONS; do
121121
"postgresql-${version}-pg-stat-kcache" \
122122
"${EXTRAS[@]}"
123123

124-
# Clean up timescaledb versions except the highest compatible and transition version
124+
# Clean up timescaledb versions except the last 5 minor versions
125125
exclude_patterns=()
126-
prev_highest_ver="$ts_highest_ver"
127-
ts_highest_ver=$(find "/usr/lib/postgresql/$version/lib/" -name 'timescaledb-2.*.so' | sed -rn 's/.*timescaledb-([1-9]+\.[0-9]+\.[0-9]+)\.so$/\1/p' | sort -rV | head -n1)
128-
if [ "$prev_highest_ver" != "$ts_highest_ver" ]; then
129-
ts_transition_version="$prev_highest_ver"
130-
fi
131-
for ts_version in "$ts_transition_version" "$ts_highest_ver"; do
132-
exclude_patterns+=(! -name timescaledb-"${ts_version}".so)
133-
exclude_patterns+=(! -name timescaledb-tsl-"${ts_version}".so)
126+
versions=$(find "/usr/lib/postgresql/$version/lib/" -name 'timescaledb-2.*.so' | sed -rn 's/.*timescaledb-([1-9]+\.[0-9]+\.[0-9]+)\.so$/\1/p' | sort -rV)
127+
latest_minor_versions=$(echo "$versions" | awk -F. '{print $1"."$2}' | uniq | head -n 5)
128+
for minor in $latest_minor_versions; do
129+
for full_version in $(echo "$versions" | grep "^$minor"); do
130+
exclude_patterns+=(! -name timescaledb-"${full_version}".so)
131+
exclude_patterns+=(! -name timescaledb-tsl-"${full_version}".so)
132+
done
134133
done
135134
find "/usr/lib/postgresql/$version/lib/" \( -name 'timescaledb-2.*.so' -o -name 'timescaledb-tsl-2.*.so' \) "${exclude_patterns[@]}" -delete
136135

postgres-appliance/scripts/callback_aws.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
import boto.ec2
44
import boto.utils
55
import logging
6+
import os
67
import sys
78
import time
89

910
logger = logging.getLogger(__name__)
11+
LEADER_TAG_VALUE = os.environ.get('AWS_LEADER_TAG_VALUE', 'master')
1012

1113

1214
def retry(func):
@@ -70,7 +72,7 @@ def main():
7072

7173
instance = get_instance(ec2, instance_id)
7274

73-
tags = {'Role': role}
75+
tags = {'Role': LEADER_TAG_VALUE if role == 'primary' else role}
7476
tag_resource(ec2, instance_id, tags)
7577

7678
tags.update({'Instance': instance_id})

postgres-appliance/scripts/configure_spilo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ def get_placeholders(provider):
577577
placeholders.setdefault('PAM_OAUTH2', '')
578578
placeholders.setdefault('CALLBACK_SCRIPT', '')
579579
placeholders.setdefault('DCS_ENABLE_KUBERNETES_API', '')
580+
placeholders.setdefault('AWS_LEADER_TAG_VALUE', 'master')
580581
placeholders.setdefault('KUBERNETES_ROLE_LABEL', 'spilo-role')
581582
placeholders.setdefault('KUBERNETES_LEADER_LABEL_VALUE', 'master')
582583
placeholders.setdefault('KUBERNETES_STANDBY_LEADER_LABEL_VALUE', 'master')

0 commit comments

Comments
 (0)