Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ss 133 backupcontainers #558

Merged
merged 7 commits into from
Oct 30, 2023
5 changes: 5 additions & 0 deletions openshift/templates/backup-container/backup.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
postgres=keycloak-db:5432/keycloak-db

# Backup at 1am PST, and verify backups at 4am PST.
0 1 * * * default ./backup.sh -s
0 4 * * * default ./backup.sh -s -v all
74 changes: 74 additions & 0 deletions openshift/templates/backup-container/backup_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
kind: Template
apiVersion: "template.openshift.io/v1"
metadata:
name: ${NAME}-build-template
creationTimestamp: null
objects:
- kind: ImageStream
apiVersion: v1
metadata:
name: ${NAME}
- kind: BuildConfig
apiVersion: v1
metadata:
name: ${NAME}
labels:
app: ${NAME}
spec:
triggers:
- type: ImageChange
- type: ConfigChange
runPolicy: Serial
source:
type: Git
git:
uri: ${GIT_REPO_URL}
ref: ${GIT_REF}
contextDir: ${SOURCE_CONTEXT_DIR}
strategy:
type: Docker
dockerStrategy:
from:
kind: DockerImage
name: ${BASE_IMAGE_FOR_BUILD}
dockerfilePath: ${DOCKER_FILE_PATH}
output:
to:
kind: ImageStreamTag
name: ${NAME}:${OUTPUT_IMAGE_TAG}
parameters:
- name: NAME
displayName: Name
description: The name assigned to all of the resources. Use 'backup-{database name}' depending on your database provider
required: true
value: backup-postgres
- name: GIT_REPO_URL
displayName: Git Repo URL
description: The URL to your GIT repo.
required: true
value: https://github.com/BCDevOps/backup-container.git
- name: GIT_REF
displayName: Git Reference
description: The git reference or branch.
required: true
value: master
- name: SOURCE_CONTEXT_DIR
displayName: Source Context Directory
description: The source context directory.
required: false
value: /docker
- name: DOCKER_FILE_PATH
displayName: Docker File
description: The path and file of the docker file defining the build. Choose either 'Dockerfile' for Postgres builds or 'Dockerfile_Mongo' for MongoDB builds or 'Dockerfile_MSSQL' for MSSQL builds.
required: false
value: Dockerfile
- name: OUTPUT_IMAGE_TAG
displayName: Output Image Tag
description: The tag given to the built image.
required: true
value: latest
- name: BASE_IMAGE_FOR_BUILD
displayName: FROM Image Tag
description: Base image to build from. Docker creds or Artificatory setup may be needed to alleviate docker rate-limiting
required: true
value: docker.io/centos/postgresql-12-centos7:20200917-804ef01
Loading
Loading