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

✨Add enabled flag to each component in Helm chart #372

Merged
merged 3 commits into from
May 12, 2020
Merged
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
22 changes: 21 additions & 1 deletion charts/vald/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Add Vald Helm repository

Run the following command to install the chart,

$ helm install --generate-name vald/vald
$ helm install vald-cluster vald/vald


Configuration
Expand Down Expand Up @@ -47,3 +47,23 @@ Configuration
### Parameters

{{ template "chart.valuesTable" . }}


Miscellaneous
---

### Standalone Vald agent NGT deployment

Each component can be disabled by setting the value `false` to the `[component].enabled` field.
This is useful for deploying only Vald agent NGT pods.

There is an example yaml [values-agent-ngt-standalone.yaml][agent-ngt-standalone-yaml] to deploy standalone agent NGT.
Please run the following command to install the chart with this values yaml,

$ helm repo add vald https://vald.vdaas.org/charts
$ helm install --values values-agent-ngt-standalone.yaml vald-agent-ngt vald/vald

If you'd like to access the agents from out of the Kubernetes cluster, it is recommended to create an [Ingress][k8s-ingress].

agent-ngt-standalone-yaml: ./values-agent-ngt-standalone.yaml
k8s-ingress: https://kubernetes.io/docs/concepts/services-networking/ingress/
2 changes: 2 additions & 0 deletions charts/vald/templates/agent/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.agent.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -33,3 +34,4 @@ data:
{{- include "vald.observability" $observability | nindent 6 }}
ngt:
{{- toYaml .Values.agent.ngt | nindent 6 }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/vald/templates/agent/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if eq .Values.agent.kind "DaemonSet" }}
{{- if and .Values.agent.enabled (eq .Values.agent.kind "DaemonSet") }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/vald/templates/agent/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if eq .Values.agent.kind "Deployment" }}
{{- if and .Values.agent.enabled (eq .Values.agent.kind "Deployment") }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/vald/templates/agent/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.agent.hpa.enabled }}
{{- if and .Values.agent.enabled .Values.agent.hpa.enabled }}
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
Expand Down
2 changes: 2 additions & 0 deletions charts/vald/templates/agent/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.agent.enabled }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
Expand All @@ -22,3 +23,4 @@ spec:
selector:
matchLabels:
app: {{ .Values.agent.name }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/vald/templates/agent/priorityclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.agent.podPriority.enabled }}
{{- if and .Values.agent.enabled .Values.agent.podPriority.enabled }}
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/vald/templates/agent/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if eq .Values.agent.kind "StatefulSet" }}
{{- if and .Values.agent.enabled (eq .Values.agent.kind "StatefulSet") }}
apiVersion: apps/v1
kind: StatefulSet
metadata:
Expand Down
2 changes: 2 additions & 0 deletions charts/vald/templates/agent/svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.agent.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -37,3 +38,4 @@ spec:
{{- if .Values.agent.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.agent.externalTrafficPolicy }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/vald/templates/discoverer/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.discoverer.clusterRole.enabled }}
{{- if and .Values.discoverer.enabled .Values.discoverer.clusterRole.enabled }}
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/vald/templates/discoverer/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.discoverer.clusterRoleBinding.enabled }}
{{- if and .Values.discoverer.enabled .Values.discoverer.clusterRoleBinding.enabled }}
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
Expand Down
2 changes: 2 additions & 0 deletions charts/vald/templates/discoverer/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.discoverer.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -33,3 +34,4 @@ data:
{{- include "vald.observability" $observability | nindent 6 }}
discoverer:
{{- toYaml .Values.discoverer.discoverer | nindent 6 }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/vald/templates/discoverer/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if eq .Values.discoverer.kind "DaemonSet" }}
{{- if and .Values.discoverer.enabled (eq .Values.discoverer.kind "DaemonSet") }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/vald/templates/discoverer/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if eq .Values.discoverer.kind "Deployment" }}
{{- if and .Values.discoverer.enabled (eq .Values.discoverer.kind "Deployment") }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
2 changes: 2 additions & 0 deletions charts/vald/templates/discoverer/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.discoverer.enabled }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
Expand All @@ -22,3 +23,4 @@ spec:
selector:
matchLabels:
app: {{ .Values.discoverer.name }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/vald/templates/discoverer/priorityclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.discoverer.podPriority.enabled }}
{{- if and .Values.discoverer.enabled .Values.discoverer.podPriority.enabled }}
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/vald/templates/discoverer/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.discoverer.serviceAccount.enabled }}
{{- if and .Values.discoverer.enabled .Values.discoverer.serviceAccount.enabled }}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down
2 changes: 2 additions & 0 deletions charts/vald/templates/discoverer/svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.discoverer.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -37,3 +38,4 @@ spec:
{{- if .Values.discoverer.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.discoverer.externalTrafficPolicy }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/vald/templates/gateway/vald/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.gateway.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down Expand Up @@ -65,3 +66,4 @@ data:
{{- include "vald.grpc.client" $backupClient | nindent 10 }}
egress_filter:
client: null
{{- end }}
2 changes: 1 addition & 1 deletion charts/vald/templates/gateway/vald/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if eq .Values.gateway.kind "DaemonSet" }}
{{- if and .Values.gateway.enabled (eq .Values.gateway.kind "DaemonSet") }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/vald/templates/gateway/vald/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if eq .Values.gateway.kind "Deployment" }}
{{- if and .Values.gateway.enabled (eq .Values.gateway.kind "Deployment") }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/vald/templates/gateway/vald/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.gateway.hpa.enabled }}
{{- if and .Values.gateway.enabled .Values.gateway.hpa.enabled }}
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
Expand Down
3 changes: 1 addition & 2 deletions charts/vald/templates/gateway/vald/ing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

