Skip to content

Commit

Permalink
function-args: add pg-back-cmd option
Browse files Browse the repository at this point in the history
the option can either be pg_dump or pg_dumpall

Signed-off-by: Abdullah Algarni <AlgarniAbdullah@outlook.com>
  • Loading branch information
Elgarni authored and tamalsaha committed May 26, 2020
1 parent 55e792e commit 962df30
Show file tree
Hide file tree
Showing 13 changed files with 124 additions and 50 deletions.
4 changes: 2 additions & 2 deletions api/crds/bindata.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (fi bindataFileInfo) Sys() interface{} {
return nil
}

var _installerStashAppscodeCom_stashpostgresesYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x56\x5f\x8f\xdc\x34\x10\x7f\xdf\x4f\x31\x12\x48\x05\x44\xb2\x9c\x2a\x21\xc8\x0b\x42\x07\x48\x15\x05\xaa\x6e\xe9\xcb\xa9\x48\xb3\xf6\x6c\x76\x38\xc7\x36\x9e\x49\xe8\xdd\xa7\x47\x76\x92\xbd\xfd\x7b\xf4\x2a\xf0\xd3\xfa\x37\xff\x7f\x33\xe3\x0d\x46\x7e\x4b\x49\x38\xf8\x06\x30\x32\xbd\x57\xf2\xf9\x26\xf5\xed\x37\x52\x73\x58\x0e\x57\x6b\x52\xbc\x5a\xdc\xb2\xb7\x0d\x5c\xf7\xa2\xa1\x7b\x4d\x12\xfa\x64\xe8\x07\xda\xb0\x67\xe5\xe0\x17\x1d\x29\x5a\x54\x6c\x16\x00\x26\x11\x66\xf0\x0d\x77\x24\x8a\x5d\x6c\xc0\xf7\xce\x2d\x00\x1c\xae\xc9\x49\xd6\x01\xc0\x18\x1b\x10\x45\xd9\x2e\x00\x3c\x76\x34\xdd\x62\x10\x6d\x13\x09\x49\xcd\x5e\x14\x9d\xa3\x54\x17\x49\x8d\x31\x8a\x09\x96\x6a\x13\xba\x85\x44\x32\xd9\x53\x9b\x42\x1f\x1b\x78\x54\x77\x0c\x30\x05\x36\xa8\xd4\x86\xc4\xf3\xbd\xda\x65\x91\x7f\xcf\x76\xe5\x3a\x16\xbd\xca\xe2\x57\x53\x5a\x05\x77\x2c\xfa\xf3\xa9\xec\x25\x8b\x16\x79\x74\x7d\x42\x77\x52\x50\x91\x09\xfb\xb6\x77\x98\x8e\xa4\x0b\x80\x98\x95\xd2\x40\xbf\xfb\x5b\x1f\xfe\xf6\x3f\x31\x39\x2b\x0d\x6c\xd0\x49\x4e\x47\x4c\x88\xd4\xc0\xaf\xb9\x92\x88\x86\xec\x02\x60\x40\xc7\xb6\x90\x3d\xd6\x12\x22\xf9\xef\x5f\xbd\x78\xfb\x7c\x65\xb6\xd4\xe1\x08\x66\xcf\x21\x52\xd2\x5d\xc9\x23\xff\xbb\xce\xef\x30\x00\x4b\x62\x12\xc7\xe2\x11\x9e\x65\x57\xa3\x0e\xd8\xdc\x6b\x12\xd0\x2d\xc1\x30\x62\x64\x41\x4a\x18\x08\x1b\xd0\x2d\x0b\x24\x2a\x35\x78\x2d\x29\xed\xb9\x85\xac\x82\x1e\xc2\xfa\x4f\x32\x5a\xc3\x2a\xd7\x99\x04\x64\x1b\x7a\x67\xc1\x04\x3f\x50\x52\x48\x64\x42\xeb\xf9\x7e\xe7\x59\x40\x43\x09\xe9\x50\x69\x22\x77\x3e\xec\x95\x92\x47\x97\x49\xe8\xe9\x4b\x40\x6f\xa1\xc3\x3b\x48\x94\x63\x40\xef\xf7\xbc\x15\x15\xa9\xe1\x97\x90\x08\xd8\x6f\x42\x03\x5b\xd5\x28\xcd\x72\xd9\xb2\xce\xb3\x6e\x42\xd7\xf5\x9e\xf5\x6e\x69\x82\xd7\xc4\xeb\x5e\x43\x92\xa5\xa5\x81\xdc\x52\xb8\xad\x30\x99\x2d\x2b\x19\xed\x13\x2d\x31\x72\x55\x12\xf7\x5a\x16\xa6\xb3\x9f\xa4\x69\x31\xe4\xd9\x5e\xa6\x7a\x17\xcb\x6c\x27\xf6\xed\x0e\x2e\x93\x75\x91\xf7\x3c\x5b\xc0\x02\x38\x99\x8d\xf9\x3f\xd0\x9b\xa1\xcc\xca\xeb\x1f\x57\x6f\x60\x0e\x5a\x5a\x70\xc8\x79\x61\xfb\xc1\x4c\x1e\x88\xcf\x44\xb1\xdf\x50\x1a\x1b\xb7\x49\xa1\x2b\x1e\xc9\xdb\x18\xd8\x6b\xb9\x18\xc7\xe4\x0f\x49\x97\x7e\xdd\xb1\xe6\x4e\xff\xd5\x93\x68\xee\x4f\x0d\xd7\xe8\x7d\x50\x58\x13\xf4\xd1\xa2\x92\xad\xe1\x85\x87\x6b\xec\xc8\x5d\xa3\xd0\xff\x4e\x7b\x66\x58\xaa\x4c\xe9\xbf\x13\xbf\xff\x50\xcd\xe7\xdc\x7a\xe4\x53\x5e\xa5\x03\x04\xa0\xc3\xf7\x2f\xc9\xb7\xba\x6d\xe0\xeb\xe7\x47\xb2\x88\x9a\x47\xb2\x81\x3f\x6e\xb0\xba\x7f\xf7\xd9\x4d\x85\xd5\xfd\x57\xd5\xb7\xef\xbe\xb8\x99\x7e\x7c\xfe\xdd\xa7\x47\x36\x67\x93\x9c\xe1\xb1\x81\x3b\x78\x7e\xf2\xce\x0e\xcd\xc1\x4b\xb4\x8a\x64\xf2\x00\xe5\x2e\x4e\x3b\xba\x09\x69\xd4\x81\x59\x69\xda\x0a\xd8\xb0\xa3\x0f\x60\x63\x8d\xe6\xb6\x8f\xc7\x7c\x5c\xd2\xce\x07\x53\x7b\x06\xbd\x58\xf3\xc5\xba\xf3\xd9\xf4\xce\xe5\x7e\xfc\x36\x50\x4a\x6c\x4f\xfa\x72\xd1\x27\x77\xd8\x9e\x68\x3f\x96\x75\xa2\x96\x45\xd3\xdd\x13\x33\xcf\x86\x31\x08\x6b\xf8\x08\x53\xc5\xf6\x89\x36\x79\x01\x39\x91\x3d\x36\xab\x76\xf9\x9f\x11\xcc\xf9\x9d\x88\x14\x3f\xb8\x11\x1f\xd5\x84\x44\xa2\x21\x3d\xa9\x0d\xff\xdd\xf0\x9c\xa3\xaa\x9a\xc6\xf9\x00\x2a\xa3\x72\x80\x4c\x79\x3f\xbe\x98\x47\xd0\x30\x7f\x4f\x0d\x57\xe8\xe2\x16\xaf\x1e\xb0\x52\x50\x35\x7d\xed\xec\x89\x01\xca\x1f\xbf\x6d\x40\x53\x3f\x46\xcb\x71\xf3\xe0\x8e\xc8\x3f\x01\x00\x00\xff\xff\xb9\x58\x06\xad\xa7\x09\x00\x00")
var _installerStashAppscodeCom_stashpostgresesYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x56\x4d\x6f\xe4\x44\x13\xbe\xcf\xaf\x28\xe9\x7d\xa5\x05\x84\x3d\x44\x2b\x21\xf0\x05\xa1\x00\xd2\x8a\x05\x56\x9b\x65\x2f\xd1\x22\xd5\xb4\x6b\x3c\x45\xda\xdd\x4d\x55\x79\xd8\xe4\xd7\xa3\x6e\xdb\x93\xcc\x57\xd8\x44\xa2\x4f\xee\xa7\xbe\x9f\xaa\x6a\x19\x13\xbf\x27\x51\x8e\xa1\x01\x4c\x4c\x1f\x8d\x42\xbe\x69\x7d\xf3\x8d\xd6\x1c\x97\xdb\x8b\x15\x19\x5e\x2c\x6e\x38\xb4\x0d\x5c\x0e\x6a\xb1\x7f\x4b\x1a\x07\x71\xf4\x03\xad\x39\xb0\x71\x0c\x8b\x9e\x0c\x5b\x34\x6c\x16\x00\x4e\x08\x33\xf8\x8e\x7b\x52\xc3\x3e\x35\x10\x06\xef\x17\x00\x1e\x57\xe4\x35\xeb\x00\x60\x4a\x0d\xa8\xa1\x6e\x16\x00\x01\x7b\x9a\x6e\x29\xaa\x75\x42\x4a\x5a\x73\x50\x43\xef\x49\xea\x22\xa9\x31\x25\x75\xb1\xa5\xda\xc5\x7e\xa1\x89\x5c\xf6\xd4\x49\x1c\x52\x03\x8f\xea\x8e\x01\xa6\xc0\x0e\x8d\xba\x28\x3c\xdf\xab\x5d\x16\xf9\x7b\xb6\x2b\xd7\xb1\xe8\xab\x2c\x7e\x33\xa5\x55\x70\xcf\x6a\x3f\x1f\xcb\x5e\xb3\x5a\x91\x27\x3f\x08\xfa\xa3\x82\x8a\x4c\x39\x74\x83\x47\x39\x90\x2e\x00\x52\x56\x92\x2d\xfd\x1e\x6e\x42\xfc\x3b\xfc\xc4\xe4\x5b\x6d\x60\x8d\x5e\x73\x3a\xea\x62\xa2\x06\x7e\xcd\x95\x24\x74\xd4\x2e\x00\xb6\xe8\xb9\x2d\x64\x8f\xb5\xc4\x44\xe1\xfb\x37\xaf\xde\xbf\xbc\x72\x1b\xea\x71\x04\xb3\xe7\x98\x48\x6c\x57\xf2\xc8\xff\xae\xf3\x3b\x0c\xa0\x25\x75\xc2\xa9\x78\x84\x17\xd9\xd5\xa8\x03\x6d\xee\x35\x29\xd8\x86\x60\x3b\x62\xd4\x82\x96\x30\x10\xd7\x60\x1b\x56\x10\x2a\x35\x04\x2b\x29\x3d\x70\x0b\x59\x05\x03\xc4\xd5\x9f\xe4\xac\x86\xab\x5c\xa7\x28\xe8\x26\x0e\xbe\x05\x17\xc3\x96\xc4\x40\xc8\xc5\x2e\xf0\xdd\xce\xb3\x82\xc5\x12\xd2\xa3\xd1\x44\xee\x7c\x38\x18\x49\x40\x9f\x49\x18\xe8\x4b\xc0\xd0\x42\x8f\xb7\x20\x94\x63\xc0\x10\x1e\x78\x2b\x2a\x5a\xc3\x2f\x51\x08\x38\xac\x63\x03\x1b\xb3\xa4\xcd\x72\xd9\xb1\xcd\xb3\xee\x62\xdf\x0f\x81\xed\x76\xe9\x62\x30\xe1\xd5\x60\x51\x74\xd9\xd2\x96\xfc\x52\xb9\xab\x50\xdc\x86\x8d\x9c\x0d\x42\x4b\x4c\x5c\x95\xc4\x83\x95\x85\xe9\xdb\xff\xc9\xb4\x18\xfa\xe2\x41\xa6\x76\x9b\xca\x6c\x0b\x87\x6e\x07\x97\xc9\x3a\xcb\x7b\x9e\x2d\x60\x05\x9c\xcc\xc6\xfc\xef\xe9\xcd\x50\x66\xe5\xed\x8f\x57\xef\x60\x0e\x5a\x5a\xb0\xcf\x79\x61\xfb\xde\x4c\xef\x89\xcf\x44\x71\x58\x93\x8c\x8d\x5b\x4b\xec\x8b\x47\x0a\x6d\x8a\x1c\xac\x5c\x9c\x67\x0a\xfb\xa4\xeb\xb0\xea\xd9\x72\xa7\xff\x1a\x48\x2d\xf7\xa7\x86\x4b\x0c\x21\x1a\xac\x08\x86\xd4\xa2\x51\x5b\xc3\xab\x00\x97\xd8\x93\xbf\x44\xa5\xff\x9c\xf6\xcc\xb0\x56\x99\xd2\x7f\x27\xfe\xe1\x43\x35\x9f\x53\xeb\x91\x4f\x79\x95\xf6\x10\x80\x1e\x3f\xbe\xa6\xd0\xd9\xa6\x81\xaf\x5f\x1e\xc8\x12\x5a\x1e\xc9\x06\xfe\xb8\xc6\xea\xee\xc3\x67\xd7\x15\x56\x77\x5f\x55\xdf\x7e\xf8\xe2\x7a\xfa\xf8\xfc\xbb\xff\x1f\xd8\x9c\x4c\x72\x86\xc7\x06\xee\xe0\xf9\xc9\x3b\x39\x34\x7b\x2f\xd1\x55\x22\x97\x07\x28\x77\x71\xda\xd1\x75\x94\x51\x07\x66\xa5\x69\x2b\x60\xcd\x9e\x3e\x81\x8d\x15\xba\x9b\x21\x1d\xf2\x71\x4e\x3b\x1f\x94\xee\x04\x7a\xb6\xe6\xf1\xb8\xbe\x7d\xa2\xcd\x49\xae\xf2\x59\x0f\xde\xe7\x1e\xfe\xb6\x25\x11\x6e\x8f\x7a\x79\xd6\x27\xf7\xd8\x1d\x69\x3f\x56\xa9\x50\xc7\x6a\x72\xfb\xe4\x6a\x85\x52\x54\xb6\xf8\x0c\x53\xc3\xee\x89\x36\x79\x69\x59\xe8\x88\xdf\x6a\x97\xff\x09\xc1\x9c\xdf\x91\xc8\xf0\x93\x1b\xf1\xac\x26\x08\xa9\x45\x79\x52\x1b\x9e\x31\x70\x67\x72\x3e\x45\x55\x35\xad\xc0\x1e\x54\x46\x65\x0f\x99\xf2\x7e\x7c\x99\x0f\xa0\xed\xfc\x0f\xb6\xbd\x40\x9f\x36\x78\x71\x8f\x95\x82\xaa\xe9\x0f\xe9\x81\x18\xa0\xfc\x2c\xb4\x0d\x98\x0c\x63\xb4\x1c\x37\x0f\xee\x88\xfc\x13\x00\x00\xff\xff\x98\xc1\xf1\x0b\xdb\x09\x00\x00")

