diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 13566b8..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Editor-based HTTP Client requests
-/httpRequests/
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 28b4fe5..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/postgres-docker.iml b/.idea/postgres-docker.iml
deleted file mode 100644
index 5e764c4..0000000
--- a/.idea/postgres-docker.iml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 35eb1dd..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
deleted file mode 100644
index 46825c4..0000000
--- a/.idea/workspace.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {
- "associatedIndex": 8
-}
-
-
-
-
-
- {
- "keyToString": {
- "RunOnceActivity.OpenProjectViewOnStart": "true",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "RunOnceActivity.go.formatter.settings.were.checked": "true",
- "RunOnceActivity.go.migrated.go.modules.settings": "true",
- "RunOnceActivity.go.modules.go.list.on.any.changes.was.set": "true",
- "go.import.settings.migrated": "true",
- "go.sdk.automatically.set": "true",
- "last_opened_file_path": "/home/user/go/src/kubedb.dev/postgres-docker",
- "node.js.detected.package.eslint": "true",
- "node.js.selected.package.eslint": "(autodetect)",
- "nodejs_package_manager_path": "npm"
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
- false
- true
-
-
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index 0f30840..4f1b77d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,26 +1,25 @@
-## Copyright The KubeDB Authors.
-##
-## Licensed under the Apache License, Version 2.0 (the "License");
-## you may not use this file except in compliance with the License.
-## You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
+# Copyright The KubeDB Authors.
#
-FROM postgres:15.5-bookworm AS builder
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+FROM postgres:15.5-alpine as builder
+RUN apk add --update alpine-sdk clang15-dev llvm15 perl postgresql15-dev bison libc-dev gcc git flex zlib-dev readline-dev build-base
-RUN apt-get update \
- && apt-get install -y git build-essential postgresql-server-dev-15 libreadline-dev zlib1g-dev flex bison clang-14
RUN git clone https://github.com/apache/age.git \
&& cd /age \
&& git checkout release/PG15/1.5.0 \
- && make PG_CONFIG=/usr/bin/pg_config install
+ && make install PG_CONFIG=/usr/local/bin/pg_config
-FROM postgres:15.5-bookworm
-COPY --from=builder /usr/share/postgresql /usr/share/postgresql
-COPY --from=builder /usr/lib/postgresql /usr/lib/postgresql
+FROM postgres:15.5-alpine
+COPY --from=builder /usr/local/share/postgresql /usr/local/share/postgresql
+COPY --from=builder /usr/local/lib/postgresql /usr/local/lib/postgresql
diff --git a/example/README.md b/example/README.md
index 9d2611b..58fdbc8 100644
--- a/example/README.md
+++ b/example/README.md
@@ -5,18 +5,18 @@
2. Create catalog.yaml
```
-kubectl apply -f https://github.com/kubedb/postgres-docker/raw/release-15.3-alpine-tds_fdw/example/catalog.yaml
+kubectl apply -f https://raw.githubusercontent.com/kubedb/postgres-docker/15.5-bookworm-age/example/catalog.yaml
```
3. Deploy a demo PostgreSQL database.
```
-kubectl apply -f https://github.com/kubedb/postgres-docker/raw/release-15.3-alpine-tds_fdw/example/demo.yaml
+kubectl apply -f https://raw.githubusercontent.com/kubedb/postgres-docker/15.5-bookworm-age/example/demo.yaml
```
4. Wait until postgres is ready.
```bash
NAME VERSION STATUS AGE
-postgres.kubedb.com/ha-postgres 15.5-bookworm Ready 22m
+postgres.kubedb.com/ha-postgres 15.5 Ready 22m
```
5. Exec into the pod and run psql command.
@@ -24,7 +24,6 @@ postgres.kubedb.com/ha-postgres 15.5-bookworm Ready 22m
kubectl exec -it -n demo ha-postgres-0 -- bash
Defaulted container "postgres" out of: postgres, pg-coordinator, postgres-init-container (init)
postgres@ha-postgres-0:/$ psql
-psql (15.7 (Debian 15.7-1.pgdg120+1))
Type "help" for help.
postgres=#
diff --git a/example/catalog.yaml b/example/catalog.yaml
index 60bb91c..a4c2090 100644
--- a/example/catalog.yaml
+++ b/example/catalog.yaml
@@ -1,7 +1,7 @@
apiVersion: catalog.kubedb.com/v1alpha1
kind: PostgresVersion
metadata:
- name: 15.5-bookworm
+ name: "15.5"
spec:
archiver:
addon:
@@ -14,12 +14,12 @@ spec:
volumeSnapshot:
name: volume-snapshot
walg:
- image: ghcr.io/kubedb/postgres-archiver:v0.6.0_15.5-bookworm
+ image: ghcr.io/kubedb/postgres-archiver:v0.6.0_15.5-alpine
coordinator:
image: ghcr.io/kubedb/pg-coordinator:v0.29.0
db:
- baseOS: debian
- image: souravbiswassanto/postgres-age-bookworm-okay:15
+ baseOS: alpine
+ image: souravbiswassanto/postgres:15.5-alpine-age
distribution: Official
exporter:
image: prometheuscommunity/postgres-exporter:v0.15.0
@@ -28,8 +28,8 @@ spec:
podSecurityPolicies:
databasePolicyName: postgres-db
securityContext:
- runAsAnyNonRoot: true
- runAsUser: 999
+ runAsAnyNonRoot: false
+ runAsUser: 70
stash:
addon:
backupTask:
@@ -39,4 +39,4 @@ spec:
updateConstraints:
allowlist:
- "14.2"
- version: "15.5"
\ No newline at end of file
+ version: "15.5"
diff --git a/example/demo.yaml b/example/demo.yaml
index 0cf4870..854a5da 100644
--- a/example/demo.yaml
+++ b/example/demo.yaml
@@ -4,7 +4,7 @@ metadata:
name: ha-postgres
namespace: demo
spec:
- version: "15.5-bookworm"
+ version: "15.5"
replicas: 3
storageType: Durable
storage: