Add Controller enable/disable flag in Helm Charts (#2620)

* add controller enablement flag
* throw error if service not found
This commit is contained in:
neha_gupta
2022-11-15 17:56:08 +05:30
committed by GitHub
parent 3b2a86a8c9
commit d2f201b721
10 changed files with 18 additions and 2 deletions
@@ -1,3 +1,4 @@
{{- if or (.Values.controller.enabled) (.Values.influxdb.enabled) }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
@@ -39,3 +40,4 @@ rules:
- get
- list
- watch
{{- end -}}
@@ -1,3 +1,4 @@
{{- if or (.Values.controller.enabled) (.Values.influxdb.enabled) }}
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
@@ -10,3 +11,4 @@ roleRef:
kind: ClusterRole
name: {{ .Release.Name }}-controller
apiGroup: rbac.authorization.k8s.io
{{- end -}}
@@ -1,3 +1,4 @@
{{- if or (.Values.controller.enabled) (.Values.influxdb.enabled) }}
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -93,4 +94,5 @@ spec:
{{- end }}
{{- if .Values.extraCoreComponentPodConfig }}
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
{{- end }}
{{- end }}
{{- end -}}
@@ -1,3 +1,4 @@
{{- if or (.Values.controller.enabled) (.Values.influxdb.enabled) }}
{{- include "fission-role-generator" (merge (dict "namespace" .Values.defaultNamespace "component" "controller") .) }}
{{- if not .Values.singleDefaultNamespace }}
@@ -5,3 +6,4 @@
{{ include "fission-role-generator" (merge (dict "namespace" $namespace "component" "controller") $) }}
{{- end }}
{{- end }}
{{- end -}}
@@ -1,5 +1,7 @@
{{- if or (.Values.controller.enabled) (.Values.influxdb.enabled) }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: fission-controller
namespace: {{ .Release.Namespace }}
{{- end -}}
@@ -1,3 +1,4 @@
{{- if or (.Values.controller.enabled) (.Values.influxdb.enabled) }}
{{- if .Values.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
@@ -19,4 +20,5 @@ spec:
svc: controller
endpoints:
- targetPort: 8080
{{- end -}}
{{- end -}}
@@ -1,3 +1,4 @@
{{- if or (.Values.controller.enabled) (.Values.influxdb.enabled) }}
apiVersion: v1
kind: Service
metadata:
@@ -15,4 +16,5 @@ spec:
nodePort: {{ .Values.controllerPort }}
{{- end }}
selector:
svc: controller
svc: controller
{{- end -}}
+1
View File
@@ -338,6 +338,7 @@ buildermgr:
## It contains CRUD APIs for functions, triggers, environments, Kubernetes event watches, etc. and proxy APIs to internal 3rd-party services.
##
controller:
enabled: false
## Pod resources as:
## resources:
## limits:
+1
View File
@@ -65,6 +65,7 @@ deploy:
kubewatcher.securityContext.enabled: true
webhook.securityContext.enabled: true
storagesvc.securityContext.enabled: true
controller.enabled: false
wait: true
flags:
install: