Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support v1.22+ k8s #15

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/helm-charts-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on: pull_request
jobs:
lint-test:
runs-on: ubuntu-latest
strategy:
matrix:
node_image_version:
- v1.21.1 # default used by helm/[email protected] (kubernetes-sigs/[email protected])
- v1.22.4
name: lint-test (k8s ${{ matrix.node_image_version }})
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -38,12 +44,14 @@ jobs:

- name: Create kind cluster
uses: helm/[email protected]
with:
node_image: kindest/node:${{ matrix.node_image_version }}
if: steps.list-changed.outputs.changed == 'true'

# Our Enterprise chart requires some resources created
- name: Create Enterprise Test Resources
run: |
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.15.1/cert-manager.yaml
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.5.4/cert-manager.yaml
sleep 30 # wait for CertManager
kubectl apply -f ./charts/influxdb-enterprise/example-resources.yaml
kubectl create secret generic influxdb-license --from-literal=INFLUXDB_ENTERPRISE_LICENSE_KEY=${INFLUXDB_ENTERPRISE_LICENSE_KEY}
Expand All @@ -53,7 +61,6 @@ jobs:

- name: Run chart-testing (install)
run: ct install --namespace=default

# When https://github.com/helm/chart-testing/issues/212 is fixed, this can be used to set the license key instead of using env from secret
# run: ct install --namespace=default --helm-extra-args="--set license.key=${INFLUXDB_ENTERPRISE_LICENSE_KEY}"
# env:
Expand Down
2 changes: 1 addition & 1 deletion charts/chronograf/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: chronograf
version: 1.2.1
version: 1.2.2
appVersion: 1.9.1
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
Expand Down
14 changes: 14 additions & 0 deletions charts/chronograf/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{{- if .Values.ingress.enabled -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
apiVersion: networking.k8s.io/v1
{{- else }}
apiVersion: networking.k8s.io/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ template "chronograf.fullname" . }}
Expand All @@ -25,7 +29,17 @@ spec:
http:
paths:
- path: {{ .Values.ingress.path }}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
pathType: Prefix
{{- end }}
backend:
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
service:
name: {{ include "chronograf.fullname" . }}
port:
number: 80
{{- else }}
serviceName: {{ template "chronograf.fullname" . }}
servicePort: 80
{{- end }}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/influxdb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: influxdb
version: 4.10.5
version: 4.10.6
appVersion: 1.8.10
description: Scalable datastore for metrics, events, and real-time analytics.
keywords:
Expand Down
4 changes: 4 additions & 0 deletions charts/influxdb/templates/backup-cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{{- if .Values.backup.enabled }}
{{- if .Capabilities.APIVersions.Has "batch/v1" }}
apiVersion: batch/v1
{{- else }}
apiVersion: batch/v1beta1
{{- end }}
kind: CronJob
metadata:
name: {{ include "influxdb.fullname" . }}-backup
Expand Down
4 changes: 4 additions & 0 deletions charts/influxdb/templates/backup-retention-cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{{- if .Values.backupRetention.enabled }}
{{- if .Capabilities.APIVersions.Has "batch/v1" }}
apiVersion: batch/v1
{{- else }}
apiVersion: batch/v1beta1
{{- end }}
kind: CronJob
metadata:
name: {{ include "influxdb.fullname" . }}-backup-retention
Expand Down
3 changes: 1 addition & 2 deletions charts/influxdb2/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
apiVersion: v2
appVersion: 2.1.1

name: influxdb2
description: A Helm chart for InfluxDB v2
home: https://www.influxdata.com/products/influxdb/
type: application
version: 2.0.8
version: 2.0.9
maintainers:
- name: rawkode
email: [email protected]
Expand Down
6 changes: 5 additions & 1 deletion charts/influxdb2/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{{- if .Values.pdb.create }}
{{- if .Capabilities.APIVersions.Has "policy/v1" }}
apiVersion: policy/v1
{{- else }}
apiVersion: policy/v1beta1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ template "influxdb.fullname" . }}
labels:
{{ include "influxdb.labels" . | nindent 4 }}
{{- include "influxdb.labels" . | nindent 4 }}
spec:
{{- if .Values.pdb.minAvailable }}
minAvailable: {{ .Values.pdb.minAvailable }}
Expand Down
2 changes: 1 addition & 1 deletion charts/kapacitor/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: kapacitor
version: 1.4.2
version: 1.4.3
appVersion: 1.6.3
description: InfluxDB's native data processing engine. It can process both stream
and batch data from InfluxDB.
Expand Down
4 changes: 4 additions & 0 deletions charts/kapacitor/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{{- if and .Values.rbac.create .Values.rbac.namespaced -}}
{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" }}
apiVersion: rbac.authorization.k8s.io/v1
{{- else }}
apiVersion: rbac.authorization.k8s.io/v1beta1
{{- end }}
kind: Role
metadata:
name: {{ template "kapacitor.fullname" . }}
Expand Down
4 changes: 4 additions & 0 deletions charts/kapacitor/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{{- if and .Values.rbac.create .Values.rbac.namespaced -}}
{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" }}
apiVersion: rbac.authorization.k8s.io/v1
{{- else }}
apiVersion: rbac.authorization.k8s.io/v1beta1
{{- end }}
kind: RoleBinding
metadata:
name: {{ template "kapacitor.fullname" . }}
Expand Down
4 changes: 2 additions & 2 deletions charts/telegraf/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: telegraf
version: 1.8.13
appVersion: 1.21.2
version: 1.8.14
appVersion: 1.21.3
deprecated: false
description: Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics.
keywords:
Expand Down
4 changes: 4 additions & 0 deletions charts/telegraf/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{{- if .Values.pdb.create }}
{{- if .Capabilities.APIVersions.Has "policy/v1" }}
apiVersion: policy/v1
{{- else }}
apiVersion: policy/v1beta1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ include "telegraf.fullname" . }}
Expand Down