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

fix: grafana pvc config not working #737

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions addons/grafana/parameter.cue
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ parameter: {
// +usage=The clusters to install
clusters?: [...string]
// +usage=Specify the image of kube-state-metrics
image: *"grafana/grafana:8.5.3" | string
image: *"grafana/grafana:10.2.1" | string
// +usage=Specify the imagePullPolicy of the image
imagePullPolicy: *"IfNotPresent" | "Never" | "Always"
// +usage=Specify the number of CPU units
cpu: *0.5 | number
// +usage=Specifies the attributes of the memory resource required for the container.
memory: *"1024Mi" | string
// +usage=Specify the service type for expose prometheus server. Default to be ClusterIP.
serviceType: *"ClusterIP" | "NodePort" | "LoadBalancer"
serviceType: *"NodePort" | "ClusterIP" | "LoadBalancer"
// +usage=Specify the storage size to use. If empty, emptyDir will be used. Otherwise pvc will be used.
storage?: =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$"
// +usage=Specify the storage class to use.
storageClassName?: string
// +usage=Specify the admin user for grafana
adminUser: *"admin" | string
// +usage=Specify the admin password for grafana
adminPassword: *"kubevela" | string
adminPassword: *"admin" | string
}
18 changes: 14 additions & 4 deletions addons/grafana/resources/grafana.cue
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,20 @@ grafana: {
path: "/api/health"
port: 3000
}
volumeMounts: emptyDir: [{
name: "storage"
mountPath: "/var/lib/grafana"
}]

if parameter.storage == _|_ {
volumeMounts: emptyDir: [{
name: "storage-volume"
mountPath: "/var/lib/grafana"
}]
}
if parameter.storage != _|_ {
volumeMounts: pvc: [{
name: "storage-volume"
mountPath: "/var/lib/grafana"
claimName: "grafana-storage"
}]
}
env: [{
name: "GF_SECURITY_ADMIN_USER"
valueFrom: secretKeyRef: {
Expand Down
2 changes: 1 addition & 1 deletion addons/grafana/template.cue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ output: {
policies: commonPolicies + [{
type: "override"
name: "grafana-core"
properties: selector: [o11yNamespace.name, grafanaAccess.name, grafana.name]
properties: selector: [o11yNamespace.name, grafanaStorage.name,grafanaAccess.name, grafana.name]
}, {
type: "override"
name: "grafana-dashboards"
Expand Down
2 changes: 1 addition & 1 deletion addons/keda/resources/helm.cue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ kedacore: {
repoType: "helm"
url: "https://kedacore.github.io/charts"
chart: "keda"
version: "2.8.2"
version: "2.12.0"
upgradeCRD: parameter.upgradeCRD
}
}
2 changes: 1 addition & 1 deletion addons/kruise-rollout/parameter.cue
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ parameter: {
// +usage=The clusters to install
clusters?: [...string]
// +usage=Specify if upgrade the CRDs when upgrading kruise-rollout or not
upgradeCRD: *false | bool
upgradeCRD: *true | bool
}
2 changes: 1 addition & 1 deletion addons/kruise-rollout/template.cue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ output: {
repoType: "helm"
url: "https://openkruise.github.io/charts/"
chart: "kruise-rollout"
version: "0.3.0"
version: "0.4.0"
upgradeCRD: parameter.upgradeCRD
values: {
replicaCount: 1
Expand Down
6 changes: 3 additions & 3 deletions addons/prometheus-server/parameter.cue
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ parameter: {
// prometheus-server parameters

// +usage=Specify the image of prometheus-server
image: *"quay.io/prometheus/prometheus:v2.34.0" | string
image: *"bitnami/prometheus:2.48.0" | string
// +usage=Specify the imagePullPolicy of the image
imagePullPolicy: *"IfNotPresent" | "Never" | "Always"
// +usage=Specify the number of CPU units
cpu: *0.5 | number
// +usage=Specifies the attributes of the memory resource required for the container.
memory: *"1024Mi" | string
memory: *"1560Mi" | string
// +usage=Specify the service type for expose prometheus server. If empty, it will be not exposed.
serviceType: *"ClusterIP" | "NodePort" | "LoadBalancer" | ""
// +usage=Specify the storage size to use. If empty, emptyDir will be used. Otherwise pvc will be used.
Expand All @@ -36,5 +36,5 @@ parameter: {
thanos: *false | bool

// +usage=The interval for scraping pods, services, endpoints.
scrapeInterval: *"15s" | =~"^([1-9][0-9]?)(s|m)$"
scrapeInterval: *"20s" | =~"^([1-9][0-9]?)(s|m)$"
}
11 changes: 11 additions & 0 deletions experimental/addons/harbor/myvalues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
data:
harbor.yaml: |
expose:
tls:
enabled: false
type: NodePort
externalURL: http://117.88.40.57:30002
kind: ConfigMap
metadata:
name: myhelmharbor
2 changes: 1 addition & 1 deletion experimental/addons/harbor/resources/harbor.cue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ harbor: {
repoType: "helm"
url: "https://helm.goharbor.io"
chart: "harbor"
version: "1.10.2"
version: "1.13.1"
targetNamespace: "vela-system"
releaseName: "harbor"
values: {
Expand Down
Loading