Skip to content

Commit f225d60

Browse files
authored
add credentials click to s3 setup (#753)
1 parent 5098e36 commit f225d60

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

goseg/click/hoon.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,13 @@ func storageAction(key, value string) string {
7171
})
7272
return hoon
7373
}
74+
75+
func storageToggleService(service string) string {
76+
hoon := joinGap([]string{
77+
";<",
78+
"~",
79+
"bind:m",
80+
fmt.Sprintf("(poke [our %%storage] %%storage-action !>([%%toggle-service %s]))", service),
81+
})
82+
return hoon
83+
}

goseg/click/storage.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ import (
1111
;< our=@p
1212
bind:m
1313
get-our
14+
;< ~
15+
bind:m
16+
(poke [our %storage] %storage-action !>([%toggle-service %credentials]))
1417
;< ~
1518
bind:m
1619
(poke [our %storage] %storage-action !>([%set-endpoint '{payload['endpoint']}']))
@@ -66,6 +69,7 @@ func linkStorage(patp, endpoint string, svcAccount structs.MinIOServiceAccount)
6669
hoon := joinGap([]string{
6770
"=/", "m", "(strand ,vase)",
6871
";<", "our=@p", "bind:m", "get-our",
72+
storageToggleService("%credentials"),
6973
storageAction("%set-endpoint", endpoint),
7074
storageAction("%set-access-key-id", svcAccount.AccessKey),
7175
storageAction("%set-secret-access-key", svcAccount.SecretKey),

0 commit comments

Comments
 (0)