Fix the analytics jobs in the YAMLs (remove duplicates) (#977)
This commit is contained in:
committed by
Ta-Ching Chen
parent
b9547160b5
commit
a714983c28
@@ -0,0 +1,31 @@
|
|||||||
|
{{ if .Values.analyticsNonHelmInstall }}
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: {{ template "fullname" . }}-{{ .Chart.Version }}-{{ randNumeric 3 }}
|
||||||
|
labels:
|
||||||
|
# The "release" convention makes it easy to tie a release to all of the
|
||||||
|
# Kubernetes resources that were created as part of that release.
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
# This makes it easy to audit chart usage.
|
||||||
|
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||||
|
app: {{ template "name" . }}
|
||||||
|
spec:
|
||||||
|
#ttlSecondsAfterFinished: 120
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
name: {{ template "fullname" . }}
|
||||||
|
labels:
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
app: {{ template "name" . }}
|
||||||
|
annotations:
|
||||||
|
{{- if .Values.enableIstio }}
|
||||||
|
"sidecar.istio.io/inject": "false"
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
restartPolicy: Never
|
||||||
|
containers:
|
||||||
|
- name: post-install-job
|
||||||
|
image: "fission/alpinecurl"
|
||||||
|
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"yaml-post-install\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.sh/analytics || true"]
|
||||||
|
{{ end }}
|
||||||
@@ -91,6 +91,8 @@ persistence:
|
|||||||
## false to disable analytics.
|
## false to disable analytics.
|
||||||
analytics: true
|
analytics: true
|
||||||
|
|
||||||
|
## Internally used for generating an analytics job for non-helm installs
|
||||||
|
analyticsNonHelmInstall: false
|
||||||
|
|
||||||
## Enable Heapster only in clusters where heapster does not exist already
|
## Enable Heapster only in clusters where heapster does not exist already
|
||||||
heapster: false
|
heapster: false
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
{{ if .Values.analyticsNonHelmInstall }}
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: {{ template "fullname" . }}-{{ .Chart.Version }}-{{ randNumeric 3 }}
|
||||||
|
labels:
|
||||||
|
# The "release" convention makes it easy to tie a release to all of the
|
||||||
|
# Kubernetes resources that were created as part of that release.
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
# This makes it easy to audit chart usage.
|
||||||
|
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||||
|
app: {{ template "name" . }}
|
||||||
|
spec:
|
||||||
|
#ttlSecondsAfterFinished: 120
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
name: {{ template "fullname" . }}
|
||||||
|
labels:
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
app: {{ template "name" . }}
|
||||||
|
annotations:
|
||||||
|
{{- if .Values.enableIstio }}
|
||||||
|
"sidecar.istio.io/inject": "false"
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
restartPolicy: Never
|
||||||
|
containers:
|
||||||
|
- name: post-install-job
|
||||||
|
image: "fission/alpinecurl"
|
||||||
|
command: ["sh", "-c", "/usr/bin/curl -m 5 -H \"Content-Type: application/json\" -X POST -d '{\"type\": \"yaml-post-install\", \"chartName\": \"{{ .Chart.Name }}\", \"chartVersion\": \"{{ .Chart.Version }}\"}' https://g.fission.sh/analytics || true"]
|
||||||
|
{{ end }}
|
||||||
@@ -61,6 +61,9 @@ persistence:
|
|||||||
## false to disable analytics.
|
## false to disable analytics.
|
||||||
analytics: true
|
analytics: true
|
||||||
|
|
||||||
|
## Internally used for generating an analytics job for non-helm installs
|
||||||
|
analyticsNonHelmInstall: false
|
||||||
|
|
||||||
## Archive pruner is a garbage collector for archives on the fission storage service.
|
## Archive pruner is a garbage collector for archives on the fission storage service.
|
||||||
## This interval configures the frequency at which it runs inside the storagesvc pod.
|
## This interval configures the frequency at which it runs inside the storagesvc pod.
|
||||||
## The value is in minutes.
|
## The value is in minutes.
|
||||||
|
|||||||
@@ -240,9 +240,9 @@ build_yamls() {
|
|||||||
for c in fission-all fission-core
|
for c in fission-all fission-core
|
||||||
do
|
do
|
||||||
# for minikube and other environment that don't support LoadBalancer
|
# for minikube and other environment that don't support LoadBalancer
|
||||||
helm template ${c} -n ${releaseName} --set serviceType=NodePort,routerServiceType=NodePort > ${c}-${version}-minikube.yaml
|
helm template ${c} -n ${releaseName} --set analytics=false,analyticsNonHelmInstall=true,serviceType=NodePort,routerServiceType=NodePort > ${c}-${version}-minikube.yaml
|
||||||
# for environments that support LoadBalancer
|
# for environments that support LoadBalancer
|
||||||
helm template ${c} -n ${releaseName} > ${c}-${version}.yaml
|
helm template ${c} -n ${releaseName} --set analytics=false,analyticsNonHelmInstall=true > ${c}-${version}.yaml
|
||||||
|
|
||||||
mv *.yaml ${BUILDDIR}/yamls/
|
mv *.yaml ${BUILDDIR}/yamls/
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user