func installerStashAppscodeCom_stashpostgresesYamlBytes() ([]byte, error) {
return bindataRead(
Expand All @@ -92,7 +92,7 @@ func installerStashAppscodeCom_stashpostgresesYaml() (*asset, error) {
return nil, err
}

info := bindataFileInfo{name: "installer.stash.appscode.com_stashpostgreses.yaml", size: 2471, mode: os.FileMode(420), modTime: time.Unix(1573722179, 0)}
info := bindataFileInfo{name: "installer.stash.appscode.com_stashpostgreses.yaml", size: 2523, mode: os.FileMode(420), modTime: time.Unix(1573722179, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
Expand Down
2 changes: 2 additions & 0 deletions api/crds/installer.stash.appscode.com_stashpostgreses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ spec:
properties:
args:
type: string
cmd:
type: string
type: object
fullnameOverride:
type: string
Expand Down
3 changes: 3 additions & 0 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,9 @@
"properties": {
"args": {
"type": "string"
},
"cmd": {
"type": "string"
}
}
},
Expand Down
123 changes: 82 additions & 41 deletions apis/installer/v1alpha1/generated.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion apis/installer/v1alpha1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions apis/installer/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion apis/installer/v1alpha1/stash_postgres_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ type ImageRef struct {

type PostgresBackup struct {
// +optional
Args string `json:"args" protobuf:"bytes,1,opt,name=args"`
CMD string `json:"cmd" protobuf:"bytes,1,opt,name=cmd"`
// +optional
Args string `json:"args" protobuf:"bytes,2,opt,name=args"`
}

type PostgresRestore struct {
Expand Down
3 changes: 2 additions & 1 deletion charts/stash-postgres/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ The following table lists the configurable parameters of the `stash-postgres` ch
| image.registry | Docker registry used to pull Postgres addon image | `stashed` |
| image.repository | Docker image used to backup/restore PosegreSQL database | `stash-postgres` |
| image.tag | Tag of the image that is used to backup/restore PostgreSQL database. This is usually same as the database version it can backup. | `"11.2"` |
| backup.args | Arguments to pass to `pgdump` command during bakcup process | `""` |
| backup.cmd | Postgres dump command, can either be: pg_dumpall or pg_dump | `"pg_dumpall"` |
| backup.args | Arguments to pass to `backup.cmd` command during backup process | `""` |
| restore.args | Arguments to pass to `psql` command during restore process | `""` |


Expand Down
Loading

0 comments on commit 962df30

Please sign in to comment.