Skip to content

Commit

Permalink
feat: KB install support specifiy addon list and remove loki addon (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
yipeng1030 authored Oct 16, 2024
1 parent be39431 commit 9de449a
Show file tree
Hide file tree
Showing 32 changed files with 101 additions and 158 deletions.
3 changes: 3 additions & 0 deletions deploy/helm/templates/addons/apecloud-mysql-addon.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "apecloud-mysql" .Values.autoInstalledAddons }}
{{- $selectorLabels := include "kubeblocks.selectorLabels" . }}
{{- include "kubeblocks.buildAddonCR" (merge (dict
"kbVersion" ">=0.7.0"
Expand All @@ -8,3 +9,5 @@
"provider" "apecloud"
"description" "ApeCloud MySQL is a database that is compatible with MySQL syntax and achieves high availability through the utilization of the RAFT consensus protocol."
"autoInstall" true ) .) -}}
{{- end }}

4 changes: 3 additions & 1 deletion deploy/helm/templates/addons/etcd-addon.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "etcd" .Values.autoInstalledAddons }}
{{- $selectorLabels := include "kubeblocks.selectorLabels" . }}
{{- include "kubeblocks.buildAddonCR" (merge (dict
"kbVersion" ">=0.9.0"
Expand All @@ -7,4 +8,5 @@
"model" "key-value"
"provider" "apecloud"
"description" "etcd is a strongly consistent, distributed key-value store that provides a reliable way to store data that needs to be accessed by a distributed system or cluster of machines."
"autoInstall" true ) .) -}}
"autoInstall" true ) .) -}}
{{- end }}
4 changes: 3 additions & 1 deletion deploy/helm/templates/addons/kafka-addon.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "kafka" .Values.autoInstalledAddons }}
{{- $selectorLabels := include "kubeblocks.selectorLabels" . }}
{{- include "kubeblocks.buildAddonCR" (merge (dict
"kbVersion" ">=0.7.0"
Expand All @@ -7,4 +8,5 @@
"model" "streaming"
"provider" "community"
"description" "Apache Kafka is a distributed streaming platform designed to build real-time pipelines and can be used as a message broker or as a replacement for a log aggregation solution for big data applications."
"autoInstall" true) . ) -}}
"autoInstall" true) . ) -}}
{{- end }}
4 changes: 3 additions & 1 deletion deploy/helm/templates/addons/llm-addon.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "llm" .Values.autoInstalledAddons }}
{{- $selectorLabels := include "kubeblocks.selectorLabels" . }}
{{- include "kubeblocks.buildAddonCR" (merge (dict
"kbVersion" ">=0.7.0"
Expand All @@ -7,4 +8,5 @@
"model" "LLM"
"provider" "community"
"description" "Large Language Models."
"autoInstall" false) . ) -}}
"autoInstall" false) . ) -}}
{{- end }}
2 changes: 2 additions & 0 deletions deploy/helm/templates/addons/mongodb-addon.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "mongodb" .Values.autoInstalledAddons }}
{{- $selectorLabels := include "kubeblocks.selectorLabels" . }}
{{- include "kubeblocks.buildAddonCR" (merge (dict
"kbVersion" ">=0.7.0"
Expand All @@ -8,3 +9,4 @@
"provider" "apecloud"
"description" "MongoDB is a document database designed for ease of application development and scaling."
"autoInstall" true) . ) -}}
{{- end }}
4 changes: 3 additions & 1 deletion deploy/helm/templates/addons/mysql-addon.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "mysql" .Values.autoInstalledAddons }}
{{- $selectorLabels := include "kubeblocks.selectorLabels" . }}
{{- include "kubeblocks.buildAddonCR" (merge (dict
"kbVersion" ">=0.7.0"
Expand All @@ -7,4 +8,5 @@
"model" "RDBMS"
"provider" "community"
"description" "MySQL is a widely used, open-source relational database management system (RDBMS)."
"autoInstall" true) . ) -}}
"autoInstall" true) . ) -}}
{{- end }}
4 changes: 3 additions & 1 deletion deploy/helm/templates/addons/postgresql-addon.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "postgresql" .Values.autoInstalledAddons }}
{{- $selectorLabels := include "kubeblocks.selectorLabels" . }}
{{- include "kubeblocks.buildAddonCR" (merge (dict
"kbVersion" ">=0.7.0"
Expand All @@ -7,4 +8,5 @@
"model" "RDBMS"
"provider" "community"
"description" "PostgreSQL (Postgres) is an open source object-relational database known for reliability and data integrity. ACID-compliant, it supports foreign keys, joins, views, triggers and stored procedures."
"autoInstall" true) . ) -}}
"autoInstall" true) . ) -}}
{{- end }}
4 changes: 3 additions & 1 deletion deploy/helm/templates/addons/pulsar-addon.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "pulsar" .Values.autoInstalledAddons }}
{{- $selectorLabels := include "kubeblocks.selectorLabels" . }}
{{- include "kubeblocks.buildAddonCR" (merge (dict
"kbVersion" ">=0.7.0"
Expand All @@ -7,4 +8,5 @@
"model" "streaming"
"provider" "community"
"description" "Apache® Pulsar™ is an open-source, distributed messaging and streaming platform built for the cloud."
"autoInstall" true) . ) -}}
"autoInstall" true) . ) -}}
{{- end }}
4 changes: 3 additions & 1 deletion deploy/helm/templates/addons/qdrant-addon.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "qdrant" .Values.autoInstalledAddons }}
{{- $selectorLabels := include "kubeblocks.selectorLabels" . }}
{{- include "kubeblocks.buildAddonCR" (merge (dict
"kbVersion" ">=0.7.0"
Expand All @@ -7,4 +8,5 @@
"model" "vector"
"provider" "community"
"description" "Qdrant is an open source (Apache-2.0 licensed), vector similarity search engine and vector database."
"autoInstall" false) . ) -}}
"autoInstall" false) . ) -}}
{{- end }}
4 changes: 3 additions & 1 deletion deploy/helm/templates/addons/redis-addon.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "redis" .Values.autoInstalledAddons }}
{{- $selectorLabels := include "kubeblocks.selectorLabels" . }}
{{- include "kubeblocks.buildAddonCR" (merge (dict
"kbVersion" ">=0.7.0"
Expand All @@ -7,4 +8,5 @@
"model" "key-value"
"provider" "community"
"description" "Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker."
"autoInstall" true) . ) -}}
"autoInstall" true) . ) -}}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "alertmanager-webhook-adaptor" .Values.autoInstalledAddons }}
apiVersion: extensions.kubeblocks.io/v1alpha1
kind: Addon
metadata:
Expand Down Expand Up @@ -47,3 +48,5 @@ spec:

