Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add the VM as an observability addon #729

Merged
merged 4 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Feat: Add the VM as an addon
Signed-off-by: 悦达 <[email protected]>
  • Loading branch information
悦达 committed Sep 25, 2023
commit f08781a85ac3c0ff0a297ac876bd6f851475b70d
2 changes: 2 additions & 0 deletions addons/kube-state-metrics/resources/kube-state-metrics.cue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ kubeStateMetrics: {
properties: {
image: parameter["image"]
imagePullPolicy: parameter["imagePullPolicy"]
ports: [{port: 8080}]
livenessProbe: {
httpGet: {
path: "/healthz"
Expand Down Expand Up @@ -47,6 +48,7 @@ kubeStateMetrics: {
"prometheus.io/port": "8080"
"prometheus.io/scrape": "true"
"prometheus.io/path": "/metrics"
"oam.dev/addon-name": "kube-state-metric"
}
}
}, {
Expand Down
3 changes: 3 additions & 0 deletions addons/victoria-metric/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# victoria-metric

This is an addon template. Check how to build your own addon: https://kubevela.net/docs/platform-engineers/addon/intro
14 changes: 14 additions & 0 deletions addons/victoria-metric/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
dependencies:
- name: fluxcd
description: VictoriaMetrics addon for KubeVela.
icon: https://avatars.githubusercontent.com/u/43720803?s=200&v=4
invisible: false
name: victoria-metric
label: VictoriaMetrics
dependencies:
- name: o11y-definitions
tags:
- Prometheus
- Observability
- VictoriaMetrics
version: 0.10.0
10 changes: 10 additions & 0 deletions addons/victoria-metric/parameter.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// parameter.cue is used to store addon parameters.
//
// You can use these parameters in template.cue or in resources/ by 'parameter.myparam'
//
// For example, you can use parameters to allow the user to customize
// container images, ports, and etc.
parameter: {
// +usage=The namespace name
namespace: *"vm-system" | string
}
18 changes: 18 additions & 0 deletions addons/victoria-metric/resources/namespace.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// We put Components in resources directory.
// References:
// - https://kubevela.net/docs/end-user/components/references
// - https://kubevela.net/docs/platform-engineers/addon/intro#resources-directoryoptional
output: {
type: "k8s-objects"
properties: {
objects: [
{
// This creates a plain old Kubernetes namespace
apiVersion: "v1"
kind: "Namespace"
// We can use the parameter defined in parameter.cue like this.
metadata: name: parameter.namespace
},
]
}
}
Loading
Loading