-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcrd-k8s-test-2.yml
98 lines (98 loc) · 4.11 KB
/
crd-k8s-test-2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
apiVersion: dnitsch.net/v1alpha1
kind: RestStrategy
metadata:
name: test-int-local
namespace: runtime-config-sync
spec:
auth:
# https://pocketbase.io/docs/api-authentication/...
- name: customTest1
type: CustomToToken
custom:
authUrl: http://127.0.0.1:8090/api/admins/auth-via-email
credential:
email: test@example.com
password: AWSPARAMSTR:///int-test/pocketbase/admin-pwd
responseKey: $.token
headerKey: Authorization
tokenPrefix: Admin
seed:
- name: create-pocketbase-admin2
endpoint: http://127.0.0.1:8090/api/admins
strategy: FIND/PATCH/POST
getEndpointSuffix: "?page=1&perPage=100&sort=-created&filter="
findByJsonPathExpr: "$.items[?(@.email=='test2@example.com')].id"
authMapRef: customTest1
payloadTemplate: |
{"email": "test2@example.com",
"password": "${password}","passwordConfirm": "${password}",
"avatar": 7
}
# if a user does exist ensure password is set to below
patchPayloadTemplate: |
{
"password": "${password}",
"passwordConfirm": "${password}"
}
variables:
password: AWSPARAMSTR:///int-test/pocketbase/admin-pwd
runtimeVars:
admin1AvatarId: "$.avatar"
- name: create-pocketbase-admin3
# /api/admins
endpoint: http://127.0.0.1:8090/api/admins
strategy: FIND/PATCH/POST
getEndpointSuffix: "?page=1&perPage=100&sort=-created&filter="
# postEndpointSuffix: /post
findByJsonPathExpr: "$.items[?(@.email=='test3@example.com')].id"
authMapRef: customTest1
payloadTemplate: |
{"email": "test3@example.com",
"password": "${password}",
"passwordConfirm": "${password}",
"avatar": 4
}
patchPayloadTemplate: |
{
"password": "${password}",
"passwordConfirm": "${password}",
"avatar": ${admin1AvatarId}
}
variables:
password: AWSPARAMSTR:///int-test/pocketbase/admin-pwd
- name: create-pocketbase-test-collection
# /api/admins
endpoint: http://127.0.0.1:8090/api/collections
strategy: FIND/PATCH/POST
getEndpointSuffix: "?page=1&perPage=100&sort=-created&filter="
# postEndpointSuffix: /post
findByJsonPathExpr: "$.items[?(@.name=='test')].id"
authMapRef: customTest1
payloadTemplate: |
{"id":"","created":"","updated":"","name":"test","system":false,"listRule":null,"viewRule":null,"createRule":null,"updateRule":null,"deleteRule":null,
"schema":[
{"id":"","name":"custom1","type":"text","system":false,"required":false,"unique":false,"options":{"pattern":"^\\w+$"},"originalName":"field","toDelete":false},
{"id":"","name":"customJson","type":"json","system":false,"required":false,"unique":false,"options":{},"originalName":"field","toDelete":false}
],"originalName":""}
patchPayloadTemplate: |
{"id":"${testCollectionPatchId}",
"schema":[
{"id":"yd15nwug","name":"custom1","type":"text","system":false,"required":false,"unique":false,"options":{"min":null,"max":null,"pattern":"^\\w+$"},"originalName":"custom1","toDelete":false},
{"id":"ipcsxpqy","name":"customJson","type":"json","system":false,"required":false,"unique":false,"options":{},"originalName":"customJson","toDelete":false},
{"id":"","name":"fieldNumber","type":"number","system":false,"required":false,"unique":false,"options":{"max":1111111,"min":-1111111},"originalName":"field","toDelete":false}
],
"originalName":"test"}
runtimeVars:
testCollectionPatchId: $.items[?(@.name=='test')].id
- name: create-pocketbase-user-for-qa-tes1
endpoint: http://127.0.0.1:8090/api/users
strategy: FIND/PATCH/POST
getEndpointSuffix: "?page=1&perPage=100&sort=-created&filter="
findByJsonPathExpr: "$.items[?(@.email=='qa-guy@example.com')].id"
authMapRef: customTest1
payloadTemplate: |
{"email":"qa-guy@example.com","password":"Password123_alwaysChange","passwordConfirm":"Password123_alwaysChange"}
patchPayloadTemplate: |
{"password":"${newPass}","passwordConfirm":"${newPass}"}
variables:
newPass: AWSPARAMSTR:///int-test/pocketbase/admin-pwd