[helm chart] Remove prometheus chart dependency from Fission (#2371)
* Removing Prometheus dependency from fission chart * User should install their own Prometheus installation * Install Prometheus chart in Github CI workflow * Change Prometheus query logging to debug Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -74,9 +74,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
helm lint charts/fission-all/
|
helm lint charts/fission-all/
|
||||||
|
|
||||||
- name: Helm update
|
|
||||||
run: helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
|
|
||||||
|
|
||||||
- name: Install Skaffold
|
- name: Install Skaffold
|
||||||
run: |
|
run: |
|
||||||
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
|
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
|
||||||
@@ -88,6 +85,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
install-only: true
|
install-only: true
|
||||||
|
|
||||||
|
- name: Setup Prometheus Stack
|
||||||
|
run: |
|
||||||
|
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
|
||||||
|
helm repo update
|
||||||
|
kubectl create ns monitoring
|
||||||
|
helm install monitoring prometheus-community/prometheus -n monitoring
|
||||||
|
|
||||||
- name: Build and Install Fission
|
- name: Build and Install Fission
|
||||||
run: |
|
run: |
|
||||||
kubectl create ns fission
|
kubectl create ns fission
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
dependencies:
|
|
||||||
- name: prometheus
|
|
||||||
repository: https://prometheus-community.github.io/helm-charts
|
|
||||||
version: 14.11.0
|
|
||||||
digest: sha256:1404b25cbdba70279240fead15b765d6945097fed5afc7e184da02dabfaa577a
|
|
||||||
generated: "2021-10-19T17:20:08.919609+05:30"
|
|
||||||
@@ -22,8 +22,3 @@ maintainers:
|
|||||||
email: sanket@infracloud.io
|
email: sanket@infracloud.io
|
||||||
engine: gotpl
|
engine: gotpl
|
||||||
type: application
|
type: application
|
||||||
dependencies:
|
|
||||||
- name: prometheus
|
|
||||||
version: 14.11.0
|
|
||||||
repository: https://prometheus-community.github.io/helm-charts
|
|
||||||
condition: prometheus.enabled
|
|
||||||
|
|||||||
@@ -93,6 +93,12 @@ _See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documen
|
|||||||
|
|
||||||
A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions.
|
A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions.
|
||||||
|
|
||||||
|
### Upgrade from 1.15.x to 1.16.x
|
||||||
|
|
||||||
|
If you have been using `prometheus.enabled=true` in your fission-all chart, you will need to deploy the prometheus using prometheus community supported chart.
|
||||||
|
We have removed prometheus dependency from fission-all chart.
|
||||||
|
We would recommend [prometheus-community/prometheus](https://artifacthub.io/packages/helm/prometheus-community/prometheus) or [prometheus-community/kube-prometheus-stack](https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack) chart.
|
||||||
|
|
||||||
### Upgrade from 1.14.x to 1.15.x
|
### Upgrade from 1.14.x to 1.15.x
|
||||||
|
|
||||||
With 1.15.x release, following changes are made:
|
With 1.15.x release, following changes are made:
|
||||||
@@ -129,4 +135,4 @@ You may also `helm show values` on this chart's [dependencies](#dependencies) fo
|
|||||||
|
|
||||||
### Multiple releases
|
### Multiple releases
|
||||||
|
|
||||||
The same chart can be used to run multiple Fission instances in the same cluster if required. To disable a dependency during installation, set `prometheus.enabled` to `false`.
|
The same chart can be used to run multiple Fission instances in the same cluster if required.
|
||||||
|
|||||||
@@ -25,11 +25,7 @@ controller/config.go
|
|||||||
{{- define "config" -}}
|
{{- define "config" -}}
|
||||||
canary:
|
canary:
|
||||||
enabled: {{ .Values.canaryDeployment.enabled }}
|
enabled: {{ .Values.canaryDeployment.enabled }}
|
||||||
{{- if .Values.prometheus.enabled }}
|
|
||||||
prometheusSvc: "http://{{ .Release.Name }}-prometheus-server.{{ .Release.Namespace }}"
|
|
||||||
{{- else }}
|
|
||||||
prometheusSvc: {{ .Values.prometheus.serviceEndpoint | default "" | quote }}
|
prometheusSvc: {{ .Values.prometheus.serviceEndpoint | default "" | quote }}
|
||||||
{{- end }}
|
|
||||||
{{- printf "\n" -}}
|
{{- printf "\n" -}}
|
||||||
auth:
|
auth:
|
||||||
enabled: {{ .Values.authentication.enabled | default false }}
|
enabled: {{ .Values.authentication.enabled | default false }}
|
||||||
|
|||||||
@@ -551,15 +551,12 @@ postInstallReportImage: fission/reporter
|
|||||||
##
|
##
|
||||||
debugEnv: false
|
debugEnv: false
|
||||||
|
|
||||||
## Prometheus for scrapping service metrics
|
## Prometheus related configuration to query metrics
|
||||||
##
|
##
|
||||||
prometheus:
|
prometheus:
|
||||||
## set this flag to true if prometheus needs to be deployed along with fission
|
## please assign the prometheus service URL
|
||||||
##
|
## that is accessible by Fission components.
|
||||||
enabled: false
|
## This is mainly used to enable canary deployment.
|
||||||
|
|
||||||
## If enabled is false, please assign the prometheus service URL
|
|
||||||
## that is accessible by components.
|
|
||||||
##
|
##
|
||||||
serviceEndpoint: ""
|
serviceEndpoint: ""
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ build_yamls() {
|
|||||||
$command >${c}-"${version}".yaml
|
$command >${c}-"${version}".yaml
|
||||||
|
|
||||||
# for OpenShift
|
# for OpenShift
|
||||||
command="$cmdprefix --set analytics=false,analyticsNonHelmInstall=true,logger.enableSecurityContext=true,prometheus.enabled=false"
|
command="$cmdprefix --set analytics=false,analyticsNonHelmInstall=true,logger.enableSecurityContext=true"
|
||||||
echo "$command"
|
echo "$command"
|
||||||
$command >${c}-"${version}"-openshift.yaml
|
$command >${c}-"${version}"-openshift.yaml
|
||||||
|
|
||||||
|
|||||||
@@ -138,8 +138,7 @@ func (promApiClient *PrometheusApiClient) GetTotalFailedRequestsToFuncInWindow(f
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (promApiClient *PrometheusApiClient) executeQuery(queryString string) (float64, error) {
|
func (promApiClient *PrometheusApiClient) executeQuery(queryString string) (float64, error) {
|
||||||
// TODO: Change to debug level once we have a better understanding of what is happening
|
promApiClient.logger.Debug("executing prometheus query", zap.String("query", queryString))
|
||||||
promApiClient.logger.Info("prometheus executing query", zap.String("query", queryString))
|
|
||||||
|
|
||||||
val, warn, err := promApiClient.client.Query(context.Background(), queryString, time.Now())
|
val, warn, err := promApiClient.client.Query(context.Background(), queryString, time.Now())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
+4
-4
@@ -43,7 +43,6 @@ deploy:
|
|||||||
preUpgradeChecks.imageTag: ""
|
preUpgradeChecks.imageTag: ""
|
||||||
namespace: fission
|
namespace: fission
|
||||||
pprof.enabled: false
|
pprof.enabled: false
|
||||||
prometheus.enabled: false
|
|
||||||
canaryDeployment.enabled: false
|
canaryDeployment.enabled: false
|
||||||
nats.enabled: false
|
nats.enabled: false
|
||||||
influxdb.enabled: false
|
influxdb.enabled: false
|
||||||
@@ -53,6 +52,7 @@ deploy:
|
|||||||
openTracing.enabled: false
|
openTracing.enabled: false
|
||||||
openTelemetry.otlpCollectorEndpoint: ""
|
openTelemetry.otlpCollectorEndpoint: ""
|
||||||
openTelemetry.otlpInsecure: true
|
openTelemetry.otlpInsecure: true
|
||||||
|
prometheus.serviceEndpoint: ""
|
||||||
priorityClassName: system-cluster-critical
|
priorityClassName: system-cluster-critical
|
||||||
# Use /var/log directory for kind logs export
|
# Use /var/log directory for kind logs export
|
||||||
terminationMessagePath: /var/log/termination-log
|
terminationMessagePath: /var/log/termination-log
|
||||||
@@ -102,15 +102,15 @@ profiles:
|
|||||||
- op: replace
|
- op: replace
|
||||||
path: /deploy/helm/releases/0/setValues/routerServiceType
|
path: /deploy/helm/releases/0/setValues/routerServiceType
|
||||||
value: NodePort
|
value: NodePort
|
||||||
- op: replace
|
|
||||||
path: /deploy/helm/releases/0/setValues/prometheus.enabled
|
|
||||||
value: true
|
|
||||||
- op: replace
|
- op: replace
|
||||||
path: /deploy/helm/releases/0/setValues/influxdb.enabled
|
path: /deploy/helm/releases/0/setValues/influxdb.enabled
|
||||||
value: true
|
value: true
|
||||||
- op: replace
|
- op: replace
|
||||||
path: /deploy/helm/releases/0/setValues/canaryDeployment.enabled
|
path: /deploy/helm/releases/0/setValues/canaryDeployment.enabled
|
||||||
value: true
|
value: true
|
||||||
|
- op: replace
|
||||||
|
path: /deploy/helm/releases/0/setValues/prometheus.serviceEndpoint
|
||||||
|
value: "http://monitoring-prometheus-server.monitoring.svc.cluster.local"
|
||||||
- name: kind-opentelemetry
|
- name: kind-opentelemetry
|
||||||
patches:
|
patches:
|
||||||
- op: replace
|
- op: replace
|
||||||
|
|||||||
Reference in New Issue
Block a user