Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
influxdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
influxdb
Commits
4a67a651
Unverified
Commit
4a67a651
authored
Mar 21, 2022
by
alespour
Committed by
GitHub
Mar 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[chronograf] add recommended labels and startupProbe (#444)
* add recommended labels * add startup probe * enable startupProbe by default * bump version * fix legacyLabels check
parent
84bfa4ce
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
81 additions
and
3 deletions
+81
-3
Chart.yaml
charts/chronograf/Chart.yaml
+1
-1
_helpers.tpl
charts/chronograf/templates/_helpers.tpl
+38
-0
deployment.yaml
charts/chronograf/templates/deployment.yaml
+22
-2
ingress.yaml
charts/chronograf/templates/ingress.yaml
+3
-0
pvc.yaml
charts/chronograf/templates/pvc.yaml
+3
-0
secret.yaml
charts/chronograf/templates/secret.yaml
+2
-0
service.yaml
charts/chronograf/templates/service.yaml
+6
-0
values.yaml
charts/chronograf/values.yaml
+6
-0
No files found.
charts/chronograf/Chart.yaml
View file @
4a67a651
apiVersion
:
v1
name
:
chronograf
version
:
1.2.
3
version
:
1.2.
4
appVersion
:
1.9.3
description
:
Open-source web application written in Go and React.js that provides
the tools to visualize your monitoring data and easily create alerting and automation
...
...
charts/chronograf/templates/_helpers.tpl
View file @
4a67a651
...
...
@@ -14,3 +14,41 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{
{
/*
Create
chart
name
and
version
as
used
by
the
chart
label
.
*/
}
}
{{- define "chronograf.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{
{
/*
Common
labels
*/
}
}
{{- define "chronograf.labels" -}}
helm.sh/chart: {{ include "chronograf.chart" . }}
{{ include "chronograf.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{
{
/*
Selector
labels
*/
}
}
{{- define "chronograf.selectorLabels" -}}
app.kubernetes.io/name: {{ include "chronograf.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{
{
/*
Legacy
labels
check
*/
}
}
{{- define "chronograf.legacyLabels" -}}
{{- if (hasKey .Values "legacyLabels") -}}
{{ .Values.legacyLabels }}
{{- else -}}
{{ true }}
{{- end -}}
{{- end -}}
charts/chronograf/templates/deployment.yaml
View file @
4a67a651
...
...
@@ -3,10 +3,13 @@ kind: Deployment
metadata
:
name
:
{{
template "chronograf.fullname" .
}}
labels
:
{{
- if eq "true" (include "chronograf.legacyLabels" .)
}}
app
:
{{
template "chronograf.fullname" .
}}
chart
:
"
{{
.Chart.Name
}}-{{
.Chart.Version
}}"
release
:
"
{{
.Release.Name
}}"
heritage
:
"
{{
.Release.Service
}}"
{{
- end
}}
{{
- include "chronograf.labels" . | nindent 4
}}
spec
:
replicas
:
{{
.Values.service.replicas
}}
strategy
:
...
...
@@ -16,11 +19,17 @@ spec:
{{
- end
}}
selector
:
matchLabels
:
{{
- if eq "true" (include "chronograf.legacyLabels" .)
}}
app
:
{{
template "chronograf.fullname" .
}}
{{
- end
}}
{{
- include "chronograf.selectorLabels" . | nindent 6
}}
template
:
metadata
:
labels
:
{{
- if eq "true" (include "chronograf.legacyLabels" .)
}}
app
:
{{
template "chronograf.fullname" .
}}
{{
- end
}}
{{
- include "chronograf.selectorLabels" . | nindent 8
}}
spec
:
containers
:
-
name
:
{{
.Chart.Name
}}
...
...
@@ -179,7 +188,7 @@ spec:
path
:
{{
.Values.env.BASE_PATH
}}
/ping
{{
- else
}}
path
:
/ping
{{
- end
}}
{{
- end
}}
port
:
api
readinessProbe
:
httpGet
:
...
...
@@ -187,8 +196,19 @@ spec:
path
:
{{
.Values.env.BASE_PATH
}}
/ping
{{
- else
}}
path
:
/ping
{{
- end
}}
{{
- end
}}
port
:
api
{{
- if .Values.startupProbe.enabled
}}
startupProbe
:
httpGet
:
{{
- if .Values.env.BASE_PATH
}}
path
:
{{
.Values.env.BASE_PATH
}}
/ping
{{
- else
}}
path
:
/ping
{{
- end
}}
port
:
api
initialDelaySeconds
:
{{
.Values.startupProbe.initialDelaySeconds | default 5
}}
{{
- end
}}
volumeMounts
:
-
name
:
data
mountPath
:
/var/lib/chronograf
...
...
charts/chronograf/templates/ingress.yaml
View file @
4a67a651
...
...
@@ -8,10 +8,13 @@ kind: Ingress
metadata
:
name
:
{{
template "chronograf.fullname" .
}}
labels
:
{{
- if eq "true" (include "chronograf.legacyLabels" .)
}}
app
:
{{
template "chronograf.fullname" .
}}
chart
:
"
{{
.Chart.Name
}}-{{
.Chart.Version
}}"
release
:
"
{{
.Release.Name
}}"
heritage
:
"
{{
.Release.Service
}}"
{{
- end
}}
{{
- include "chronograf.labels" . | nindent 4
}}
annotations
:
{{
toYaml .Values.ingress.annotations | indent 4
}}
spec
:
...
...
charts/chronograf/templates/pvc.yaml
View file @
4a67a651
...
...
@@ -4,10 +4,13 @@ kind: PersistentVolumeClaim
metadata
:
name
:
{{
template "chronograf.fullname" .
}}
labels
:
{{
- if eq "true" (include "chronograf.legacyLabels" .)
}}
app
:
{{
template "chronograf.fullname" .
}}
chart
:
"
{{
.Chart.Name
}}-{{
.Chart.Version
}}"
release
:
"
{{
.Release.Name
}}"
heritage
:
"
{{
.Release.Service
}}"
{{
- end
}}
{{
- include "chronograf.labels" . | nindent 4
}}
annotations
:
{{
- if .Values.persistence.keepPvc
}}
"
helm.sh/resource-policy"
:
keep
...
...
charts/chronograf/templates/secret.yaml
View file @
4a67a651
...
...
@@ -3,6 +3,8 @@ apiVersion: v1
kind
:
Secret
metadata
:
name
:
{{
template "chronograf.fullname" .
}}
labels
:
{{
- include "chronograf.labels" . | nindent 4
}}
type
:
Opaque
data
:
token_secret
:
{{
.Values.oauth.token_secret | b64enc | quote
}}
...
...
charts/chronograf/templates/service.yaml
View file @
4a67a651
...
...
@@ -3,14 +3,20 @@ kind: Service
metadata
:
name
:
{{
template "chronograf.fullname" .
}}
labels
:
{{
- if eq "true" (include "chronograf.legacyLabels" .)
}}
app
:
{{
template "chronograf.fullname" .
}}
chart
:
"
{{
.Chart.Name
}}-{{
.Chart.Version
}}"
release
:
"
{{
.Release.Name
}}"
heritage
:
"
{{
.Release.Service
}}"
{{
- end
}}
{{
- include "chronograf.labels" . | nindent 4
}}
spec
:
type
:
{{
.Values.service.type
}}
ports
:
-
port
:
80
targetPort
:
8888
selector
:
{{
- if eq "true" (include "chronograf.legacyLabels" .)
}}
app
:
{{
template "chronograf.fullname" .
}}
{{
- end
}}
{{
- include "chronograf.selectorLabels" . | nindent 4
}}
charts/chronograf/values.yaml
View file @
4a67a651
...
...
@@ -57,6 +57,12 @@ tolerations: []
##
affinity
:
{}
## Customize probes
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
##
startupProbe
:
enabled
:
true
## Configure the ingress object to hook into existing infastructure
## ref : http://kubernetes.io/docs/user-guide/ingress/
## OPTIONALLY you can set .Values.ingress.secretName to set which secret to use
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment