Last active
May 31, 2023 00:27
-
-
Save dbones/2dd1c6c05f429da3d23f00c211791ffc to your computer and use it in GitHub Desktop.
eploring the service model, along with backups
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
# global annotastion | |
# lab.dev/sync - how often to sync | |
# lab.dev/keep - disables the delete | |
# improved support for sevices | |
# namespace, in downstream clusters | |
--- | |
# register we have a service | |
# setup github, and ownership | |
apiVersion: lab.dev/v1 | |
kind: Service | |
metadata: | |
name: billing | |
namespace: galaxy | |
spec: | |
git: true | |
--- | |
apiVersion: services.lab.dev/v1 | |
kind: Component | |
metadata: | |
name: thor | |
namespace: billing | |
spec: | |
provider: postgres #auto scan | |
name: thor # [name] | |
zone: # auto scan | |
outputs: # add a value into the secret file | |
- key: database.json | |
value: > | |
{ | |
"Database" { | |
"ConnectionString": "host={host};database={database};password={password};username={username}" | |
} | |
} | |
# postgres -> host, database, password, username, clutername, zone | |
# rabbit -> host, vhost, password, username, clutername, zone | |
# kubernetes -> clutername, zone | |
--- | |
apiVersion: services.lab.dev/v1 | |
kind: BackupSchedule | |
metadata: | |
name: thor-nightly | |
namespace: billing | |
spec: | |
provider: postgres #auto scan | |
name: thor # [name] of the component we backup | |
storage: backup | |
zone: # auto scan | |
cron: * 1 * * | |
retention: 2-weeks | |
--- | |
# this entry will be created by eith a schedule or manually (creating this will invoke a backup) | |
# deletingn this will delete the backup | |
apiVersion: services.lab.dev/v1 | |
kind: Backup | |
metadata: | |
name: thor-2024-01-01 | |
namespace: billing | |
spec: | |
provider: postgres | |
name: thor | |
storage: backup | |
zone: | |
status: | |
path: full-path | |
datetime: 2024-01-01 | |
progress: Done | Scheduled | Inprogess | Failed | |
--- | |
# when registering Postgres, rabbit, consider a backup | |
apiVersion: backup.lab.dev/v1 | |
kind: Storage | |
metadata: | |
name: backup | |
namespace: aplha # name of the zone. | |
spec: | |
credentials: location api key secret | |
provider: S3 | File | |
region: | |
name: [name] | |
retention: | |
- name: 2-weeks | |
value: 14 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment