-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: add the observability Pipeline template (#628)
Signed-off-by: barnettZQG <[email protected]> Signed-off-by: barnettZQG <[email protected]>
- Loading branch information
1 parent
3462a9a
commit a8eef5c
Showing
2 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
src/pages/PipelineListPage/components/CreatePipeline/pipeline-template.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
export const templates = [ | ||
{ | ||
label: 'Observability Template', | ||
value: ` | ||
- name: Enable Prism | ||
type: addon-operation | ||
properties: | ||
addonName: vela-prism | ||
- name: Enable o11y | ||
type: addon-operation | ||
properties: | ||
addonName: o11y-definitions | ||
operation: enable | ||
args: | ||
- --override-definitions | ||
- name: Enable Exporter | ||
type: step-group | ||
subSteps: | ||
- name: Node Exporter | ||
type: addon-operation | ||
properties: | ||
addonName: node-exporter | ||
operation: enable | ||
- name: Kube State Exporter | ||
type: addon-operation | ||
properties: | ||
addonName: kube-state-metrics | ||
operation: enable | ||
- name: Prepare Prometheus | ||
type: step-group | ||
subSteps: | ||
- name: get-exist-prometheus | ||
type: list-config | ||
properties: | ||
template: prometheus-server | ||
namespace: vela-system | ||
outputs: | ||
- name: prometheus | ||
valueFrom: "output.configs" | ||
- name: prometheus-server | ||
inputs: | ||
- from: prometheus | ||
parameterKey: configs | ||
if: context.readConfig == "false" || len(inputs.prometheus) == 0 | ||
type: addon-operation | ||
properties: | ||
addonName: prometheus-server | ||
operation: enable | ||
args: | ||
- memory=1024Mi | ||
- name: Prepare Loki | ||
type: addon-operation | ||
properties: | ||
addonName: loki | ||
operation: enable | ||
args: | ||
- agent=vector | ||
- name: Prepare Grafana | ||
type: step-group | ||
subSteps: | ||
- name: get-exist-grafana | ||
type: list-config | ||
properties: | ||
template: grafana | ||
namespace: vela-system | ||
outputs: | ||
- name: grafana | ||
valueFrom: "output.configs" | ||
- name: Install Grafana & Init Dashboards | ||
inputs: | ||
- from: grafana | ||
parameterKey: configs | ||
if: context.readConfig == "false" || len(inputs.grafana) == 0 | ||
type: addon-operation | ||
properties: | ||
addonName: grafana | ||
operation: enable | ||
args: | ||
- serviceType=LoadBalancer | ||
- name: Init Dashboards | ||
inputs: | ||
- from: grafana | ||
parameterKey: configs | ||
if: "len(inputs.grafana) != 0" | ||
type: addon-operation | ||
properties: | ||
addonName: grafana | ||
operation: enable | ||
args: | ||
- install=false | ||
- name: Clean | ||
type: clean-jobs | ||
- name: print-message | ||
type: print-message-in-status | ||
properties: | ||
message: "All addons have been enabled successfully, you can use 'vela addon list' to check them." | ||
`, | ||
}, | ||
]; |