installable:
autoInstall: {{ .Values.prometheus.enabled }}
{{- end }}

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "alertmanager-webhook-adaptor" .Values.autoInstalledAddons }}
{{- $imageRegistry := include "kubeblocks.imageRegistry" . }}
apiVersion: v1
kind: ConfigMap
Expand All @@ -17,4 +18,5 @@ data:
{{- $image = set $image "registry" $imageRegistry }}
{{- end }}
{{- $alertmanagerWebhookAdaptor = set $alertmanagerWebhookAdaptor "image" $image }}
{{- toYaml $alertmanagerWebhookAdaptor | nindent 4 }}
{{- toYaml $alertmanagerWebhookAdaptor | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "apecloud-otel-collector" .Values.autoInstalledAddons }}
apiVersion: extensions.kubeblocks.io/v1alpha1
kind: Addon
metadata:
Expand Down Expand Up @@ -46,5 +47,6 @@ spec:

installable:
autoInstall: {{ .Values.agamotto.enabled }}
{{- end }}


Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- $imageRegistry := include "kubeblocks.imageRegistry" . }}
{{- if has "apecloud-otel-collector" .Values.autoInstalledAddons }}
{{- $imageRegistry := include "kubeblocks.imageRegistry" . }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -17,4 +18,5 @@ data:
{{- $image = set $image "registry" $imageRegistry }}
{{- end }}
{{- $agamotto = set $agamotto "image" $image }}
{{- toYaml $agamotto | nindent 4 }}
{{- toYaml $agamotto | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "aws-load-balancer-controller" .Values.autoInstalledAddons }}
apiVersion: extensions.kubeblocks.io/v1alpha1
kind: Addon
metadata:
Expand Down Expand Up @@ -55,4 +56,5 @@ spec:
operator: Contains
values:
- eks
{{- end }}

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "aws-load-balancer-controller" .Values.autoInstalledAddons }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -10,4 +11,5 @@ metadata:
{{- end }}
data:
values-kubeblocks-override.yaml: |-
{{- get ( .Values | toYaml | fromYaml ) "aws-load-balancer-controller" | toYaml | nindent 4 }}
{{- get ( .Values | toYaml | fromYaml ) "aws-load-balancer-controller" | toYaml | nindent 4 }}
{{- end }}
3 changes: 3 additions & 0 deletions deploy/helm/templates/applications/csi-driver-addon.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "kubeblocks-csi-driver" .Values.autoInstalledAddons }}
apiVersion: extensions.kubeblocks.io/v1alpha1
kind: Addon
metadata:
Expand Down Expand Up @@ -65,3 +66,5 @@ spec:
operator: Contains
values:
- eks

