[prometheus-cloudwatch-exporter] Upgrade api versions (#17764)

Signed-off-by: Adam Graves <adam.graves85@gmail.com>
This commit is contained in:
Adam Graves
2019-11-01 18:35:40 -07:00
committed by Kubernetes Prow Robot
parent 859827a707
commit 7693fe1b29
7 changed files with 42 additions and 5 deletions
@@ -7,6 +7,10 @@ numbering uses [semantic versioning](http://semver.org).
NOTE: The change log until version 0.4.10 is auto generated based on git commits. Those include a reference to the git commit to be able to get more details.
## 0.5.0
Update Ingress and Deployment apiVersions for k8s 1.16 support
## 0.4.12
Updated cloudwatch-exporter version to [0.6.0](https://github.com/prometheus/cloudwatch_exporter/releases/tag/cloudwatch_exporter-0.6.0)
@@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "0.6.0"
description: A Helm chart for prometheus cloudwatch-exporter
name: prometheus-cloudwatch-exporter
version: 0.4.13
version: 0.5.0
home: https://github.com/prometheus/cloudwatch_exporter
sources:
- https://github.com/prometheus/cloudwatch_exporter
@@ -30,3 +30,36 @@ Create chart name and version as used by the chart label.
{{- define "prometheus-cloudwatch-exporter.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Return the appropriate apiVersion for deployment.
*/}}
{{- define "deployment.apiVersion" -}}
{{- if semverCompare "<1.9-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "apps/v1beta2" -}}
{{- else -}}
{{- print "apps/v1" -}}
{{- end -}}
{{- end -}}
{{/*
Return the appropriate apiVersion for rbac.
*/}}
{{- define "rbac.apiVersion" -}}
{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" }}
{{- print "rbac.authorization.k8s.io/v1" -}}
{{- else -}}
{{- print "rbac.authorization.k8s.io/v1beta1" -}}
{{- end -}}
{{- end -}}
{{/*
Return the appropriate apiVersion for ingress.
*/}}
{{- define "ingress.apiVersion" -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
{{- print "networking.k8s.io/v1beta1" -}}
{{- else -}}
{{- print "extensions/v1beta1" -}}
{{- end -}}
{{- end -}}
@@ -1,5 +1,5 @@
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: {{ template "rbac.apiVersion" . }}
kind: ClusterRole
metadata:
name: {{ template "prometheus-cloudwatch-exporter.fullname" . }}
@@ -1,5 +1,5 @@
{{ if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: {{ template "rbac.apiVersion" . }}
kind: ClusterRoleBinding
metadata:
name: {{ template "prometheus-cloudwatch-exporter.fullname" . }}
@@ -1,4 +1,4 @@
apiVersion: apps/v1beta2
apiVersion: {{ template "deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "prometheus-cloudwatch-exporter.fullname" . }}
@@ -2,7 +2,7 @@
{{- $fullName := include "prometheus-cloudwatch-exporter.fullname" . -}}
{{- $servicePort := .Values.service.port -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
apiVersion: {{ template "ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ $fullName }}