Unverified Commit caca98b4 authored by alespour's avatar alespour Committed by GitHub

Support Kubernetes 1.22+ (#405)

* test with v1.22+ kubernetes * feat: use v1 APIs when available * customize job name * bump version * use more readable matrix style * use latest v1.22 image * bump versions * bump version
parent 6fbbae85
......@@ -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/kind-action@v1.2.0 (kubernetes-sigs/kind@0.11.1)
- v1.22.4
name: lint-test (k8s ${{ matrix.node_image_version }})
steps:
- name: Checkout
uses: actions/checkout@v2
......@@ -38,12 +44,14 @@ jobs:
- name: Create kind cluster
uses: helm/kind-action@v1.2.0
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}
......@@ -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:
......
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
......
{{- 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" . }}
......@@ -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 -}}
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:
......
{{- 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
......
{{- 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
......
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: rawkode@influxdata.com
......
{{- 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 }}
......
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.
......
{{- 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" . }}
......
{{- 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" . }}
......
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:
......
{{- 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" . }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment