Feature flag to enable/disable canary + optional prometheus install (#937)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
dependencies:
|
||||
- name: prometheus
|
||||
version: 7.1.0
|
||||
repository: https://kubernetes-charts.storage.googleapis.com
|
||||
repository: https://kubernetes-charts.storage.googleapis.com
|
||||
condition: prometheusDeploy
|
||||
@@ -14,3 +14,20 @@ We truncate at 24 chars because some Kubernetes name fields are limited to this
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 24 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
This is a template with config parameters for optional features in fission. This gets mounted on to the controller pod
|
||||
as a config map.
|
||||
To add new features with config parameters, create a yaml block below with the feature name and define a corresponding struct in
|
||||
controller/config.go
|
||||
*/}}
|
||||
{{- define "config" -}}
|
||||
canary:
|
||||
enabled: {{ .Values.canaryDeployment.enabled }}
|
||||
{{- if .Values.prometheusDeploy }}
|
||||
prometheusSvc: "http://{{ .Release.Name }}-prometheus-server.{{ .Release.Namespace }}"
|
||||
{{- end }}
|
||||
{{- printf "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
@@ -103,6 +103,15 @@ metadata:
|
||||
name: fission-builder
|
||||
namespace: {{ .Values.builderNamespace }}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: feature-config
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
"config.yaml": {{ include "config" . | b64enc }}
|
||||
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
@@ -123,7 +132,7 @@ spec:
|
||||
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
imagePullPolicy: {{ .Values.pullPolicy }}
|
||||
command: ["/fission-bundle"]
|
||||
args: ["--controllerPort", "8888", "--prometheusSvc", "http://{{ .Release.Name }}-prometheus-server.{{ .Release.Namespace }}"]
|
||||
args: ["--controllerPort", "8888"]
|
||||
env:
|
||||
- name: FISSION_FUNCTION_NAMESPACE
|
||||
value: "{{ .Values.functionNamespace }}"
|
||||
@@ -144,8 +153,15 @@ spec:
|
||||
port: 8888
|
||||
initialDelaySeconds: 35
|
||||
periodSeconds: 5
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/config/config.yaml
|
||||
subPath: config.yaml
|
||||
serviceAccount: fission-svc
|
||||
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: feature-config
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
|
||||
@@ -106,3 +106,10 @@ preUpgradeChecksImage: fission/pre-upgrade-checks
|
||||
## if there are any pod specialization errors when a function is triggered and this flag is set to true, the error
|
||||
## summary is returned as part of http response
|
||||
debugEnv: true
|
||||
|
||||
## set this flag to true if prometheus needs to be deployed along with fission
|
||||
prometheusDeploy: true
|
||||
|
||||
## set this flag to false if you dont need canary deployment feature
|
||||
canaryDeployment:
|
||||
enabled: true
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
dependencies:
|
||||
- name: prometheus
|
||||
version: 7.1.0
|
||||
repository: https://kubernetes-charts.storage.googleapis.com
|
||||
repository: https://kubernetes-charts.storage.googleapis.com
|
||||
condition: prometheusDeploy
|
||||
@@ -14,3 +14,18 @@ We truncate at 24 chars because some Kubernetes name fields are limited to this
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 24 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
This is a template with config parameters for optional features in fission. This gets mounted on to the controller pod
|
||||
as a config map.
|
||||
To add new features with config parameters, create a yaml block below with the feature name and define a corresponding struct in
|
||||
controller/config.go
|
||||
*/}}
|
||||
{{- define "config" -}}
|
||||
canary:
|
||||
enabled: {{ .Values.canaryDeployment.enabled }}
|
||||
{{- if .Values.prometheusDeploy }}
|
||||
prometheusSvc: "http://{{ .Release.Name }}-prometheus-server.{{ .Release.Namespace }}"
|
||||
{{- end }}
|
||||
{{- printf "\n" -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -103,6 +103,15 @@ metadata:
|
||||
name: fission-builder
|
||||
namespace: {{ .Values.builderNamespace }}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: feature-config
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
"config.yaml": {{ include "config" . | b64enc }}
|
||||
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
@@ -144,7 +153,15 @@ spec:
|
||||
port: 8888
|
||||
initialDelaySeconds: 35
|
||||
periodSeconds: 5
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/config/config.yaml
|
||||
subPath: config.yaml
|
||||
serviceAccount: fission-svc
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: feature-config
|
||||
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
|
||||
@@ -71,4 +71,11 @@ preUpgradeChecksImage: fission/pre-upgrade-checks
|
||||
|
||||
## if there are any pod specialization errors when a function is triggered and this flag is set to true, the error
|
||||
## summary is returned as part of http response
|
||||
debugEnv: true
|
||||
debugEnv: true
|
||||
|
||||
## set this flag to true if prometheus needs to be deployed along with fission
|
||||
prometheusDeploy: true
|
||||
|
||||
## set this flag to false if you dont need canary deployment feature
|
||||
canaryDeployment:
|
||||
enabled: true
|
||||
Reference in New Issue
Block a user