Skip to content

Commit 64149cc

Browse files
authored
Extract plugins and delete legacy platforms (#1390)
* Fix panic in Slack tester * Extract non-essential plugins * Remove deprecated platforms long time ago (Legacy Slack and Legacy Teams)
1 parent 148a9ed commit 64149cc

File tree

150 files changed

+378
-13903
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+378
-13903
lines changed

.github/workflows/process-chart.yml

-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ env:
66
HELM_DOCS_VERSION: 1.11.0
77
CHART_REPOSITORY: https://charts.botkube.io/
88
LATEST_PLUGIN_INDEX_URL: https://storage.googleapis.com/botkube-plugins-latest/plugins-index.yaml
9-
LATEST_X_PLUGIN_TPLS_URL: github.com/kubeshop/botkube//cmd/executor/exec/templates?ref=main
109

1110
on:
1211
workflow_call:
@@ -54,7 +53,6 @@ jobs:
5453
find ${HELM_FOLDER} -name "*.yaml" -exec sed -i "s/${CHART_CURRENT_VERSION}/${{ inputs.next-version }}/g" {} +
5554
find ${HELM_FOLDER} -name "*.yaml" -exec sed -i "s/${CHART_DEV_VERSION}/${{ inputs.next-version }}/g" {} +
5655
find ${HELM_FOLDER} -name "*.yaml" -exec sed -i "s~${LATEST_PLUGIN_INDEX_URL}~https://github.com/kubeshop/botkube/releases/download/${{ inputs.next-version }}/plugins-index.yaml~g" {} +
57-
find ${HELM_FOLDER} -name "*.yaml" -exec sed -i "s~${LATEST_X_PLUGIN_TPLS_URL}~github.com/kubeshop/botkube//cmd/executor/exec/templates?ref=${{ inputs.next-version }}~g" {} +
5856
5957
- name: Set up chart-testing
6058
uses: helm/[email protected]

.github/workflows/publish-chart.yml

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ env:
1212
HELM_DOCS_VERSION: 1.11.0
1313
CHART_REPOSITORY: https://storage.googleapis.com/botkube-latest-main-charts
1414
LATEST_PLUGIN_INDEX_URL: https://storage.googleapis.com/botkube-plugins-latest/plugins-index.yaml
15-
LATEST_X_PLUGIN_TPLS_URL: github.com/kubeshop/botkube//cmd/executor/exec/templates?ref=main
1615

1716
jobs:
1817
process-chart:

.goreleaser.plugin.yaml

-210
Original file line numberDiff line numberDiff line change
@@ -9,85 +9,10 @@ before:
99
- go mod download
1010

1111
builds:
12-
- id: doctor
13-
main: cmd/executor/doctor/main.go
14-
binary: executor_doctor_{{ .Os }}_{{ .Arch }}
15-
16-
no_unique_dist_dir: true
17-
env:
18-
- CGO_ENABLED=0
19-
goos:
20-
- linux
21-
- darwin
22-
goarch:
23-
- amd64
24-
- arm64
25-
goarm:
26-
- 7
2712
- id: echo
2813
main: cmd/executor/echo/main.go
2914
binary: executor_echo_{{ .Os }}_{{ .Arch }}
3015

31-
no_unique_dist_dir: true
32-
env:
33-
- CGO_ENABLED=0
34-
goos:
35-
- linux
36-
- darwin
37-
goarch:
38-
- amd64
39-
- arm64
40-
goarm:
41-
- 7
42-
- id: exec
43-
main: cmd/executor/exec/main.go
44-
binary: executor_exec_{{ .Os }}_{{ .Arch }}
45-
46-
no_unique_dist_dir: true
47-
env:
48-
- CGO_ENABLED=0
49-
goos:
50-
- linux
51-
- darwin
52-
goarch:
53-
- amd64
54-
- arm64
55-
goarm:
56-
- 7
57-
- id: flux
58-
main: cmd/executor/flux/main.go
59-
binary: executor_flux_{{ .Os }}_{{ .Arch }}
60-
61-
no_unique_dist_dir: true
62-
env:
63-
- CGO_ENABLED=0
64-
goos:
65-
- linux
66-
- darwin
67-
goarch:
68-
- amd64
69-
- arm64
70-
goarm:
71-
- 7
72-
- id: gh
73-
main: cmd/executor/gh/main.go
74-
binary: executor_gh_{{ .Os }}_{{ .Arch }}
75-
76-
no_unique_dist_dir: true
77-
env:
78-
- CGO_ENABLED=0
79-
goos:
80-
- linux
81-
- darwin
82-
goarch:
83-
- amd64
84-
- arm64
85-
goarm:
86-
- 7
87-
- id: helm
88-
main: cmd/executor/helm/main.go
89-
binary: executor_helm_{{ .Os }}_{{ .Arch }}
90-
9116
no_unique_dist_dir: true
9217
env:
9318
- CGO_ENABLED=0
@@ -103,36 +28,6 @@ builds:
10328
main: cmd/executor/kubectl/main.go
10429
binary: executor_kubectl_{{ .Os }}_{{ .Arch }}
10530

106-
no_unique_dist_dir: true
107-
env:
108-
- CGO_ENABLED=0
109-
goos:
110-
- linux
111-
- darwin
112-
goarch:
113-
- amd64
114-
- arm64
115-
goarm:
116-
- 7
117-
- id: thread-mate
118-
main: cmd/executor/thread-mate/main.go
119-
binary: executor_thread-mate_{{ .Os }}_{{ .Arch }}
120-
121-
no_unique_dist_dir: true
122-
env:
123-
- CGO_ENABLED=0
124-
goos:
125-
- linux
126-
- darwin
127-
goarch:
128-
- amd64
129-
- arm64
130-
goarm:
131-
- 7
132-
- id: argocd
133-
main: cmd/source/argocd/main.go
134-
binary: source_argocd_{{ .Os }}_{{ .Arch }}
135-
13631
no_unique_dist_dir: true
13732
env:
13833
- CGO_ENABLED=0
@@ -148,36 +43,6 @@ builds:
14843
main: cmd/source/cm-watcher/main.go
14944
binary: source_cm-watcher_{{ .Os }}_{{ .Arch }}
15045

151-
no_unique_dist_dir: true
152-
env:
153-
- CGO_ENABLED=0
154-
goos:
155-
- linux
156-
- darwin
157-
goarch:
158-
- amd64
159-
- arm64
160-
goarm:
161-
- 7
162-
- id: github-events
163-
main: cmd/source/github-events/main.go
164-
binary: source_github-events_{{ .Os }}_{{ .Arch }}
165-
166-
no_unique_dist_dir: true
167-
env:
168-
- CGO_ENABLED=0
169-
goos:
170-
- linux
171-
- darwin
172-
goarch:
173-
- amd64
174-
- arm64
175-
goarm:
176-
- 7
177-
- id: keptn
178-
main: cmd/source/keptn/main.go
179-
binary: source_keptn_{{ .Os }}_{{ .Arch }}
180-
18146
no_unique_dist_dir: true
18247
env:
18348
- CGO_ENABLED=0
@@ -193,21 +58,6 @@ builds:
19358
main: cmd/source/kubernetes/main.go
19459
binary: source_kubernetes_{{ .Os }}_{{ .Arch }}
19560

196-
no_unique_dist_dir: true
197-
env:
198-
- CGO_ENABLED=0
199-
goos:
200-
- linux
201-
- darwin
202-
goarch:
203-
- amd64
204-
- arm64
205-
goarm:
206-
- 7
207-
- id: prometheus
208-
main: cmd/source/prometheus/main.go
209-
binary: source_prometheus_{{ .Os }}_{{ .Arch }}
210-
21161
no_unique_dist_dir: true
21262
env:
21363
- CGO_ENABLED=0
@@ -222,89 +72,29 @@ builds:
22272

22373
archives:
22474

225-
- builds: [doctor]
226-
id: doctor
227-
files:
228-
- none*
229-
name_template: "{{ .Binary }}"
230-
23175
- builds: [echo]
23276
id: echo
23377
files:
23478
- none*
23579
name_template: "{{ .Binary }}"
23680

237-
- builds: [exec]
238-
id: exec
239-
files:
240-
- none*
241-
name_template: "{{ .Binary }}"
242-
243-
- builds: [flux]
244-
id: flux
245-
files:
246-
- none*
247-
name_template: "{{ .Binary }}"
248-
249-
- builds: [gh]
250-
id: gh
251-
files:
252-
- none*
253-
name_template: "{{ .Binary }}"
254-
255-
- builds: [helm]
256-
id: helm
257-
files:
258-
- none*
259-
name_template: "{{ .Binary }}"
260-
26181
- builds: [kubectl]
26282
id: kubectl
26383
files:
26484
- none*
26585
name_template: "{{ .Binary }}"
26686

267-
- builds: [thread-mate]
268-
id: thread-mate
269-
files:
270-
- none*
271-
name_template: "{{ .Binary }}"
272-
273-
- builds: [argocd]
274-
id: argocd
275-
files:
276-
- none*
277-
name_template: "{{ .Binary }}"
278-
27987
- builds: [cm-watcher]
28088
id: cm-watcher
28189
files:
28290
- none*
28391
name_template: "{{ .Binary }}"
28492

285-
- builds: [github-events]
286-
id: github-events
287-
files:
288-
- none*
289-
name_template: "{{ .Binary }}"
290-
291-
- builds: [keptn]
292-
id: keptn
293-
files:
294-
- none*
295-
name_template: "{{ .Binary }}"
296-
29793
- builds: [kubernetes]
29894
id: kubernetes
29995
files:
30096
- none*
30197
name_template: "{{ .Binary }}"
302-
303-
- builds: [prometheus]
304-
id: prometheus
305-
files:
306-
- none*
307-
name_template: "{{ .Binary }}"
30898

30999

310100
snapshot:

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ gen-grpc-resources:
9494
# Generate plugins YAML index files for both all plugins and end-user ones.
9595
gen-plugins-index: build-plugins
9696
go run ./hack/gen-plugin-index.go -output-path ./plugins-dev-index.yaml
97-
go run ./hack/gen-plugin-index.go -output-path ./plugins-index.yaml -plugin-name-filter 'kubectl|helm|kubernetes|prometheus|exec|doctor|keptn|github-events|flux|argocd'
97+
go run ./hack/gen-plugin-index.go -output-path ./plugins-index.yaml -plugin-name-filter 'kubectl|kubernetes'
9898

9999
gen-docs-cli:
100100
rm -f ./cmd/cli/docs/*

cmd/botkube-agent/main.go

-16
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,6 @@ func run(ctx context.Context) (err error) {
271271
}
272272

273273
// Run bots
274-
if commGroupCfg.Slack.Enabled {
275-
sb, err := bot.NewSlack(commGroupLogger.WithField(botLogFieldKey, "Slack"), commGroupMeta, commGroupCfg.Slack, executorFactory, analyticsReporter)
276-
if err != nil {
277-
return reportFatalError("while creating Slack bot", err)
278-
}
279-
scheduleBotNotifier(sb)
280-
}
281-
282274
if commGroupCfg.SocketSlack.Enabled {
283275
sb, err := bot.NewSocketSlack(commGroupLogger.WithField(botLogFieldKey, "SocketSlack"), commGroupMeta, commGroupCfg.SocketSlack, executorFactory, analyticsReporter)
284276
if err != nil {
@@ -303,14 +295,6 @@ func run(ctx context.Context) (err error) {
303295
scheduleBotNotifier(mb)
304296
}
305297

306-
if commGroupCfg.Teams.Enabled {
307-
tb, err := bot.NewTeams(commGroupLogger.WithField(botLogFieldKey, "MS Teams"), commGroupMeta, commGroupCfg.Teams, conf.Settings.ClusterName, executorFactory, analyticsReporter)
308-
if err != nil {
309-
return reportFatalError("while creating Teams bot", err)
310-
}
311-
scheduleBotNotifier(tb)
312-
}
313-
314298
if commGroupCfg.CloudTeams.Enabled {
315299
ctb, err := bot.NewCloudTeams(commGroupLogger.WithField(botLogFieldKey, "CloudTeams"), commGroupMeta, commGroupCfg.CloudTeams, conf.Settings.ClusterName, executorFactory, analyticsReporter)
316300
if err != nil {

cmd/executor/doctor/main.go

-19
This file was deleted.

0 commit comments

Comments
 (0)