{{- if .Values.gateway.ingress.enabled }}
{{- if and .Values.gateway.enabled .Values.gateway.ingress.enabled }}
apiVersion: networking.k8s.io/v1beta1
# apiVersion: networking.k8s.io/v1
kind: Ingress
Expand Down
2 changes: 2 additions & 0 deletions charts/vald/templates/gateway/vald/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.gateway.enabled }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
Expand All @@ -22,3 +23,4 @@ spec:
selector:
matchLabels:
app: {{ .Values.gateway.name }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/vald/templates/gateway/vald/priorityclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.gateway.podPriority.enabled }}
{{- if and .Values.gateway.enabled .Values.gateway.podPriority.enabled }}
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
Expand Down
2 changes: 2 additions & 0 deletions charts/vald/templates/gateway/vald/svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.gateway.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -37,3 +38,4 @@ spec:
{{- if .Values.gateway.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.gateway.externalTrafficPolicy }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/vald/templates/manager/backup/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.backupManager.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -39,3 +40,4 @@ data:
cassandra_config:
{{- toYaml .Values.backupManager.cassandra.config | nindent 6 }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/vald/templates/manager/backup/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if eq .Values.backupManager.kind "DaemonSet" }}
{{- if and .Values.backupManager.enabled (eq .Values.backupManager.kind "DaemonSet") }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/vald/templates/manager/backup/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if eq .Values.backupManager.kind "Deployment" }}
{{- if and .Values.backupManager.enabled (eq .Values.backupManager.kind "Deployment") }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/vald/templates/manager/backup/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.backupManager.hpa.enabled }}
{{- if and .Values.backupManager.enabled .Values.backupManager.hpa.enabled }}
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
Expand Down
2 changes: 2 additions & 0 deletions charts/vald/templates/manager/backup/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.backupManager.enabled }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
Expand All @@ -22,3 +23,4 @@ spec:
selector:
matchLabels:
app: {{ .Values.backupManager.name }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/vald/templates/manager/backup/priorityclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.backupManager.podPriority.enabled }}
{{- if and .Values.backupManager.enabled .Values.backupManager.podPriority.enabled }}
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
Expand Down
2 changes: 2 additions & 0 deletions charts/vald/templates/manager/backup/svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.backupManager.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -37,3 +38,4 @@ spec:
{{- if .Values.backupManager.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.backupManager.externalTrafficPolicy }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/vald/templates/manager/compressor/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.compressor.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down Expand Up @@ -51,3 +52,4 @@ data:
client:
{{- $compressorClient := dict "Values" .Values.compressor.registerer.compressor.client "default" .Values.defaults.grpc.client }}
{{- include "vald.grpc.client" $compressorClient | nindent 12 }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/vald/templates/manager/compressor/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if eq .Values.compressor.kind "DaemonSet" }}
{{- if and .Values.compressor.enabled (eq .Values.compressor.kind "DaemonSet") }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand Down
Loading