-
Notifications
You must be signed in to change notification settings - Fork 14
Backup restore functionality added for different versions #14
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
Open
divyanshujainSquareops
wants to merge
59
commits into
squareops:release-1.1.2
Choose a base branch
from
divyanshujainSquareops:main
base: release-1.1.2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 18 commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
f34b6e3
upgrade backup-restore functionality
divyanshujainSquareops 41f3a28
update backup-restore feature
divyanshujainSquareops fc2d643
update backup-restore feature
divyanshujainSquareops bbda84b
update backup-restore feature
divyanshujainSquareops 6b8d721
update backup-restore feature
divyanshujainSquareops a36032e
Delete modules/db-backup-restore/backup/.helmignore
divyanshujainSquareops 3376919
Delete modules/db-backup-restore/restore/.helmignore
divyanshujainSquareops 8d81967
update backup-restore feature
divyanshujainSquareops 4e1028f
update backup-restore feature
divyanshujainSquareops 004d9ae
update backup-restore feature
divyanshujainSquareops 2cf312e
update backup-restore feature
divyanshujainSquareops 9e7dfb4
Update main.tf
divyanshujainSquareops 1b0d849
Updated terraform aws privider version (#13)
ankush-sqops 43af34b
added backup-restore functionality
df03298
Update main.tf
amanravi-squareops fc0a2d1
Merge branch 'squareops:main' into main
divyanshujainSquareops 2625bc8
Merge pull request #1 from amanravi-squareops/release-1.1.3
divyanshujainSquareops 9ab3d73
update module location
divyanshujainSquareops ad5cba4
updated readme file
3ccfa4e
Merge branch 'divyanshujainSquareops:main' into release-1.1.3
amanravi-squareops 4b1d355
Update README.md
amanravi-squareops 6a98434
Merge pull request #2 from amanravi-squareops/release-1.1.3
divyanshujainSquareops 8722dbe
updated the repo
14829f0
Merge branch 'divyanshujainSquareops:main' into release-1.1.3
amanravi-squareops e429c8c
updated the repo
22dc814
Merge branch 'release-1.1.3' of https://github.com/amanravi-squareops…
e9f34cd
updated readme file
b563e9e
updated readme file
1ff5b73
updated readme file
db5ee98
Merge pull request #3 from amanravi-squareops/release-1.1.3
divyanshujainSquareops 70b0ff2
Update main.tf
divyanshujainSquareops 79a953b
Update main.tf
divyanshujainSquareops 9487cdd
added backup restore functionality and fixed security group
ecc6036
Merge pull request #4 from amanravi-squareops/release-1.1.3
divyanshujainSquareops 3956204
Update README.md
divyanshujainSquareops 609ddc8
updated readme file
divyanshujainSquareops cce7d35
Update main.tf
divyanshujainSquareops 51ed115
Merge pull request #15 from divyanshujainSquareops/main
ankush-sqops 5a614ec
added path module in the backup main.tf
amanravi-squareops 914e03b
Update outputs.tf
amanravi-squareops 3cb293c
Update output.tf
amanravi-squareops 3ef1675
Update main.tf
amanravi-squareops dc6c6a7
Merge pull request #5 from amanravi-squareops/release-1.1.3
divyanshujainSquareops 69e373f
Merge pull request #17 from divyanshujainSquareops/main
ankush-sqops aa63d18
fixed restore database
a8b75b3
run lint command
f671e2e
Merge pull request #6 from amanravi-squareops/release-1.1.3
divyanshujainSquareops 7588fb3
Merge pull request #18 from divyanshujainSquareops/main
ns-squareops a728d7f
Merge pull request #19 from squareops/release-2.0.0
ns-squareops ad853a5
added path module in the backup & restore module
amanravi-squareops ec5990f
Merge pull request #7 from amanravi-squareops/release-1.1.3
divyanshujainSquareops e6777a1
changed the release version
amanravi-squareops 2d7bc72
Merge pull request #8 from amanravi-squareops/release-1.1.3
divyanshujainSquareops c12e664
Update variables.tf
amanravi-squareops 61d27f6
Update variables.tf
amanravi-squareops 70ef411
Update variables.tf
amanravi-squareops f0e949a
Update variables.tf
amanravi-squareops 4add7f1
Update variables.tf
amanravi-squareops 6e3f0a0
Merge pull request #9 from amanravi-squareops/release-1.1.3
divyanshujainSquareops File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
*.tfvars | ||
*.pem | ||
vars | ||
.helmignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
## Enable Full backup | ||
backup: | ||
bucket_uri: ${bucket_uri} | ||
aws_default_region: ${s3_bucket_region} | ||
cron_for_full_backup: "${cron_for_full_backup}" | ||
postgres_database_name: "${postgres_database_name}" | ||
database_endpoint: "${db_endpoint}" | ||
database_password: "${db_password}" | ||
database_user: "${db_username}" | ||
|
||
|
||
annotations: | ||
${annotations} | ||
|
||
auth: | ||
username: "${db_username}" | ||
|
||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: "Addons-Services" | ||
operator: In | ||
values: | ||
- "true" | ||
|
||
backupjob: | ||
resources: | ||
requests: | ||
memory: 100Mi | ||
cpu: 50m | ||
limits: | ||
memory: 200Mi | ||
cpu: 100m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
restore: | ||
bucket_uri: ${bucket_uri} | ||
aws_default_region: ${s3_bucket_region} | ||
db_endpoint: "${db_endpoint}" | ||
db_password: "${db_password}" | ||
db_username: "${db_username}" | ||
DB_NAME: "${DB_NAME}" | ||
backup_file_name: "${backup_file_name}" | ||
|
||
auth: | ||
username: "${db_username}" | ||
|
||
annotations: | ||
${annotations} | ||
|
||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: "Addons-Services" | ||
operator: In | ||
values: | ||
- "true" | ||
|
||
restorejob: | ||
resources: | ||
requests: | ||
memory: 100Mi | ||
cpu: 50m | ||
limits: | ||
memory: 200Mi | ||
cpu: 100m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
description: A helm chart for Backup of postgres and stored in S3 | ||
name: postgres-backup | ||
version: 1.0.0 |
8 changes: 8 additions & 0 deletions
8
modules/db-backup-restore/backup/templates/backup-secret.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: postgres-bucket-uri | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
data: | ||
MYSQL_BUCKET_URI: {{ .Values.backup.bucket_uri | b64enc | quote }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: backup-postgresdb | ||
spec: | ||
schedule: {{ .Values.backup.cron_for_full_backup | quote }} | ||
concurrencyPolicy: Forbid | ||
suspend: false | ||
successfulJobsHistoryLimit: 3 | ||
failedJobsHistoryLimit: 1 | ||
|
||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
affinity: {{ .Values.affinity | toYaml | nindent 10 }} | ||
restartPolicy: OnFailure | ||
serviceAccountName: sa-postgres-backup | ||
containers: | ||
- name: backup-postgresdb | ||
image: divyanshujain11/rds:postgres-backup-restore | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
imagePullPolicy: Always | ||
command: ["./backup.sh"] | ||
env: | ||
- name: db_endpoint | ||
value: {{ .Values.backup.database_endpoint }} | ||
- name: db_username | ||
value: {{ .Values.backup.database_user }} | ||
- name: db_password | ||
value: {{ .Values.backup.database_password }} | ||
- name: bucket_uri | ||
value: {{ .Values.backup.bucket_uri }} | ||
- name: AWS_DEFAULT_REGION | ||
value: {{ .Values.backup.aws_default_region}} | ||
- name: postgres_database_name | ||
value: {{ .Values.backup.postgres_database_name }} | ||
resources: {{ .Values.backupjob.resources | toYaml | nindent 12 }} |
7 changes: 7 additions & 0 deletions
7
modules/db-backup-restore/backup/templates/service_account.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: sa-postgres-backup | ||
namespace: {{ .Release.Namespace }} | ||
annotations: | ||
{{ toYaml .Values.annotations | indent 4 }} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add double quotes at the end