This repository was archived by the owner on Feb 2, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +19
-0
lines changed Expand file tree Collapse file tree 5 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,11 @@ github:
100
100
oauth :
101
101
client_id : 914f3fb036ce9cd774
102
102
103
+ # # Slack
104
+ # ## You can set your own url to get an audit trail in your Slack workspace
105
+ slack :
106
+ url : http://gateway.openfaas:8080/function/echo
107
+
103
108
# ## Users allowed to access your OpenFaaS Cloud
104
109
# ### ACL for your users, it must be a raw text file or GitHub RAW URL
105
110
customers_url : " https://raw.githubusercontent.com/openfaas/openfaas-cloud/master/CUSTOMERS"
Original file line number Diff line number Diff line change @@ -50,6 +50,12 @@ func Apply(plan types.Plan) error {
50
50
return githubConfigErr
51
51
}
52
52
53
+ if slackConfigErr := generateTemplate ("slack" , plan , types.Slack {
54
+ URL : plan .Slack .URL ,
55
+ }); slackConfigErr != nil {
56
+ return slackConfigErr
57
+ }
58
+
53
59
dashboardConfigErr := generateTemplate ("dashboard_config" , plan , gatewayConfig {
54
60
RootDomain : plan .RootDomain , Scheme : scheme ,
55
61
})
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ type Plan struct {
17
17
S3 S3 `yaml:"s3"`
18
18
EnableOAuth bool `yaml:"enable_oauth"`
19
19
TLSConfig TLSConfig `yaml:"tls_config"`
20
+ Slack Slack `yaml:"slack"`
20
21
}
21
22
22
23
type KeyValueTuple struct {
@@ -53,6 +54,10 @@ type Github struct {
53
54
PrivateKeyFile string `yaml:"private_key_filename"`
54
55
}
55
56
57
+ type Slack struct {
58
+ URL string `yaml:"url"`
59
+ }
60
+
56
61
type OAuth struct {
57
62
ClientId string `yaml:"client_id"`
58
63
}
Original file line number Diff line number Diff line change 2
2
3
3
cp ./tmp/generated-gateway_config.yml ./tmp/openfaas-cloud/gateway_config.yml
4
4
cp ./tmp/generated-github.yml ./tmp/openfaas-cloud/github.yml
5
+ cp ./tmp/generated-slack.yml ./tmp/openfaas-cloud/slack.yml
5
6
cp ./tmp/generated-dashboard_config.yml ./tmp/openfaas-cloud/dashboard/dashboard_config.yml
6
7
7
8
kubectl apply -f ./tmp/openfaas-cloud/yaml/core/of-builder-dep.yml
Original file line number Diff line number Diff line change
1
+ environment :
2
+ slack_url : " {{.URL}}"
You can’t perform that action at this time.
0 commit comments