Skip to content

Commit

Permalink
fix: Automatically manage CRDs through Helm deployments (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkerkhove authored Apr 14, 2021
1 parent 6a83ac8 commit b3ad4da
Show file tree
Hide file tree
Showing 11 changed files with 129 additions and 34 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,32 @@ jobs:
- name: Install Helm chart
run: helm install keda ./keda/ --namespace keda

- name: Get all CRDs
run: kubectl get crds -o wide

- name: Verify clustertriggerauthentications.keda.sh CRD is installed
run: kubectl get crd/clustertriggerauthentications.keda.sh -o wide

- name: Verify triggerauthentications.keda.sh CRD is installed
run: kubectl get crd/triggerauthentications.keda.sh -o wide

- name: Verify scaledjobs.keda.sh CRD is installed
run: kubectl get crd/scaledjobs.keda.sh -o wide

- name: Verify scaledobjects.keda.sh CRD is installed
run: kubectl get crd/scaledobjects.keda.sh -o wide

- name: Get all ScaledObjects
run: kubectl get scaledobjects
run: kubectl get scaledobjects -o wide

- name: Get all ScaledJobs
run: kubectl get scaledjobs
run: kubectl get scaledjobs -o wide

- name: Get all TriggerAuthentication
run: kubectl get triggerauth
run: kubectl get triggerauth -o wide

- name: Deploy Nginx with autoscaling
run: kubectl apply -f ./samples/nginx-scaledobject.yml

- name: Get our Nginx ScaledObject
run: kubectl get scaledobjects/nginx-autoscaling -o wide
68 changes: 44 additions & 24 deletions docs/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,27 @@ entries:
keda:
- apiVersion: v2
appVersion: 2.2.0
created: "2021-03-18T20:28:17.198936+01:00"
created: "2021-04-12T13:42:39.1164993+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: 7ec5c403d0ad315d2eb9ec0c9d73b36c0baced870f397884d467d46014f24631
home: https://github.com/kedacore/keda
icon: https://raw.githubusercontent.com/kedacore/keda/master/images/keda-logo-500x500-white.png
maintainers:
- email: [email protected]
name: Ahmed ElSayed
- email: [email protected]
name: Tom Kerkhove
- email: [email protected]
name: Zbynek Roubalik
name: keda
sources:
- https://github.com/kedacore/keda
urls:
- https://kedacore.github.io/charts/keda-2.2.1.tgz
version: 2.2.1
- apiVersion: v2
appVersion: 2.2.0
created: "2021-04-12T13:42:39.1125407+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: 42b530656687cabb1408abcb137a5d7515243465b65a3a6006927987441fadc0
home: https://github.com/kedacore/keda
Expand All @@ -23,7 +43,7 @@ entries:
version: 2.2.0
- apiVersion: v2
appVersion: 2.1.0
created: "2021-03-18T20:28:17.194813+01:00"
created: "2021-04-12T13:42:39.1025357+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: 65e2fb98c55740251d7ffa1680ef0edeb42954576deac3856dd468473e321747
home: https://github.com/kedacore/keda
Expand All @@ -43,7 +63,7 @@ entries:
version: 2.1.3
- apiVersion: v2
appVersion: 2.1.0
created: "2021-03-18T20:28:17.188975+01:00"
created: "2021-04-12T13:42:39.0945457+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: f336ab24d5ebf96d28da95a03931f2701bb44ce6bb7c30991e3ad14959e2e7e4
home: https://github.com/kedacore/keda
Expand All @@ -63,7 +83,7 @@ entries:
version: 2.1.2
- apiVersion: v2
appVersion: 2.1.0
created: "2021-03-18T20:28:17.184627+01:00"
created: "2021-04-12T13:42:39.085527+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: b6e752d05797cd50ce95a96ae1b6cf8b2b87fc10c27391172beb1acd9fcb18a2
home: https://github.com/kedacore/keda
Expand All @@ -83,7 +103,7 @@ entries:
version: 2.1.1
- apiVersion: v2
appVersion: 2.1.0
created: "2021-03-18T20:28:17.179904+01:00"
created: "2021-04-12T13:42:39.0765009+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: 91998f9165176f972b954ef9d4077942979cb5e863bb7d76ed29c48f63533531
home: https://github.com/kedacore/keda
Expand All @@ -103,7 +123,7 @@ entries:
version: 2.1.0
- apiVersion: v2
appVersion: 2.0.0
created: "2021-03-18T20:28:17.174417+01:00"
created: "2021-04-12T13:42:39.0684995+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: ce2e848f5d7a067d74feb3745da5a834cccdfaa665b5b59d43ad06baa4cdfd04
home: https://github.com/kedacore/keda
Expand All @@ -123,7 +143,7 @@ entries:
version: 2.0.1
- apiVersion: v1
appVersion: 2.0.0
created: "2021-03-18T20:28:17.169688+01:00"
created: "2021-04-12T13:42:39.0565336+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: dba8b0e793085165c7d155f9393c5ff112d4714dbce0201404ceb0e67d1b2deb
home: https://github.com/kedacore/keda
Expand All @@ -143,7 +163,7 @@ entries:
version: 2.0.0
- apiVersion: v1
appVersion: 2.0.0-rc2
created: "2021-03-18T20:28:17.165604+01:00"
created: "2021-04-12T13:42:39.0485351+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: bad82c28c5ca1d5e69fac4bfcc7a999d5d2b2afd9b19ff6deb9a48811110eb0d
home: https://github.com/kedacore/keda
Expand All @@ -163,7 +183,7 @@ entries:
version: 2.0.0-rc3
- apiVersion: v2
appVersion: 2.0.0-rc2
created: "2021-03-18T20:28:17.160127+01:00"
created: "2021-04-12T13:42:39.0384985+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: a4042ba14e595a8e82c9a39d8987625b89292aa86029686a3603b724fda36ca0
home: https://github.com/kedacore/keda
Expand All @@ -184,7 +204,7 @@ entries:
version: 2.0.0-rc2
- apiVersion: v1
appVersion: 2.0.0-rc
created: "2021-03-18T20:28:17.156302+01:00"
created: "2021-04-12T13:42:39.0265064+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: 3a952f2aaa0ea35ee4335f0b168f44fcf37c5c5ab7e9b9bba7e731c42f04ad61
home: https://github.com/kedacore/keda
Expand All @@ -204,7 +224,7 @@ entries:
version: 2.0.0-rc
- apiVersion: v1
appVersion: 2.0.0-beta
created: "2021-03-18T20:28:17.15263+01:00"
created: "2021-04-12T13:42:39.0145005+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: fbafc7ae564c13a0eab7062667759f6e93595c97125731a27e8290574e1d570c
home: https://github.com/kedacore/keda
Expand All @@ -224,7 +244,7 @@ entries:
version: 2.0.0-beta1.2
- apiVersion: v1
appVersion: 2.0.0-beta
created: "2021-03-18T20:28:17.146763+01:00"
created: "2021-04-12T13:42:39.0025764+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: db9e7d2423423463285f2e9d5b940a63b41d6555ba9fcab8fda0e6a757ccefa9
home: https://github.com/kedacore/keda
Expand All @@ -244,7 +264,7 @@ entries:
version: 2.0.0-beta1.1
- apiVersion: v1
appVersion: 2.0.0-beta
created: "2021-03-18T20:28:17.140788+01:00"
created: "2021-04-12T13:42:38.9885326+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: f0a8f0b854246ee2258ec8f10528f2811681ad2e41946dc455586f1ba9818e01
home: https://github.com/kedacore/keda
Expand All @@ -264,7 +284,7 @@ entries:
version: 2.0.0-beta
- apiVersion: v1
appVersion: 1.5.0
created: "2021-03-18T20:28:17.136276+01:00"
created: "2021-04-12T13:42:38.978501+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: 07b15ddae4f1c40747de063100a668ac15d504cd0548eac0e1a04381fcaa3b37
home: https://github.com/kedacore/keda
Expand All @@ -284,7 +304,7 @@ entries:
version: 1.5.0
- apiVersion: v1
appVersion: 1.4.1
created: "2021-03-18T20:28:17.132203+01:00"
created: "2021-04-12T13:42:38.9665421+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: f8bf80186ac3343998021a1721d06a67fdacd1dab92e4a4992620903b52004a4
home: https://github.com/kedacore/keda
Expand All @@ -304,7 +324,7 @@ entries:
version: 1.4.2
- apiVersion: v1
appVersion: 1.4.1
created: "2021-03-18T20:28:17.126722+01:00"
created: "2021-04-12T13:42:38.9545363+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: 97a2e5c0beff93bb71ff861da0f29d09dcf988e724784f8b7c56ac9872c37a81
home: https://github.com/kedacore/keda
Expand All @@ -320,7 +340,7 @@ entries:
version: 1.4.1
- apiVersion: v1
appVersion: 1.4.0
created: "2021-03-18T20:28:17.121944+01:00"
created: "2021-04-12T13:42:38.9405304+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: 7b2b4e29f867361af87a60411b0a196416b04b2e20f4091d166263ea5195c355
home: https://github.com/kedacore/keda
Expand All @@ -336,7 +356,7 @@ entries:
version: 1.4.0
- apiVersion: v1
appVersion: 1.4.0
created: "2021-03-18T20:28:17.116853+01:00"
created: "2021-04-12T13:42:38.9285182+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: a9e78b6cb2257702296d7cc28ca7acdd0b11603aef7e95dbdc7d4ddfa3f3a49c
home: https://github.com/kedacore/keda
Expand All @@ -352,7 +372,7 @@ entries:
version: 1.3.2
- apiVersion: v1
appVersion: 1.3.0
created: "2021-03-18T20:28:17.111367+01:00"
created: "2021-04-12T13:42:38.9165009+02:00"
description: Event-based autoscaler for workloads on Kubernetes
digest: e13bcb65816ed59b10b32fa6db8f61668635459d56c2d599bb3c0bcc5dcc1368
home: https://github.com/kedacore/keda
Expand All @@ -368,7 +388,7 @@ entries:
version: 1.3.1
- apiVersion: v1
appVersion: 1.3.0
created: "2021-03-18T20:28:17.102855+01:00"
created: "2021-04-12T13:42:38.9035007+02:00"
description: Event based autoscaler for Azure Functions deployments on Kubernetes
digest: c0772458ab70bf3f019dc0b899ff444b9d7e6dcc466afd62e3f62e90eb8a24ed
home: https://github.com/kedacore/keda
Expand All @@ -384,7 +404,7 @@ entries:
version: 1.3.0
- apiVersion: v1
appVersion: 1.2.0
created: "2021-03-18T20:28:17.097222+01:00"
created: "2021-04-12T13:42:38.8884976+02:00"
description: Event based autoscaler for Azure Functions deployments on Kubernetes
digest: e041dbed2455fef34f2908594a42fc8a7f163a1f48be46c2f93dea46e36fc733
home: https://github.com/kedacore/keda
Expand All @@ -400,7 +420,7 @@ entries:
version: 1.2.0
- apiVersion: v1
appVersion: 1.1.0
created: "2021-03-18T20:28:17.089852+01:00"
created: "2021-04-12T13:42:38.874498+02:00"
description: Event based autoscaler for Azure Functions deployments on Kubernetes
digest: c624e6620a9a6f265f51a82ee0d8267dcb2637dd3777306afbb271746234ff2d
home: https://github.com/kedacore/keda
Expand All @@ -416,7 +436,7 @@ entries:
version: 1.1.0
- apiVersion: v1
appVersion: 1.0.0
created: "2021-03-18T20:28:17.081675+01:00"
created: "2021-04-12T13:42:38.8634996+02:00"
description: Event based autoscaler for Azure Functions deployments on Kubernetes
digest: ef934588dce70d874ea69692e082b8a70ad19095090b8d4fa7b5cb69b2cecaf6
home: https://github.com/kedacore/keda
Expand All @@ -430,4 +450,4 @@ entries:
urls:
- https://kedacore.github.io/charts/keda-1.0.0.tgz
version: 1.0.0
generated: "2021-03-18T20:28:17.070315+01:00"
generated: "2021-04-12T13:42:38.8485005+02:00"
Binary file added docs/keda-2.2.1.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion keda/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Event-based autoscaler for workloads on Kubernetes

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 2.2.0
version: 2.2.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
Expand Down
5 changes: 3 additions & 2 deletions keda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ their default values.
| Parameter | Description | Default |
|:-----------------------------------------------------------|:------------------------------------------|:------------------------------------------------|
| `image.keda.repository` | Image name of KEDA operator | `ghcr.io/kedacore/keda` |
| `image.keda.tag` | Image tag of KEDA operator. Optional, given app version of Helm chart is used by default | `` |
| `image.keda.tag` | Image tag of KEDA operator. Optional, given app version of Helm chart is used by default | `` |
| `image.metricsApiServer.repository` | Image name of KEDA Metrics API Server | `ghcr.io/kedacore/keda-metrics-apiserver` |
| `image.metricsApiServer.tag` | Image tag of KEDA Metrics API Server. Optional, given app version of Helm chart is used by default | `` |
| `image.metricsApiServer.tag` | Image tag of KEDA Metrics API Server. Optional, given app version of Helm chart is used by default | `` |
| `crds.install` | Defines whether the KEDA CRDs have to be installed or not. | `true` |
| `watchNamespace` | Defines Kubernetes namespaces to watch to scale their workloads. Default watches all namespaces | `` |
| `operator.name` | Name of the KEDA operator | `keda-operator` |
| `imagePullSecrets` | Name of secret to use to pull images to use to pull Docker images | `[]` |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.crds.install }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -148,4 +149,5 @@ status:
kind: ""
plural: ""
conditions: []
storedVersions: []
storedVersions: []
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.crds.install }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -6820,4 +6821,5 @@ status:
kind: ""
plural: ""
conditions: []
storedVersions: []
storedVersions: []
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.crds.install }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -331,4 +332,5 @@ status:
kind: ""
plural: ""
conditions: []
storedVersions: []
storedVersions: []
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.crds.install }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -147,4 +148,5 @@ status:
kind: ""
plural: ""
conditions: []
storedVersions: []
storedVersions: []
{{- end -}}
3 changes: 3 additions & 0 deletions keda/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ image:
tag:
pullPolicy: Always

crds:
install: true

watchNamespace: ""

imagePullSecrets: []
Expand Down
42 changes: 42 additions & 0 deletions samples/nginx-scaledobject.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nginx
name: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
strategy: {}
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: nginx
name: nginx
resources:
requests:
memory: "64Mi"
cpu: "25m"
limits:
memory: "128Mi"
cpu: "50m"
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: nginx-autoscaling
spec:
scaleTargetRef:
name: nginx
minReplicaCount: 0
maxReplicaCount: 5
triggers:
- type: cpu
metadata:
type: Utilization
value: "70"

0 comments on commit b3ad4da

Please sign in to comment.