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
356c37c1
Unverified
Commit
356c37c1
authored
Jun 12, 2020
by
Enno Lohmeier
Committed by
GitHub
Jun 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up labels for telegraf/telegraf-ds (#102)
parent
a8103183
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
53 additions
and
30 deletions
+53
-30
Chart.yaml
charts/telegraf-ds/Chart.yaml
+1
-1
_helpers.tpl
charts/telegraf-ds/templates/_helpers.tpl
+17
-0
configmap.yaml
charts/telegraf-ds/templates/configmap.yaml
+1
-4
daemonset.yaml
charts/telegraf-ds/templates/daemonset.yaml
+1
-3
role.yaml
charts/telegraf-ds/templates/role.yaml
+1
-0
rolebinding.yaml
charts/telegraf-ds/templates/rolebinding.yaml
+2
-0
serviceaccount.yaml
charts/telegraf-ds/templates/serviceaccount.yaml
+1
-4
Chart.yaml
charts/telegraf/Chart.yaml
+1
-1
_helpers.tpl
charts/telegraf/templates/_helpers.tpl
+18
-0
configmap.yaml
charts/telegraf/templates/configmap.yaml
+1
-4
deployment.yaml
charts/telegraf/templates/deployment.yaml
+1
-3
role.yaml
charts/telegraf/templates/role.yaml
+3
-0
rolebinding.yaml
charts/telegraf/templates/rolebinding.yaml
+2
-0
service.yaml
charts/telegraf/templates/service.yaml
+2
-6
serviceaccount.yaml
charts/telegraf/templates/serviceaccount.yaml
+1
-4
No files found.
charts/telegraf-ds/Chart.yaml
View file @
356c37c1
apiVersion
:
v1
name
:
telegraf-ds
version
:
1.0.1
1
version
:
1.0.1
2
appVersion
:
1.14
deprecated
:
false
description
:
Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics.
...
...
charts/telegraf-ds/templates/_helpers.tpl
View file @
356c37c1
...
...
@@ -32,6 +32,23 @@ Create chart name and version as used by the chart label.
{{- end -}}
{
{
/*
Common
labels
*/
}
}
{{- define "telegraf.labels" -}}
helm.sh/chart: {{ include "telegraf.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{ include "telegraf.selectorLabels" . }}
{{- end -}}
{
{
/*
Selector
labels
*/
}
}
{{- define "telegraf.selectorLabels" -}}
app.kubernetes.io/name: {{ include "telegraf.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{
{
/*
CUSTOM
TEMPLATES
:
This
section
contains
templates
that
make
up
the
different
parts
of
the
telegraf
configuration
file
.
-
global_tags
section
-
agent
section
...
...
charts/telegraf-ds/templates/configmap.yaml
View file @
356c37c1
...
...
@@ -3,10 +3,7 @@ kind: ConfigMap
metadata
:
name
:
{{
include "telegraf.fullname" .
}}
labels
:
app.kubernetes.io/name
:
{{
include "telegraf.name" .
}}
helm.sh/chart
:
{{
include "telegraf.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
{{
- include "telegraf.labels" . | nindent 4
}}
data
:
telegraf.conf
:
|+
{{ template "global_tags" .Values.config.global_tags }}
...
...
charts/telegraf-ds/templates/daemonset.yaml
View file @
356c37c1
...
...
@@ -3,9 +3,7 @@ kind: DaemonSet
metadata
:
name
:
{{
include "telegraf.fullname" .
}}
labels
:
app.kubernetes.io/name
:
{{
include "telegraf.name" .
}}
helm.sh/chart
:
{{
include "telegraf.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
{{
- include "telegraf.labels" . | nindent 4
}}
spec
:
selector
:
matchLabels
:
...
...
charts/telegraf-ds/templates/role.yaml
View file @
356c37c1
...
...
@@ -5,6 +5,7 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata
:
name
:
influx:stats:viewer
labels
:
{{
- include "telegraf.labels" . | nindent 4
}}
rbac.authorization.k8s.io/aggregate-view-telegraf-stats
:
"
true"
rules
:
-
apiGroups
:
[
"
metrics.k8s.io"
]
...
...
charts/telegraf-ds/templates/rolebinding.yaml
View file @
356c37c1
...
...
@@ -3,6 +3,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind
:
ClusterRoleBinding
metadata
:
name
:
influx:telegraf:viewer
labels
:
{{
- include "telegraf.labels" . | nindent 4
}}
subjects
:
-
kind
:
ServiceAccount
name
:
{{
include "telegraf.fullname" .
}}
...
...
charts/telegraf-ds/templates/serviceaccount.yaml
View file @
356c37c1
...
...
@@ -4,8 +4,5 @@ kind: ServiceAccount
metadata
:
name
:
{{
include "telegraf.serviceAccountName" .
}}
labels
:
app
:
{{
include "telegraf.name" .
}}
chart
:
{{
include "telegraf.chart" .
}}
release
:
{{
.Release.Name
}}
heritage
:
{{
.Release.Service
}}
{{
- include "telegraf.labels" . | nindent 4
}}
{{
- end
}}
charts/telegraf/Chart.yaml
View file @
356c37c1
apiVersion
:
v1
name
:
telegraf
version
:
1.7.1
6
version
:
1.7.1
7
appVersion
:
1.14
deprecated
:
false
description
:
Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics.
...
...
charts/telegraf/templates/_helpers.tpl
View file @
356c37c1
...
...
@@ -32,6 +32,24 @@ Create chart name and version as used by the chart label.
{{- end -}}
{
{
/*
Common
labels
*/
}
}
{{- define "telegraf.labels" -}}
helm.sh/chart: {{ include "telegraf.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{ include "telegraf.selectorLabels" . }}
{{- end -}}
{
{
/*
Selector
labels
*/
}
}
{{- define "telegraf.selectorLabels" -}}
app.kubernetes.io/name: {{ include "telegraf.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{
{
/*
CUSTOM
TEMPLATES
:
This
section
contains
templates
that
make
up
the
different
parts
of
the
telegraf
configuration
file
.
-
global_tags
section
-
agent
section
...
...
charts/telegraf/templates/configmap.yaml
View file @
356c37c1
...
...
@@ -3,10 +3,7 @@ kind: ConfigMap
metadata
:
name
:
{{
include "telegraf.fullname" .
}}
labels
:
app.kubernetes.io/name
:
{{
include "telegraf.name" .
}}
helm.sh/chart
:
{{
include "telegraf.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
{{
- include "telegraf.labels" . | nindent 4
}}
data
:
telegraf.conf
:
|+
{{ template "global_tags" .Values.config.global_tags }}
...
...
charts/telegraf/templates/deployment.yaml
View file @
356c37c1
...
...
@@ -3,9 +3,7 @@ kind: Deployment
metadata
:
name
:
{{
include "telegraf.fullname" .
}}
labels
:
app.kubernetes.io/name
:
{{
include "telegraf.name" .
}}
helm.sh/chart
:
{{
include "telegraf.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
{{
- include "telegraf.labels" . | nindent 4
}}
spec
:
replicas
:
{{
.Values.replicaCount
}}
selector
:
...
...
charts/telegraf/templates/role.yaml
View file @
356c37c1
...
...
@@ -8,6 +8,8 @@ kind: Role
metadata
:
name
:
{{
template "telegraf.fullname" .
}}
namespace
:
{{
.Release.Namespace
}}
labels
:
{{
- include "telegraf.labels" . | nindent 4
}}
rules
:
{{
toYaml .Values.rbac.rules | indent 2
}}
{{
- end
}}
\ No newline at end of file
charts/telegraf/templates/rolebinding.yaml
View file @
356c37c1
...
...
@@ -7,6 +7,8 @@ kind: RoleBinding
{{
- end
}}
metadata
:
name
:
{{
template "telegraf.fullname" .
}}
labels
:
{{
- include "telegraf.labels" . | nindent 4
}}
subjects
:
-
kind
:
ServiceAccount
name
:
{{
template "telegraf.fullname" .
}}
...
...
charts/telegraf/templates/service.yaml
View file @
356c37c1
...
...
@@ -4,10 +4,7 @@ kind: Service
metadata
:
name
:
{{
include "telegraf.fullname" .
}}
labels
:
app.kubernetes.io/name
:
{{
include "telegraf.name" .
}}
helm.sh/chart
:
{{
include "telegraf.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
{{
- include "telegraf.labels" . | nindent 4
}}
{{
- if .Values.service.annotations
}}
annotations
:
{{
toYaml .Values.service.annotations | indent 4
}}
...
...
@@ -66,6 +63,5 @@ spec:
{{
- end -
}}
{{
- end
}}
selector
:
app.kubernetes.io/name
:
{{
include "telegraf.name" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
{{
- include "telegraf.selectorLabels" . | nindent 4
}}
{{
- end -
}}
charts/telegraf/templates/serviceaccount.yaml
View file @
356c37c1
...
...
@@ -4,8 +4,5 @@ kind: ServiceAccount
metadata
:
name
:
{{
template "telegraf.serviceAccountName" .
}}
labels
:
app
:
{{
template "telegraf.name" .
}}
chart
:
{{
template "telegraf.chart" .
}}
release
:
{{
.Release.Name
}}
heritage
:
{{
.Release.Service
}}
{{
- include "telegraf.labels" . | nindent 4
}}
{{
- end
}}
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