Skip to content

Commit

Permalink
Initial commit to add postgres operator (#353)
Browse files Browse the repository at this point in the history
* Initial commit to add postgres operator

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add tags list url

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pgvishnuram and pre-commit-ci[bot] authored Jul 14, 2022
1 parent a52f783 commit 18e2fc0
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,38 @@ workflows:
branches:
only: main

- approve-postgres-operator:
type: approval
- build:
name: build-postgres-operator
directory: postgres-operator
requires:
- approve-postgres-operator
- run_pre_commit
- test:
name: test-postgres-operator
directory: postgres-operator
test_script: bin/test.py
test_requirements: requirements/test-requirements.txt
requires:
- build-postgres-operator
- scan-trivy:
name: scan-trivy-postgres-operator
directory: postgres-operator
requires:
- test-postgres-operator
- release:
name: release-postgres-operator
directory: postgres-operator
context:
- quay.io
- docker.io
requires:
- scan-trivy-postgres-operator
filters:
branches:
only: main

- approve-postgresql:
type: approval
- build:
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ services:
image: ap-postgres-exporter:${ASTRO_IMAGE_TAG:-latest}
build:
context: postgres-exporter
ap-postgres-operator:
image: ap-postgres-operator:${ASTRO_IMAGE_TAG:-latest}
build:
context: postgres-operator
entrypoint: "/bin/sleep 1m"
ap-postgresql:
image: ap-postgresql:${ASTRO_IMAGE_TAG:-latest}
build:
Expand Down
22 changes: 22 additions & 0 deletions postgres-operator/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# Copyright 2016 Astronomer Inc.
#
# 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.

#https://github.com/zalando/postgres-operator/tags
FROM registry.opensource.zalan.do/acid/postgres-operator:v1.8.1
LABEL maintainer="Astronomer <[email protected]>"

ARG BUILD_NUMBER=-1
LABEL io.astronomer.docker=true
LABEL io.astronomer.docker.build.number=$BUILD_NUMBER
11 changes: 11 additions & 0 deletions postgres-operator/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
tests:
root_user_test: True
default_user: pgo
users_config:
- name: pgo
group: pgo
gid: 1000
uid: 1000
docker:
entrypoint: "/bin/sleep 1m"
4 changes: 4 additions & 0 deletions postgres-operator/trivyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Upstream postgres-operator images include several CVEs.
# We should try to remove these each time we update.
CVE-2022-27191
CVE-2021-38561
1 change: 1 addition & 0 deletions postgres-operator/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.8.1

0 comments on commit 18e2fc0

Please sign in to comment.