{{- end }}
2 changes: 2 additions & 0 deletions deploy/helm/templates/applications/csi-driver-nfs-addon.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "csi-driver-nfs" .Values.autoInstalledAddons }}
apiVersion: extensions.kubeblocks.io/v1alpha1
kind: Addon
metadata:
Expand Down Expand Up @@ -58,3 +59,4 @@ spec:
{{- end }}
{{- end }}
autoInstall: {{ $autoInstall }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "csi-hostpath-driver" .Values.autoInstalledAddons }}
apiVersion: extensions.kubeblocks.io/v1alpha1
kind: Addon
metadata:
Expand Down Expand Up @@ -45,3 +46,5 @@ spec:
- gke
- tke
- aks

{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "csi-hostpath-driver" .Values.autoInstalledAddons }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -10,4 +11,5 @@ metadata:
{{- end }}
data:
values-kubeblocks-override.yaml: |-
{{- get ( .Values | toYaml | fromYaml ) "csi-hostpath-driver" | toYaml | nindent 4 }}
{{- get ( .Values | toYaml | fromYaml ) "csi-hostpath-driver" | toYaml | nindent 4 }}
{{- end }}
2 changes: 2 additions & 0 deletions deploy/helm/templates/applications/grafana-addon.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "grafana" .Values.autoInstalledAddons }}
apiVersion: extensions.kubeblocks.io/v1alpha1
kind: Addon
metadata:
Expand Down Expand Up @@ -66,3 +67,4 @@ spec:

installable:
autoInstall: {{ .Values.grafana.enabled }}
{{- end }}
4 changes: 3 additions & 1 deletion deploy/helm/templates/applications/grafana-values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "grafana" .Values.autoInstalledAddons }}
{{- $imageRegistry := include "kubeblocks.imageRegistry" . }}
apiVersion: v1
kind: ConfigMap
Expand All @@ -24,4 +25,5 @@ data:
{{- end }}
{{- $sidecar = set $sidecar "image" $sidecarImage }}
{{- $grafana = set $grafana "sidecar" $sidecar }}
{{- toYaml $grafana | nindent 4 }}
{{- toYaml $grafana | nindent 4 }}
{{- end }}
77 changes: 0 additions & 77 deletions deploy/helm/templates/applications/loki-addon.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions deploy/helm/templates/applications/loki-values.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions deploy/helm/templates/applications/prometheus-addon.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if has "prometheus" .Values.autoInstalledAddons }}
apiVersion: extensions.kubeblocks.io/v1alpha1
kind: Addon
metadata:
Expand Down Expand Up @@ -138,3 +139,4 @@ spec:

installable:
autoInstall: {{ .Values.prometheus.enabled }}
{{- end }}
Loading

0 comments on commit 9de449a

Please sign in to comment.