Skip to content

Commit 90cb5f8

Browse files
committed
chore(charts): update to use template for new api versions
Signed-off-by: Cryptophobia <aouzounov@gmail.com>
1 parent d4c9b4e commit 90cb5f8

9 files changed

Lines changed: 44 additions & 14 deletions

File tree

charts/monitor/Chart.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: monitor
22
home: https://github.com/teamhephy/monitor
33
version: <Will be populated by the ci before publishing the chart>
4-
description: Monitoring for Deis Workflow.
4+
description: Monitoring for Hephy Workflow.
55
maintainers:
6-
- name: Deis Team
7-
email: engineering@deis.com
6+
- email: team@teamhephy.com
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: grafana
22
home: https://github.com/teamhephy/monitor/tree/master/grafana
33
version: <Will be populated by the ci before publishing the chart>
4-
description: Monitoring for Deis Workflow.
4+
description: Monitoring for Hephy Workflow.
55
maintainers:
6-
- name: Deis Team
7-
email: engineering@deis.com
6+
- email: team@teamhephy.com

charts/monitor/charts/grafana/templates/_helpers.tmpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,12 @@ extensions/v1beta1
77
apps/v1
88
{{- end -}}
99
{{- end -}}
10+
{{- define "APIVersion" -}}
11+
{{- if .Capabilities.APIVersions.Has "apps/v1" -}}
12+
apps/v1
13+
{{- else if .Capabilities.APIVersions.Has "extensions/v1beta1" -}}
14+
extensions/v1beta1
15+
{{- else -}}
16+
apps/v1
17+
{{- end -}}
18+
{{- end -}}
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: influxdb
22
home: https://github.com/teamhephy/monitor/tree/master/influxdb
33
version: <Will be populated by the ci before publishing the chart>
4-
description: Monitoring for Deis Workflow.
4+
description: Monitoring for Hephy Workflow.
55
maintainers:
6-
- name: Deis Team
7-
email: engineering@deis.com
6+
- email: team@teamhephy.com

charts/monitor/charts/influxdb/templates/_helpers.tmpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,12 @@ extensions/v1beta1
77
apps/v1
88
{{- end -}}
99
{{- end -}}
10+
{{- define "APIVersion" -}}
11+
{{- if .Capabilities.APIVersions.Has "apps/v1" -}}
12+
apps/v1
13+
{{- else if .Capabilities.APIVersions.Has "extensions/v1beta1" -}}
14+
extensions/v1beta1
15+
{{- else -}}
16+
apps/v1
17+
{{- end -}}
18+
{{- end -}}

charts/monitor/charts/telegraf/Chart.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ home: https://github.com/teamhephy/monitor/tree/master/telegraf
33
version: <Will be populated by the ci before publishing the chart>
44
description: Monitoring for Deis Workflow.
55
maintainers:
6-
- name: Deis Team
7-
email: engineering@deis.com
6+
- email: team@teamhephy.com

charts/monitor/charts/telegraf/templates/_helpers.tmpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,12 @@ extensions/v1beta1
77
apps/v1
88
{{- end -}}
99
{{- end -}}
10+
{{- define "APIVersion" -}}
11+
{{- if .Capabilities.APIVersions.Has "apps/v1" -}}
12+
apps/v1
13+
{{- else if .Capabilities.APIVersions.Has "extensions/v1beta1" -}}
14+
extensions/v1beta1
15+
{{- else -}}
16+
apps/v1
17+
{{- end -}}
18+
{{- end -}}

charts/monitor/charts/telegraf/templates/monitor-telegraf-daemon.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ kind: DaemonSet
33
metadata:
44
name: deis-monitor-telegraf
55
labels:
6+
app: deis-monitor-telegraf
67
heritage: deis
78
annotations:
89
component.deis.io/version: {{ .Values.docker_tag }}
@@ -14,12 +15,9 @@ spec:
1415
selector:
1516
matchLabels:
1617
app: deis-monitor-telegraf
17-
heritage: deis
1818
template:
1919
metadata:
20-
name: deis-monitor-telegraf
2120
labels:
22-
heritage: deis
2321
app: deis-monitor-telegraf
2422
spec:
2523
serviceAccount: deis-monitor-telegraf

charts/monitor/templates/_helpers.tmpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,12 @@ rbac.authorization.k8s.io/v1alpha1
1010
rbac.authorization.k8s.io/v1
1111
{{- end -}}
1212
{{- end -}}
13+
{{- define "APIVersion" -}}
14+
{{- if .Capabilities.APIVersions.Has "apps/v1" -}}
15+
apps/v1
16+
{{- else if .Capabilities.APIVersions.Has "extensions/v1beta1" -}}
17+
extensions/v1beta1
18+
{{- else -}}
19+
apps/v1
20+
{{- end -}}
21+
{{- end -}}

0 commit comments

Comments
 (0)