diff --git a/helm/robusta/templates/forwarder-service-account.yaml b/helm/robusta/templates/forwarder-service-account.yaml index 3cdfa1b7c..1f96186d2 100644 --- a/helm/robusta/templates/forwarder-service-account.yaml +++ b/helm/robusta/templates/forwarder-service-account.yaml @@ -1,4 +1,4 @@ -{{- if .Values.kubewatch.createServiceAccount }} +{{- if and .Values.kubewatch.enabled .Values.kubewatch.createServiceAccount }} kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: @@ -136,4 +136,4 @@ subjects: - kind: ServiceAccount name: {{ include "robusta.fullname" . }}-forwarder-service-account namespace: {{ .Release.Namespace }} -{{- end }} # createServiceAccount \ No newline at end of file +{{- end }} # createServiceAccount diff --git a/helm/robusta/templates/forwarder.yaml b/helm/robusta/templates/forwarder.yaml index 94e5df017..91e4d29ea 100644 --- a/helm/robusta/templates/forwarder.yaml +++ b/helm/robusta/templates/forwarder.yaml @@ -1,3 +1,4 @@ +{{- if .Values.kubewatch.enabled }} apiVersion: apps/v1 kind: Deployment metadata: @@ -144,3 +145,4 @@ spec: targetLabels: - target {{ end }} +{{- end }} diff --git a/helm/robusta/templates/kubewatch-configmap.yaml b/helm/robusta/templates/kubewatch-configmap.yaml index c2068881d..80bd63e36 100644 --- a/helm/robusta/templates/kubewatch-configmap.yaml +++ b/helm/robusta/templates/kubewatch-configmap.yaml @@ -1,3 +1,4 @@ +{{- if .Values.kubewatch.enabled }} apiVersion: v1 kind: ConfigMap metadata: @@ -7,5 +8,6 @@ data: .kubewatch.yaml: |- handler: cloudevent: - url: "http://{{ include "robusta.fullname" . }}-runner:80/api/handle" + url: {{ default (printf "http://%s-runner:80/api/handle" (include "robusta.fullname" .)) .Values.kubewatch.overrideUrl | quote }} {{ toYaml .Values.kubewatch.config | indent 4 }} +{{- end }} diff --git a/helm/robusta/templates/playbooks-config.yaml b/helm/robusta/templates/playbooks-config.yaml index 0873e7f82..1a0bcc50d 100644 --- a/helm/robusta/templates/playbooks-config.yaml +++ b/helm/robusta/templates/playbooks-config.yaml @@ -1,3 +1,4 @@ +{{- if .Values.runner.enabled }} apiVersion: v1 kind: Secret metadata: @@ -7,3 +8,4 @@ type: Opaque data: active_playbooks.yaml: |- {{ include "robusta.configfile" . | b64enc }} +{{- end }} diff --git a/helm/robusta/templates/runner-service-account.yaml b/helm/robusta/templates/runner-service-account.yaml index 434413377..8d5be771e 100644 --- a/helm/robusta/templates/runner-service-account.yaml +++ b/helm/robusta/templates/runner-service-account.yaml @@ -1,4 +1,4 @@ -{{- if .Values.runner.createServiceAccount }} +{{- if and .Values.runner.enabled .Values.runner.createServiceAccount }} kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: @@ -588,4 +588,4 @@ roleRef: kind: ClusterRole name: cluster-monitoring-view {{- end }} -{{- end }} # runner.createServiceAccount \ No newline at end of file +{{- end }} # runner.createServiceAccount diff --git a/helm/robusta/templates/runner.yaml b/helm/robusta/templates/runner.yaml index b83df3c07..c44a8121d 100644 --- a/helm/robusta/templates/runner.yaml +++ b/helm/robusta/templates/runner.yaml @@ -1,3 +1,4 @@ +{{- if .Values.runner.enabled }} apiVersion: apps/v1 kind: Deployment metadata: @@ -330,4 +331,4 @@ type: Opaque stringData: SENTRY_DSN: {{ $sentryDsn }} {{- end }} - +{{- end }} diff --git a/helm/robusta/values.yaml b/helm/robusta/values.yaml index 6c080b89f..1401d08ef 100644 --- a/helm/robusta/values.yaml +++ b/helm/robusta/values.yaml @@ -630,11 +630,13 @@ image: # parameters for the robusta forwarder deployment kubewatch: + enabled: true image: ~ # image can be used to override image.registry/imageName imageName: kubewatch:v2.13.0 imagePullPolicy: IfNotPresent revisionHistoryLimit: 10 pprof: True + overrideUrl: "" resources: requests: cpu: 10m @@ -713,6 +715,7 @@ runnerServiceAccount: # parameters for the robusta runner runner: + enabled: true image: ~ # image can be used to override image.registry/imageName imageName: robusta-runner:0.0.0 imagePullPolicy: IfNotPresent