├── .github ├── CODEOWNERS ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yml └── workflows │ ├── ci-core.yml │ ├── ci-external-scaler-azure-cosmos-db.yml │ ├── ci-http-add-on.yml │ └── github-polls.yml ├── .gitignore ├── .vscode └── settings.json ├── .whitesource ├── CONTRIBUTING.md ├── LICENSE ├── MAINTAINERS.md ├── README.md ├── docs ├── artifacthub-repo.yml ├── external-scaler-azure-cosmos-db-0.1.0.tgz ├── index.html ├── index.yaml ├── keda-1.0.0.tgz ├── keda-1.1.0.tgz ├── keda-1.2.0.tgz ├── keda-1.3.0.tgz ├── keda-1.3.1.tgz ├── keda-1.3.2.tgz ├── keda-1.4.0.tgz ├── keda-1.4.1.tgz ├── keda-1.4.2.tgz ├── keda-1.5.0.tgz ├── keda-2.0.0-beta.tgz ├── keda-2.0.0-beta1.1.tgz ├── keda-2.0.0-beta1.2.tgz ├── keda-2.0.0-rc.tgz ├── keda-2.0.0-rc2.tgz ├── keda-2.0.0-rc3.tgz ├── keda-2.0.0.tgz ├── keda-2.0.1.tgz ├── keda-2.1.0.tgz ├── keda-2.1.1.tgz ├── keda-2.1.2.tgz ├── keda-2.1.3.tgz ├── keda-2.10.0.tgz ├── keda-2.10.1.tgz ├── keda-2.10.2.tgz ├── keda-2.11.0.tgz ├── keda-2.11.1.tgz ├── keda-2.11.2.tgz ├── keda-2.12.0.tgz ├── keda-2.12.1.tgz ├── keda-2.13.0.tgz ├── keda-2.13.1.tgz ├── keda-2.13.2.tgz ├── keda-2.14.0.tgz ├── keda-2.14.1.tgz ├── keda-2.14.2.tgz ├── keda-2.14.3 copy.tgz ├── keda-2.15.0.tgz ├── keda-2.15.1.tgz ├── keda-2.15.2.tgz ├── keda-2.16.0.tgz ├── keda-2.16.1.tgz ├── keda-2.17.0.tgz ├── keda-2.17.1.tgz ├── keda-2.2.0.tgz ├── keda-2.2.1.tgz ├── keda-2.2.2.tgz ├── keda-2.3.0.tgz ├── keda-2.3.2.tgz ├── keda-2.4.0.tgz ├── keda-2.5.0.tgz ├── keda-2.5.1.tgz ├── keda-2.6.0.tgz ├── keda-2.6.1.tgz ├── keda-2.6.2.tgz ├── keda-2.7.0.tgz ├── keda-2.7.1.tgz ├── keda-2.7.2.tgz ├── keda-2.8.0.tgz ├── keda-2.8.1.tgz ├── keda-2.8.2.tgz ├── keda-2.8.3.tgz ├── keda-2.8.4.tgz ├── keda-2.9.0.tgz ├── keda-2.9.1.tgz ├── keda-2.9.2.tgz ├── keda-2.9.3.tgz ├── keda-2.9.4.tgz ├── keda-add-ons-http-0.0.1.tgz ├── keda-add-ons-http-0.1.0.tgz ├── keda-add-ons-http-0.10.0.tgz ├── keda-add-ons-http-0.2.0.tgz ├── keda-add-ons-http-0.2.1.tgz ├── keda-add-ons-http-0.2.2.tgz ├── keda-add-ons-http-0.3.0.tgz ├── keda-add-ons-http-0.3.1.tgz ├── keda-add-ons-http-0.4.0.tgz ├── keda-add-ons-http-0.4.1.tgz ├── keda-add-ons-http-0.5.0.tgz ├── keda-add-ons-http-0.5.1.tgz ├── keda-add-ons-http-0.5.2.tgz ├── keda-add-ons-http-0.5.3.tgz ├── keda-add-ons-http-0.6.0.tgz ├── keda-add-ons-http-0.7.0.tgz ├── keda-add-ons-http-0.8.0.tgz └── keda-add-ons-http-0.9.0.tgz ├── external-scaler-azure-cosmos-db ├── .helmignore ├── Chart.yaml ├── README.md ├── README.md.gotmpl ├── templates │ ├── _helpers.tpl │ ├── scaler-deployment.yaml │ └── scaler-service.yaml └── values.yaml ├── http-add-on ├── .helmignore ├── Chart.yaml ├── README.md ├── README.md.gotmpl ├── templates │ ├── _helpers.tpl │ ├── crd.yaml │ ├── interceptor │ │ ├── deployment.yaml │ │ ├── poddisruptionbudget.yaml │ │ ├── rbac.yml │ │ ├── scaledobject.yaml │ │ ├── service-admin.yaml │ │ ├── service-proxy.yaml │ │ └── serviceaccount.yaml │ ├── operator │ │ ├── deployment.yaml │ │ ├── rbac.yml │ │ ├── service.yaml │ │ └── serviceaccount.yaml │ ├── rbac-aggregateclusterroles.yaml │ └── scaler │ │ ├── deployment.yaml │ │ ├── rbac.yml │ │ ├── service.yaml │ │ └── serviceaccount.yaml └── values.yaml ├── keda ├── .helmignore ├── Chart.yaml ├── README.md ├── README.md.gotmpl ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── cert-manager │ │ ├── keda-issuer.yaml │ │ ├── keda-tls-certificate.yaml │ │ ├── self-ca.yaml │ │ └── self-issuer.yaml │ ├── crds │ │ ├── crd-cloudeventsources.yaml │ │ ├── crd-clustercloudeventsources.yaml │ │ ├── crd-clustertriggerauthentications.yaml │ │ ├── crd-scaledjobs.yaml │ │ ├── crd-scaledobjects.yaml │ │ └── crd-triggerauthentications.yaml │ ├── extensibility │ │ └── extra-manifests.yaml │ ├── manager │ │ ├── ciliumnetworkpolicy.yaml │ │ ├── clusterrole.yaml │ │ ├── clusterrolebindings.yaml │ │ ├── deployment.yaml │ │ ├── minimal-rbac.yaml │ │ ├── poddisruptionbudget.yaml │ │ ├── podmonitor.yaml │ │ ├── prometheusrules.yaml │ │ ├── service.yaml │ │ ├── serviceaccount.yaml │ │ └── servicemonitor.yaml │ ├── metrics-server │ │ ├── apiservice.yaml │ │ ├── ciliumnetworkpolicy.yaml │ │ ├── clusterrole.yaml │ │ ├── clusterrolebinding.yaml │ │ ├── deployment.yaml │ │ ├── poddisruptionbudget.yaml │ │ ├── podmonitor.yaml │ │ ├── service.yaml │ │ ├── serviceaccount.yaml │ │ └── servicemonitor.yaml │ └── webhooks │ │ ├── ciliumnetworkpolicy.yaml │ │ ├── clusterrole.yaml │ │ ├── clusterrolebindings.yaml │ │ ├── deployment.yaml │ │ ├── poddisruptionbudget.yaml │ │ ├── prometheusrules.yaml │ │ ├── service.yaml │ │ ├── serviceaccount.yaml │ │ ├── servicemonitor.yaml │ │ └── validatingconfiguration.yaml └── values.yaml └── samples └── nginx-scaledobject.yml /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # General owners 2 | * @kedacore/keda-helm-maintainers 3 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | _Provide a description of what has been changed_ 8 | 9 | ### Checklist 10 | 11 | - [ ] I have verified that my change is according to the [deprecations & breaking changes policy](https://github.com/kedacore/governance/blob/main/DEPRECATIONS.md) 12 | - [ ] Commits are signed with Developer Certificate of Origin (DCO - [learn more](https://github.com/kedacore/charts/blob/main/CONTRIBUTING.md#developer-certificate-of-origin-signing-your-work)) 13 | - [ ] README is updated with new configuration values *(if applicable)* [learn more](https://github.com/kedacore/charts/blob/main/CONTRIBUTING.md#documentation) 14 | - [ ] A PR is opened to update KEDA core ([repo](https://github.com/kedacore/keda)) *(if applicable, ie. when deployment manifests are modified)* 15 | 16 | Fixes # 17 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: "/" 5 | schedule: 6 | interval: monthly 7 | open-pull-requests-limit: 10 8 | labels: 9 | - enhancement 10 | - dependency-management 11 | groups: 12 | all-updates: 13 | patterns: 14 | - "*" 15 | -------------------------------------------------------------------------------- /.github/workflows/ci-core.yml: -------------------------------------------------------------------------------- 1 | name: Helm Chart CI (Core) 2 | on: 3 | # Trigger the workflow on push or pull request, 4 | # but only for the main branch 5 | push: 6 | branches: 7 | - main 8 | paths: 9 | - '.github/workflows/ci-core.yml' 10 | - 'keda/**' 11 | pull_request: 12 | branches: 13 | - main 14 | - release/* 15 | paths: 16 | - '.github/workflows/ci-core.yml' 17 | - 'keda/**' 18 | 19 | concurrency: 20 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} 21 | cancel-in-progress: true 22 | 23 | jobs: 24 | lint-helm-3-x: 25 | name: Lint Helm Chart 26 | runs-on: ubuntu-latest 27 | steps: 28 | - name: Check out code 29 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 30 | 31 | - name: Helm install 32 | uses: Azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0 33 | 34 | - name: Lint 'KEDA' Helm chart 35 | run: helm lint keda 36 | 37 | deploy-helm-3-x: 38 | name: Deploy to Kubernetes ${{ matrix.kubernetesVersion }} in '${{matrix.namespace}}' namespace (${{ (matrix.enableAzureWorkloadIdentity == true && 'With Azure Workload Identity') || 'Without Azure Workload Identity' }} | ${{ (matrix.enableCertManager == true && 'With cert-manager') || 'Without cert-manager' }}) 39 | needs: lint-helm-3-x 40 | runs-on: ubuntu-latest 41 | strategy: 42 | fail-fast: false 43 | matrix: 44 | enableAzureWorkloadIdentity: [false, true] 45 | kubernetesVersion: [v1.32, v1.31, v1.30, v1.23] 46 | namespace: ["keda", "not-keda"] 47 | enableCertManager: [false, true] 48 | include: 49 | # Azure Workload Identity 50 | - enableAzureWorkloadIdentity: true 51 | tenantId: contoso 52 | clientId: ABC 53 | - enableAzureWorkloadIdentity: false 54 | tenantId: "" 55 | clientId: "" 56 | # Images are defined on every Kind release 57 | # See https://github.com/kubernetes-sigs/kind/releases 58 | - kubernetesVersion: v1.32 59 | kindImage: kindest/node:v1.32.0@sha256:c48c62eac5da28cdadcf560d1d8616cfa6783b58f0d94cf63ad1bf49600cb027 60 | - kubernetesVersion: v1.31 61 | kindImage: kindest/node:v1.31.4@sha256:2cb39f7295fe7eafee0842b1052a599a4fb0f8bcf3f83d96c7f4864c357c6c30 62 | - kubernetesVersion: v1.30 63 | kindImage: kindest/node:v1.30.8@sha256:17cd608b3971338d9180b00776cb766c50d0a0b6b904ab4ff52fd3fc5c6369bf 64 | - kubernetesVersion: v1.23 65 | kindImage: kindest/node:v1.23.17@sha256:59c989ff8a517a93127d4a536e7014d28e235fb3529d9fba91b3951d461edfdb 66 | steps: 67 | - name: Check out code 68 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 69 | 70 | - name: Helm install 71 | uses: Azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0 72 | 73 | - name: Create k8s ${{ matrix.kubernetesVersion }} Kind Cluster 74 | uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0 75 | with: 76 | node_image: ${{ matrix.kindImage }} 77 | 78 | - name: Show Kubernetes version 79 | run: | 80 | kubectl version 81 | 82 | - name: Show Kubernetes nodes 83 | run: | 84 | kubectl get nodes -o wide 85 | 86 | - name: Show Helm version 87 | run: | 88 | helm version 89 | 90 | - name: Generate values 91 | run: | 92 | cat < test-values.yaml 93 | image: 94 | keda: 95 | tag: main 96 | metricsApiServer: 97 | tag: main 98 | webhooks: 99 | tag: main 100 | podIdentity: 101 | azureWorkload: 102 | enabled: ${{ matrix.enableAzureWorkloadIdentity }} 103 | tenantId: ${{ matrix.tenantId }} 104 | clientId: ${{ matrix.clientId }} 105 | podDisruptionBudget: 106 | operator: 107 | maxUnavailable: 1 108 | metricServer: 109 | maxUnavailable: 1 110 | webhooks: 111 | maxUnavailable: 1 112 | prometheus: 113 | operator: 114 | enabled: true 115 | podMonitor: 116 | enabled: true 117 | serviceMonitor: 118 | enabled: true 119 | relabelings: 120 | - regex: (go_.*) 121 | action: drop 122 | webhooks: 123 | enabled: true 124 | serviceMonitor: 125 | enabled: true 126 | relabelings: 127 | - regex: (go_.*) 128 | action: drop 129 | metricServer: 130 | enabled: true 131 | serviceMonitor: 132 | enabled: true 133 | relabelings: 134 | - regex: (go_.*) 135 | action: drop 136 | webhooks: 137 | failurePolicy: Fail 138 | certificates: 139 | autoGenerated: true 140 | certManager: 141 | enabled: ${{ matrix.enableCertManager }} 142 | generateCA: true 143 | extraInitContainers: 144 | - name: hello-once 145 | args: 146 | - -c 147 | - "echo 'Hello World!'" 148 | command: 149 | - /bin/sh 150 | image: 'busybox:glibc' 151 | extraContainers: 152 | - name: hello-many 153 | args: 154 | - -c 155 | - "while true; do echo hi; sleep 300; done" 156 | command: 157 | - /bin/sh 158 | image: 'busybox:glibc' 159 | extraObjects: 160 | - apiVersion: keda.sh/v1alpha1 161 | kind: ClusterTriggerAuthentication 162 | metadata: 163 | name: aws-credentials 164 | namespace: keda 165 | annotations: 166 | helm.sh/hook: post-install 167 | spec: 168 | podIdentity: 169 | provider: aws-eks 170 | additionalAnnotations: 171 | sample: "annotation" 172 | service: 173 | additionalAnnotations: 174 | hello: "cloud-native world" 175 | EOF 176 | 177 | - name: Install deps 178 | run: | 179 | helm repo add prometheus-community https://prometheus-community.github.io/helm-charts 180 | helm repo add jetstack https://charts.jetstack.io 181 | helm repo update 182 | helm install prometheus-stack prometheus-community/prometheus-operator-crds --namespace monitoring --create-namespace --wait 183 | helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --set installCRDs=true 184 | 185 | - name: Create KEDA's namespace (${{ matrix.namespace }}) 186 | run: kubectl create ns ${{ matrix.namespace }} 187 | 188 | - name: Template Helm chart 189 | run: helm template keda ./keda/ --namespace ${{ matrix.namespace }} --values test-values.yaml 190 | 191 | - name: Install Helm chart 192 | run: helm install keda ./keda/ --namespace ${{ matrix.namespace }} --values test-values.yaml --wait 193 | 194 | - name: Show Kubernetes resources (KEDA) 195 | run: kubectl get all --namespace ${{ matrix.namespace }} 196 | if: always() 197 | 198 | - name: Show Kubernetes resources (Monitoring) 199 | run: kubectl get all --namespace monitoring 200 | if: always() 201 | 202 | - name: Get all CRDs 203 | run: kubectl get crds -o wide 204 | 205 | - name: Verify clustertriggerauthentications.keda.sh CRD is installed 206 | run: kubectl get crd/clustertriggerauthentications.keda.sh -o wide 207 | 208 | - name: Verify triggerauthentications.keda.sh CRD is installed 209 | run: kubectl get crd/triggerauthentications.keda.sh -o wide 210 | 211 | - name: Verify scaledjobs.keda.sh CRD is installed 212 | run: kubectl get crd/scaledjobs.keda.sh -o wide 213 | 214 | - name: Verify scaledobjects.keda.sh CRD is installed 215 | run: kubectl get crd/scaledobjects.keda.sh -o wide 216 | 217 | - name: Verify cloudeventsources.eventing.keda.sh CRD is installed 218 | run: kubectl get crd/cloudeventsources.eventing.keda.sh -o wide 219 | 220 | - name: Verify clustercloudeventsources.eventing.keda.sh CRD is installed 221 | run: kubectl get crd/clustercloudeventsources.eventing.keda.sh -o wide 222 | 223 | - name: Get all ScaledObjects 224 | run: kubectl get scaledobjects -o wide 225 | 226 | - name: Get all ScaledJobs 227 | run: kubectl get scaledjobs -o wide 228 | 229 | - name: Get all TriggerAuthentication 230 | run: kubectl get triggerauth -o wide 231 | 232 | - name: Get all ClusterTriggerAuthentication 233 | run: kubectl get clustertriggerauth -o wide 234 | 235 | - name: Get all CloudEventSource 236 | run: kubectl get cloudeventsource -o wide 237 | 238 | - name: Deploy Nginx with autoscaling 239 | run: kubectl apply -f ./samples/nginx-scaledobject.yml 240 | 241 | - name: Get our Nginx ScaledObject 242 | run: kubectl get scaledobjects/nginx-autoscaling -o wide 243 | if: always() 244 | -------------------------------------------------------------------------------- /.github/workflows/ci-external-scaler-azure-cosmos-db.yml: -------------------------------------------------------------------------------- 1 | name: Helm Chart CI (External Scalers - Azure Cosmos DB) 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | paths: 8 | - .github/workflows/ci-external-scaler-azure-cosmos-db.yml 9 | - external-scaler-azure-cosmos-db/** 10 | pull_request: 11 | branches: 12 | - main 13 | paths: 14 | - .github/workflows/ci-external-scaler-azure-cosmos-db.yml 15 | - external-scaler-azure-cosmos-db/** 16 | 17 | concurrency: 18 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} 19 | cancel-in-progress: true 20 | 21 | jobs: 22 | lint-helm-3-x: 23 | name: Lint Helm Chart 24 | runs-on: ubuntu-latest 25 | steps: 26 | - name: Check out code 27 | uses: actions/checkout@v4 28 | 29 | - name: Helm install 30 | uses: Azure/setup-helm@v4 31 | 32 | - name: Lint 'Azure Cosmos DB external scaler' Helm chart 33 | run: helm lint ./external-scaler-azure-cosmos-db/ --strict 34 | 35 | deploy-helm-3-x: 36 | name: Deploy to Kubernetes ${{ matrix.kubernetesVersion }} 37 | needs: lint-helm-3-x 38 | runs-on: ubuntu-latest 39 | strategy: 40 | fail-fast: false 41 | matrix: 42 | kubernetesVersion: [v1.24, v1.19] 43 | include: 44 | # Images are defined on every Kind release 45 | # See https://github.com/kubernetes-sigs/kind/releases 46 | - kubernetesVersion: v1.24 47 | kindImage: kindest/node:v1.24.0@sha256:406fd86d48eaf4c04c7280cd1d2ca1d61e7d0d61ddef0125cb097bc7b82ed6a1 48 | - kubernetesVersion: v1.19 49 | kindImage: kindest/node:v1.19.16@sha256:dec41184d10deca01a08ea548197b77dc99eeacb56ff3e371af3193c86ca99f4 50 | steps: 51 | - name: Check out code 52 | uses: actions/checkout@v4 53 | 54 | - name: Helm install 55 | uses: Azure/setup-helm@v4 56 | 57 | - name: Create k8s ${{ matrix.kubernetesVersion }} Kind Cluster 58 | uses: helm/kind-action@v1.12.0 59 | with: 60 | version: v0.13.0 61 | node_image: ${{ matrix.kindImage }} 62 | 63 | - name: Show Kubernetes version 64 | run: | 65 | kubectl version 66 | 67 | - name: Show Kubernetes nodes 68 | run: | 69 | kubectl get nodes -o wide 70 | 71 | - name: Show Helm version 72 | run: | 73 | helm version 74 | 75 | - name: Create KEDA namespace 76 | run: kubectl create ns keda 77 | 78 | - name: Template Helm chart 79 | run: helm template test-release ./external-scaler-azure-cosmos-db/ --namespace test-namespace 80 | 81 | - name: Install Helm chart 82 | run: helm install test-release ./external-scaler-azure-cosmos-db/ --namespace test-namespace --create-namespace --wait --timeout=2m 83 | 84 | - name: Show Kubernetes resources 85 | run: kubectl get all --namespace keda 86 | if: always() 87 | 88 | - name: Get 'Azure Cosmos DB external scaler' service 89 | run: kubectl get service external-scaler-azure-cosmos-db --namespace=test-namespace 90 | 91 | - name: Get 'Azure Cosmos DB external scaler' deployment 92 | run: kubectl get deployment external-scaler-azure-cosmos-db --namespace=test-namespace 93 | 94 | - name: Uninstall 'Azure Cosmos DB external scaler' Helm chart 95 | run: helm uninstall test-release --namespace test-namespace 96 | -------------------------------------------------------------------------------- /.github/workflows/ci-http-add-on.yml: -------------------------------------------------------------------------------- 1 | name: Helm Chart CI (HTTP add-on) 2 | on: 3 | # Trigger the workflow on push or pull request, 4 | # but only for the main branch 5 | push: 6 | branches: 7 | - main 8 | paths: 9 | - ".github/workflows/ci-http-add-on.yml" 10 | - "http-add-on/**" 11 | pull_request: 12 | branches: 13 | - main 14 | paths: 15 | - ".github/workflows/ci-http-add-on.yml" 16 | - "http-add-on/**" 17 | 18 | concurrency: 19 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} 20 | cancel-in-progress: true 21 | 22 | jobs: 23 | lint-helm-3-x: 24 | name: Lint Helm Chart 25 | runs-on: ubuntu-latest 26 | steps: 27 | - name: Check out code 28 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 29 | 30 | - name: Helm install 31 | uses: Azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0 32 | 33 | - name: Lint 'http-add-on' Helm chart 34 | run: helm lint http-add-on 35 | 36 | deploy-helm-3-x: 37 | name: Deploy to Kubernetes ${{ matrix.kubernetesVersion }} 38 | needs: lint-helm-3-x 39 | runs-on: ubuntu-latest 40 | strategy: 41 | fail-fast: false 42 | matrix: 43 | kubernetesVersion: [v1.32, v1.31, v1.30, v1.29] 44 | include: 45 | - kubernetesVersion: v1.32 46 | kindImage: kindest/node:v1.32.0@sha256:c48c62eac5da28cdadcf560d1d8616cfa6783b58f0d94cf63ad1bf49600cb027 47 | - kubernetesVersion: v1.31 48 | kindImage: kindest/node:v1.31.4@sha256:2cb39f7295fe7eafee0842b1052a599a4fb0f8bcf3f83d96c7f4864c357c6c30 49 | - kubernetesVersion: v1.30 50 | kindImage: kindest/node:v1.30.8@sha256:17cd608b3971338d9180b00776cb766c50d0a0b6b904ab4ff52fd3fc5c6369bf 51 | - kubernetesVersion: v1.29 52 | kindImage: kindest/node:v1.29.0@sha256:eaa1450915475849a73a9227b8f201df25e55e268e5d619312131292e324d570 53 | steps: 54 | - name: Check out code 55 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 56 | 57 | - name: Helm install 58 | uses: Azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0 59 | 60 | - name: Create k8s ${{ matrix.kubernetesVersion }} Kind Cluster 61 | uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0 62 | with: 63 | node_image: ${{ matrix.kindImage }} 64 | 65 | - name: Show Kubernetes version 66 | run: | 67 | kubectl version 68 | 69 | - name: Show Kubernetes nodes 70 | run: | 71 | kubectl get nodes -o wide 72 | 73 | - name: Show Helm version 74 | run: | 75 | helm version 76 | 77 | - name: Create KEDA namespace 78 | run: kubectl create ns keda 79 | 80 | - name: Generate values 81 | run: | 82 | cat < keda-values.yaml 83 | image: 84 | keda: 85 | tag: main 86 | metricsApiServer: 87 | tag: main 88 | webhooks: 89 | tag: main 90 | 91 | - name: Install KEDA chart 92 | run: helm install keda ./keda/ --namespace keda --values keda-values.yaml 93 | 94 | - name: Generate values 95 | run: | 96 | cat < test-values.yaml 97 | additionalLabels: 98 | random: value 99 | images: 100 | tag: canary 101 | rbac: 102 | aggregateToDefaultRoles: true 103 | interceptor: 104 | replicas: 105 | min: 1 106 | EOF 107 | 108 | - name: Template Helm chart 109 | run: helm template http-add-on ./http-add-on/ --namespace keda --values test-values.yaml 110 | 111 | - name: Install Helm chart 112 | run: helm install http-add-on ./http-add-on/ --namespace keda --values test-values.yaml --wait 113 | 114 | - name: Show Kubernetes resources 115 | run: kubectl get all --namespace keda 116 | if: always() 117 | 118 | - name: Get all HTTPScaledObjects 119 | run: kubectl get httpscaledobjects 120 | 121 | - name: Get all CRDs 122 | run: kubectl get crds 123 | 124 | - name: Get HTTPScaledObject CRD 125 | run: kubectl get crds/httpscaledobjects.http.keda.sh 126 | 127 | - name: Describe HTTPScaledObject CRD 128 | run: kubectl describe crds/httpscaledobjects.http.keda.sh 129 | 130 | - name: Validate Interceptor ScaledObject 131 | run: | 132 | for N in {1..3} 133 | do 134 | READY=$(kubectl get so/keda-add-ons-http-interceptor -n keda -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}') 135 | echo "ScaledObjet is ready: $READY" 136 | if [[ "$READY" == "True" ]]; then 137 | exit 0 138 | fi 139 | sleep 15s 140 | done 141 | exit 1 142 | -------------------------------------------------------------------------------- /.github/workflows/github-polls.yml: -------------------------------------------------------------------------------- 1 | name: GitHub Polls Bot 2 | 3 | on: 4 | issue_comment: 5 | types: [created, edited] # issue comment is created or edited 6 | issues: 7 | types: [opened, edited] # issue is opened or edited 8 | 9 | jobs: 10 | polls: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: imjohnbo/gh-polls-bot-action@master 14 | env: 15 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # IDE specific files 2 | .vscode 3 | .idea 4 | *.swp 5 | *.swo 6 | 7 | # Mac 8 | .DS_Store 9 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "markdownlint.config": { 3 | "MD028": false, 4 | "MD025": { 5 | "front_matter_title": "" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /.whitesource: -------------------------------------------------------------------------------- 1 | { 2 | "scanSettings": { 3 | "baseBranches": [] 4 | }, 5 | "checkRunSettings": { 6 | "vulnerableCheckRunConclusionLevel": "failure", 7 | "displayMode": "diff" 8 | }, 9 | "issueSettings": { 10 | "minSeverityLevel": "LOW" 11 | } 12 | } -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to KEDA Helm Charts 2 | 3 | Thanks for helping making KEDA better! 4 | 5 | ## Shipping a new version 6 | 7 | > ⚠️ New Helm chart versions are only released in conjunction with KEDA Core or hotfixes, individual PRs do not have to perform these steps 8 | 9 | You can easily release a new Helm chart version: 10 | 11 | 1. Update the version of the Helm chart in [Chart.yaml](keda/Chart.yaml). 12 | 2. Update Warning message about Kubernetes compatibility in [NOTES.txt](keda/templates/NOTES.txt). 13 | 3. Re-generate the Helm chart docs ([learn more](#documentation)) 14 | 4. Package the Helm chart 15 | - For KEDA: 16 | ```shell 17 | $ helm package keda --destination docs 18 | Successfully packaged chart and saved it to: docs/keda-2.5.0.tgz 19 | ``` 20 | - For HTTP add-on: 21 | ```shell 22 | $ helm package http-add-on --destination docs 23 | Successfully packaged chart and saved it to: docs/keda-add-ons-http-0.2.0.tgz 24 | ``` 25 | - For Azure Cosmos DB external scaler: 26 | ```shell 27 | $ helm package external-scaler-azure-cosmos-db --destination docs 28 | Successfully packaged chart and saved it to: docs/external-scaler-azure-cosmos-db-0.1.0.tgz 29 | ``` 30 | 5. Re-index the Helm repo to add our new version: 31 | ```shell 32 | $ helm repo index docs --url https://kedacore.github.io/charts 33 | ``` 34 | 6. Update the version in the "Browse all our Helm charts" section of our README.md 35 | 7. Commit changes: 36 | ```shell 37 | git add . 38 | git commit -sm "Packaged new Helm chart version" 39 | git push origin chart-release 40 | ``` 41 | 8. Create a pull request with our new Helm index. 42 | 9. Create a GitHub release for your new Helm chart version by using the following template. 43 | - Make sure to list the changes to our Helm chart which are tracked in the [KEDA Core vNext](https://github.com/kedacore/charts/milestone/10) milestone 44 | - Instead of listing all KEDA core changes, simply refer to our release notes on the other repo (see template) 45 | 46 | > *Chart: {{Chart Version}} | App: {{App Name}}* 47 | > {{Description about the Helm chart}} 48 | > 49 | > ## TL;DR 50 | > 51 | > ```shell 52 | > helm repo add kedacore https://kedacore.github.io/charts 53 | > helm repo update 54 | > helm install keda kedacore/keda --version {{Chart Version}} -n keda --create-namespace 55 | > ``` 56 | > 57 | > ## What is new? 58 | > 59 | > ### Features 60 | > 61 | > - Support for KEDA v{version} ([release notes]({{URL to release}})) 62 | > - {{List new features}} 63 | > 64 | > ### Fixes / Changes 65 | > 66 | > - {{List fixes}} 67 | > 68 | > ### Breaking Changes 69 | > 70 | > - {{List breaking changes}} 71 | > 72 | > ### Removal 73 | > 74 | > - {{List removed features}} 75 | 76 | 10. Create a new milestone called `KEDA Core v{version}` 77 | 11. Move the closed items from `KEDA Core vNext` to the new milestone and close it 78 | 79 | ## Developer Certificate of Origin: Signing your work 80 | 81 | ### Every commit needs to be signed 82 | 83 | The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO, reformatted for readability: 84 | 85 | ```text 86 | By making a contribution to this project, I certify that: 87 | 88 | (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or 89 | 90 | (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or 91 | 92 | (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. 93 | 94 | (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. 95 | ``` 96 | 97 | Contributors sign-off that they adhere to these requirements by adding a `Signed-off-by` line to commit messages. 98 | 99 | ```text 100 | This is my commit message 101 | 102 | Signed-off-by: Random J Developer 103 | ``` 104 | 105 | Git even has a `-s` command line option to append this automatically to your commit message: 106 | 107 | ```shell 108 | $ git commit -s -m 'This is my commit message' 109 | ``` 110 | 111 | Each Pull Request is checked whether or not commits in a Pull Request do contain a valid Signed-off-by line. 112 | 113 | ### I didn't sign my commit, now what?! 114 | 115 | No worries - You can easily replay your changes, sign them and force push them! 116 | 117 | ```shell 118 | git checkout 119 | git reset $(git merge-base main ) 120 | git add -A 121 | git commit -sm "one commit on " 122 | git push --force 123 | ``` 124 | 125 | ## Documentation 126 | 127 | The documentation for each chart is generated with [helm-docs](https://github.com/norwoodj/helm-docs). This way we can ensure that values are consistent with the chart documentation. 128 | 129 | To update a charts documentation, please run the following command: 130 | 131 | ```shell 132 | $ helm-docs 133 | INFO[2023-05-16T23:18:14+02:00] Found Chart directories [.] 134 | INFO[2023-05-16T23:18:14+02:00] Generating README Documentation for chart . 135 | 136 | # or with a docker command: 137 | 138 | $ docker run -v "$PWD:/helm-docs" -u $(id -u) jnorwood/helm-docs:latest 139 | time="2023-05-16T21:22:00Z" level=info msg="Found Chart directories [.]" 140 | time="2023-05-16T21:22:00Z" level=info msg="Generating README Documentation for chart ." 141 | ``` 142 | 143 | > **Note** 144 | > When creating your own `README.md.gotmpl`, don't forget to add it to your `.helmignore` file. 145 | -------------------------------------------------------------------------------- /MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | # Kubernetes Event-driven Autoscaling (KEDA) Maintainers 2 | 3 | You can find an overview of our current and alumni maintainers [here](https://github.com/kedacore/governance/blob/main/MAINTAINERS.md). 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | KEDA allows for fine grained autoscaling (including to/from zero) for event driven Kubernetes workloads. KEDA serves as a Kubernetes Metrics Server and allows users to define autoscaling rules using a dedicated Kubernetes custom resource definition. 3 | 4 | KEDA can run on both the cloud and the edge, integrates natively with Kubernetes components such as the Horizontal Pod Autoscaler, and has no external dependencies. 5 | 6 | We are a Cloud Native Computing Foundation (CNCF) graduated project. 7 | ![CNCF Logo](https://raw.githubusercontent.com/kedacore/keda/main/images/logo-cncf.svg) 8 | 9 | ## Getting Started 10 | 11 | ### Adding our Helm chart repo 12 | 13 | ```console 14 | $ helm repo add kedacore https://kedacore.github.io/charts 15 | "kedacore" has been added to your repositories 16 | ``` 17 | 18 | ### Browse all our Helm charts 19 | 20 | ```console 21 | $ helm search repo kedacore 22 | NAME CHART VERSION APP VERSION DESCRIPTION 23 | kedacore/external-scaler-azure-cosmos-db 0.1.0 0.1.0 Event-based autoscaler for Azure Cosmos DB chan... 24 | kedacore/keda 2.17.1 2.17.1 Event-based autoscaler for workloads on Kubernetes 25 | kedacore/keda-add-ons-http 0.10.0 0.10.0 Event-based autoscaler for HTTP workloads on Ku... 26 | ``` 27 | 28 | ## Releases 29 | 30 | You can find the latest releases [here](https://github.com/kedacore/charts/releases). 31 | 32 | ## Contributing 33 | 34 | You can find contributing guide [here](./CONTRIBUTING.md). 35 | -------------------------------------------------------------------------------- /docs/artifacthub-repo.yml: -------------------------------------------------------------------------------- 1 | # Configuration for our Artifact Hub repository 2 | # See https://github.com/artifacthub/hub/blob/master/docs/metadata/artifacthub-repo.yml 3 | repositoryID: e7f9f3ad-5080-4095-8ff9-98a0b71371b4 4 | owners: 5 | - name: KEDA Maintainers 6 | email: cncf-keda-maintainers@lists.cncf.io 7 | -------------------------------------------------------------------------------- /docs/external-scaler-azure-cosmos-db-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/external-scaler-azure-cosmos-db-0.1.0.tgz -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Helm charts for KEDA 5 | 6 | 7 | Helm charts for KEDA 8 | 9 | -------------------------------------------------------------------------------- /docs/keda-1.0.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-1.0.0.tgz -------------------------------------------------------------------------------- /docs/keda-1.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-1.1.0.tgz -------------------------------------------------------------------------------- /docs/keda-1.2.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-1.2.0.tgz -------------------------------------------------------------------------------- /docs/keda-1.3.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-1.3.0.tgz -------------------------------------------------------------------------------- /docs/keda-1.3.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-1.3.1.tgz -------------------------------------------------------------------------------- /docs/keda-1.3.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-1.3.2.tgz -------------------------------------------------------------------------------- /docs/keda-1.4.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-1.4.0.tgz -------------------------------------------------------------------------------- /docs/keda-1.4.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-1.4.1.tgz -------------------------------------------------------------------------------- /docs/keda-1.4.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-1.4.2.tgz -------------------------------------------------------------------------------- /docs/keda-1.5.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-1.5.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.0.0-beta.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.0.0-beta.tgz -------------------------------------------------------------------------------- /docs/keda-2.0.0-beta1.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.0.0-beta1.1.tgz -------------------------------------------------------------------------------- /docs/keda-2.0.0-beta1.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.0.0-beta1.2.tgz -------------------------------------------------------------------------------- /docs/keda-2.0.0-rc.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.0.0-rc.tgz -------------------------------------------------------------------------------- /docs/keda-2.0.0-rc2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.0.0-rc2.tgz -------------------------------------------------------------------------------- /docs/keda-2.0.0-rc3.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.0.0-rc3.tgz -------------------------------------------------------------------------------- /docs/keda-2.0.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.0.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.0.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.0.1.tgz -------------------------------------------------------------------------------- /docs/keda-2.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.1.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.1.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.1.1.tgz -------------------------------------------------------------------------------- /docs/keda-2.1.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.1.2.tgz -------------------------------------------------------------------------------- /docs/keda-2.1.3.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.1.3.tgz -------------------------------------------------------------------------------- /docs/keda-2.10.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.10.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.10.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.10.1.tgz -------------------------------------------------------------------------------- /docs/keda-2.10.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.10.2.tgz -------------------------------------------------------------------------------- /docs/keda-2.11.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.11.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.11.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.11.1.tgz -------------------------------------------------------------------------------- /docs/keda-2.11.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.11.2.tgz -------------------------------------------------------------------------------- /docs/keda-2.12.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.12.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.12.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.12.1.tgz -------------------------------------------------------------------------------- /docs/keda-2.13.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.13.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.13.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.13.1.tgz -------------------------------------------------------------------------------- /docs/keda-2.13.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.13.2.tgz -------------------------------------------------------------------------------- /docs/keda-2.14.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.14.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.14.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.14.1.tgz -------------------------------------------------------------------------------- /docs/keda-2.14.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.14.2.tgz -------------------------------------------------------------------------------- /docs/keda-2.14.3 copy.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.14.3 copy.tgz -------------------------------------------------------------------------------- /docs/keda-2.15.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.15.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.15.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.15.1.tgz -------------------------------------------------------------------------------- /docs/keda-2.15.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.15.2.tgz -------------------------------------------------------------------------------- /docs/keda-2.16.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.16.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.16.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.16.1.tgz -------------------------------------------------------------------------------- /docs/keda-2.17.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.17.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.17.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.17.1.tgz -------------------------------------------------------------------------------- /docs/keda-2.2.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.2.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.2.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.2.1.tgz -------------------------------------------------------------------------------- /docs/keda-2.2.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.2.2.tgz -------------------------------------------------------------------------------- /docs/keda-2.3.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.3.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.3.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.3.2.tgz -------------------------------------------------------------------------------- /docs/keda-2.4.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.4.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.5.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.5.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.5.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.5.1.tgz -------------------------------------------------------------------------------- /docs/keda-2.6.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.6.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.6.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.6.1.tgz -------------------------------------------------------------------------------- /docs/keda-2.6.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.6.2.tgz -------------------------------------------------------------------------------- /docs/keda-2.7.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.7.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.7.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.7.1.tgz -------------------------------------------------------------------------------- /docs/keda-2.7.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.7.2.tgz -------------------------------------------------------------------------------- /docs/keda-2.8.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.8.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.8.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.8.1.tgz -------------------------------------------------------------------------------- /docs/keda-2.8.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.8.2.tgz -------------------------------------------------------------------------------- /docs/keda-2.8.3.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.8.3.tgz -------------------------------------------------------------------------------- /docs/keda-2.8.4.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.8.4.tgz -------------------------------------------------------------------------------- /docs/keda-2.9.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.9.0.tgz -------------------------------------------------------------------------------- /docs/keda-2.9.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.9.1.tgz -------------------------------------------------------------------------------- /docs/keda-2.9.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.9.2.tgz -------------------------------------------------------------------------------- /docs/keda-2.9.3.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.9.3.tgz -------------------------------------------------------------------------------- /docs/keda-2.9.4.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-2.9.4.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.0.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.0.1.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.1.0.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.10.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.10.0.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.2.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.2.0.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.2.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.2.1.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.2.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.2.2.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.3.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.3.0.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.3.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.3.1.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.4.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.4.0.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.4.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.4.1.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.5.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.5.0.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.5.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.5.1.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.5.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.5.2.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.5.3.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.5.3.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.6.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.6.0.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.7.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.7.0.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.8.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.8.0.tgz -------------------------------------------------------------------------------- /docs/keda-add-ons-http-0.9.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kedacore/charts/a7908a18853d9fce025320a69f31d05881c92aa1/docs/keda-add-ons-http-0.9.0.tgz -------------------------------------------------------------------------------- /external-scaler-azure-cosmos-db/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | *.gotmpl 25 | -------------------------------------------------------------------------------- /external-scaler-azure-cosmos-db/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | type: application 3 | name: external-scaler-azure-cosmos-db 4 | description: Event-based autoscaler for Azure Cosmos DB change feed consumer applications 5 | 6 | # Specify the Kubernetes version range that we support. 7 | # We allow pre-release versions for cloud-specific Kubernetes versions such as v1.21.5-gke.1302 or v1.18.9-eks-d1db3c 8 | kubeVersion: ">=v1.17.0-0" 9 | 10 | # This is the chart version. This version number should be incremented each time you make changes 11 | # to the chart and its templates, including the app version. 12 | version: 0.1.0 13 | 14 | # This is the version number of the application being deployed. This version number should be 15 | # incremented each time you make changes to the application and it is recommended to use it with quotes. 16 | appVersion: 0.1.0 17 | 18 | home: https://github.com/kedacore/external-scaler-azure-cosmos-db 19 | sources: 20 | - https://github.com/kedacore/external-scaler-azure-cosmos-db 21 | maintainers: 22 | - name: Ahmed ElSayed 23 | email: ahmels@microsoft.com 24 | - name: Jatin Sanghvi 25 | email: jasanghv@microsoft.com 26 | - name: Tom Kerkhove 27 | email: tomkerkhove@microsoft.com 28 | -------------------------------------------------------------------------------- /external-scaler-azure-cosmos-db/README.md: -------------------------------------------------------------------------------- 1 | # KEDA External Scaler for Azure Cosmos DB 2 | 3 | Chart for installing KEDA external scaler for Azure Cosmos DB. 4 | 5 | - [Documentation](https://github.com/kedacore/external-scaler-azure-cosmos-db#readme) 6 | - [Release Notes](https://github.com/kedacore/external-scaler-azure-cosmos-db/releases/tag/v0.1.0) 7 | - [Example Usage](https://github.com/kedacore/external-scaler-azure-cosmos-db/tree/main/src/Scaler.Demo) 8 | 9 | ## Installation 10 | 11 | 1. Add and update Helm chart repo. 12 | 13 | ```shell 14 | helm repo add kedacore https://kedacore.github.io/charts 15 | helm repo update 16 | ``` 17 | 18 | 1. Install KEDA Helm chart (*or follow one of the other installation methods on [KEDA documentation](https://keda.sh/docs/deploy)*). 19 | 20 | ```shell 21 | helm install keda kedacore/keda --namespace keda --create-namespace 22 | ``` 23 | 24 | 1. Install Azure Cosmos DB external scaler Helm chart. 25 | 26 | ```shell 27 | helm install external-scaler-azure-cosmos-db kedacore/external-scaler-azure-cosmos-db --namespace keda --create-namespace 28 | ``` 29 | 30 | ## Values 31 | 32 | | Parameter | Type | Default | Description | 33 | |-----------|------|---------|-------------| 34 | | `additionalLabels` | object | `{}` | Additional labels that should be applied to all resources | 35 | | `image.pullPolicy` | string | `"Always"` | The image pull policy for Azure Cosmos DB external scaler | 36 | | `image.repository` | string | `"ghcr.io/kedacore/external-scaler-azure-cosmos-db"` | The Docker image repository to use for Azure Cosmos DB external scaler | 37 | | `image.tag` | string | `"0.1.0"` | The Docker image tag to use for Azure Cosmos DB external scaler | 38 | | `port` | int | `4050` | The incoming port for 'Azure Cosmos DB external scaler' service | 39 | | `resources.limits` | object | `{"cpu":"100m","memory":"512Mi"}` | The CPU/memory resource limit for the 'Azure Cosmos DB external scaler' pod | 40 | | `resources.requests` | object | `{"cpu":"10m","memory":"128Mi"}` | The CPU/memory resource request for the 'Azure Cosmos DB external scaler' pod | 41 | 42 | ---------------------------------------------- 43 | Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) 44 | -------------------------------------------------------------------------------- /external-scaler-azure-cosmos-db/README.md.gotmpl: -------------------------------------------------------------------------------- 1 | # KEDA External Scaler for Azure Cosmos DB 2 | 3 | Chart for installing KEDA external scaler for Azure Cosmos DB. 4 | 5 | - [Documentation](https://github.com/kedacore/external-scaler-azure-cosmos-db#readme) 6 | - [Release Notes](https://github.com/kedacore/external-scaler-azure-cosmos-db/releases/tag/v0.1.0) 7 | - [Example Usage](https://github.com/kedacore/external-scaler-azure-cosmos-db/tree/main/src/Scaler.Demo) 8 | 9 | ## Installation 10 | 11 | 1. Add and update Helm chart repo. 12 | 13 | ```shell 14 | helm repo add kedacore https://kedacore.github.io/charts 15 | helm repo update 16 | ``` 17 | 18 | 1. Install KEDA Helm chart (*or follow one of the other installation methods on [KEDA documentation](https://keda.sh/docs/deploy)*). 19 | 20 | ```shell 21 | helm install keda kedacore/keda --namespace keda --create-namespace 22 | ``` 23 | 24 | 1. Install Azure Cosmos DB external scaler Helm chart. 25 | 26 | ```shell 27 | helm install external-scaler-azure-cosmos-db kedacore/external-scaler-azure-cosmos-db --namespace keda --create-namespace 28 | ``` 29 | 30 | ## Values 31 | 32 | | Parameter | Type | Default | Description | 33 | |-----------|------|---------|-------------| 34 | {{- range .Values }} 35 | | `{{ .Key }}` | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | 36 | {{- end }} 37 | 38 | ---------------------------------------------- 39 | Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) 40 | -------------------------------------------------------------------------------- /external-scaler-azure-cosmos-db/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | 3 | {{/* 4 | Create chart name and version as used by the chart label. 5 | */}} 6 | {{- define "external-scaler-azure-cosmos-db.chart" -}} 7 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} 8 | {{- end -}} 9 | 10 | {{/* 11 | These labels will be applied to all Cosmos DB scaler resources in the chart. 12 | */}} 13 | {{- define "external-scaler-azure-cosmos-db.labels" }} 14 | helm.sh/chart: {{ include "external-scaler-azure-cosmos-db.chart" . }} 15 | app: {{ .Chart.Name }} 16 | control-plane: external-scaler 17 | keda.sh/addon: {{ .Chart.Name }} 18 | name: {{ .Chart.Name }} 19 | app.kubernetes.io/component: external-scaler 20 | app.kubernetes.io/instance: {{ .Release.Name }} 21 | app.kubernetes.io/managed-by: {{ .Release.Service }} 22 | app.kubernetes.io/name: {{ .Chart.Name }} 23 | app.kubernetes.io/part-of: {{ .Chart.Name }} 24 | app.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion }} 25 | {{- with .Values.additionalLabels }} 26 | {{ . | toYaml }} 27 | {{- end }} 28 | {{- end }} 29 | -------------------------------------------------------------------------------- /external-scaler-azure-cosmos-db/templates/scaler-deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Chart.Name }} 5 | namespace: {{ .Release.Namespace }} 6 | labels: 7 | {{- include "external-scaler-azure-cosmos-db.labels" . | indent 4 }} 8 | spec: 9 | replicas: 1 10 | selector: 11 | matchLabels: 12 | app: {{ .Chart.Name }} 13 | template: 14 | metadata: 15 | labels: 16 | {{- include "external-scaler-azure-cosmos-db.labels" . | indent 8 }} 17 | spec: 18 | containers: 19 | - name: {{ .Chart.Name }} 20 | image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }} 21 | imagePullPolicy: {{ .Values.image.pullPolicy | default "Always" }} 22 | ports: 23 | - name: scaler-grpc 24 | containerPort: 4050 25 | resources: 26 | {{- .Values.resources | toYaml | nindent 12 }} 27 | terminationGracePeriodSeconds: 10 28 | -------------------------------------------------------------------------------- /external-scaler-azure-cosmos-db/templates/scaler-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Chart.Name }} 5 | namespace: {{ .Release.Namespace }} 6 | labels: 7 | {{- include "external-scaler-azure-cosmos-db.labels" . | indent 4 }} 8 | spec: 9 | ports: 10 | - name: grpc 11 | port: {{ .Values.port | default 4050 }} 12 | targetPort: scaler-grpc 13 | selector: 14 | app: {{ .Chart.Name }} -------------------------------------------------------------------------------- /external-scaler-azure-cosmos-db/values.yaml: -------------------------------------------------------------------------------- 1 | # -- Additional labels that should be applied to all resources 2 | additionalLabels: {} 3 | # name: 4 | 5 | # Docker image configuration. 6 | image: 7 | # -- The Docker image repository to use for Azure Cosmos DB external scaler 8 | repository: ghcr.io/kedacore/external-scaler-azure-cosmos-db 9 | # -- The Docker image tag to use for Azure Cosmos DB external scaler 10 | tag: 0.1.0 11 | # -- The image pull policy for Azure Cosmos DB external scaler 12 | pullPolicy: Always 13 | 14 | # -- The incoming port for 'Azure Cosmos DB external scaler' service 15 | port: 4050 16 | 17 | # Container resource requests and limits. 18 | resources: 19 | # -- The CPU/memory resource request for the 'Azure Cosmos DB external scaler' pod 20 | requests: 21 | cpu: 10m 22 | memory: 128Mi 23 | # -- The CPU/memory resource limit for the 'Azure Cosmos DB external scaler' pod 24 | limits: 25 | cpu: 100m 26 | memory: 512Mi 27 | -------------------------------------------------------------------------------- /http-add-on/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | *.gotmpl 25 | -------------------------------------------------------------------------------- /http-add-on/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | type: application 3 | name: keda-add-ons-http 4 | description: Event-based autoscaler for HTTP workloads on Kubernetes 5 | 6 | # Specify the Kubernetes version range that we support. 7 | # We allow pre-release versions for cloud-specific Kubernetes versions such as v1.21.5-gke.1302 or v1.18.9-eks-d1db3c 8 | kubeVersion: ">=v1.23.0-0" 9 | 10 | # This is the chart version. This version number should be incremented each time you make changes 11 | # to the chart and its templates, including the app version. This is incremented at chart release time and does not need 12 | # to be included in any PRs to main. 13 | # Versions are expected to follow Semantic Versioning (https://semver.org/) 14 | version: 0.10.0 15 | 16 | # This is the version number of the application being deployed. This version number should be 17 | # incremented each time you make changes to the application. Versions are not expected to 18 | # follow Semantic Versioning. They should reflect the version the application is using. 19 | appVersion: 0.10.0 20 | home: https://github.com/kedacore/http-add-on 21 | sources: 22 | - https://github.com/kedacore/http-add-on 23 | maintainers: 24 | - name: Jorge Turrado 25 | email: jorge_turrado@hotmail.es 26 | - name: Zbynek Roubalik 27 | email: zbynek@kedify.io 28 | - name: Jan Wozniak 29 | email: jan@kedify.io 30 | -------------------------------------------------------------------------------- /http-add-on/README.md.gotmpl: -------------------------------------------------------------------------------- 1 |

2 | 3 |

Kubernetes-based Event Driven Autoscaling - HTTP Add-On

4 |

5 | 6 | The KEDA HTTP Add On allows Kubernetes users to automatically scale their HTTP servers up and down (including to/from zero) based on incoming HTTP traffic. Please see our [use cases document](./docs/use_cases.md) to learn more about how and why you would use this project. 7 | 8 | | 🚧 **Alpha - Not for production** 🚧| 9 | |---------------------------------------------| 10 | | ⚠ The HTTP add-on is in [experimental stage](https://github.com/kedacore/keda/issues/538) and not ready for production.

It is provided as-is without support. 11 | 12 | >This codebase moves very quickly. We can't currently guarantee that any part of it will work. Neither the complete feature set nor known issues may be fully documented. Similarly, issues filed against this project may not be responded to quickly or at all. **We will release and announce a beta release of this project**, and after we do that, we will document and respond to issues properly. 13 | 14 | ## Walkthrough 15 | 16 | Although this is an **alpha release** project right now, we have prepared a walkthrough document that with instructions on getting started for basic usage. 17 | 18 | See that document at [docs/walkthrough.md](https://github.com/kedacore/http-add-on/tree/main/docs/walkthrough.md) 19 | 20 | ## Design 21 | 22 | The HTTP add-on is composed of multiple mostly independent components. This design was chosen to allow for highly 23 | customizable installations while allowing us to ship reasonable defaults. 24 | 25 | - We have written a complete design document. Please see it at [docs/design.md](https://github.com/kedacore/http-add-on/tree/main/docs/design.md). 26 | - For more context on the design, please see our [scope document](https://github.com/kedacore/http-add-on/tree/main/docs/scope.md). 27 | - If you have further questions about the project, please see our [FAQ document](https://github.com/kedacore/http-add-on/tree/main/docs/faq.md). 28 | 29 | ## Installation 30 | 31 | Please see the [complete installation instructions](https://github.com/kedacore/http-add-on/tree/main/docs/install.md). 32 | 33 | ## Contributing 34 | 35 | Please see the [contributing documentation for all instructions](https://github.com/kedacore/http-add-on/tree/main/docs/contributing.md). 36 | 37 | --- 38 | We are a Cloud Native Computing Foundation (CNCF) graduated project. 39 |

40 | 41 | --- 42 | 43 | ## TL;DR 44 | 45 | ```console 46 | helm repo add kedacore https://kedacore.github.io/charts 47 | helm repo update 48 | 49 | helm install http-add-on kedacore/keda-add-ons-http --create-namespace --namespace keda --version {{ template "chart.appVersion" . }} 50 | ``` 51 | 52 | ## Introduction 53 | 54 | This chart bootstraps KEDA HTTP Add-on infrastructure on a Kubernetes cluster using the Helm package manager. 55 | 56 | As part of that, it will install all the required Custom Resource Definitions (CRD). 57 | 58 | ## Installing the Chart 59 | 60 | To install the chart with the release name `http-add-on`, please read the [install instructions on the official repository to get started](https://github.com/kedacore/http-add-on/tree/main/docs/install.md): 61 | 62 | ```console 63 | $ helm install http-add-on kedacore/keda-add-ons-http --namespace keda 64 | ``` 65 | 66 | > **Important:** This chart **needs** KEDA installed in your cluster to work properly. 67 | 68 | ## Uninstalling the Chart 69 | 70 | To uninstall/delete the `http-add-on` Helm chart: 71 | 72 | ```console 73 | helm uninstall http-add-on 74 | ``` 75 | 76 | The command removes all the Kubernetes components associated with the chart and deletes the release. 77 | 78 | ## Configuration 79 | 80 | The following table lists the configurable parameters of the HTTP Add-On chart and 81 | their default values. 82 | 83 | ### General parameters 84 | 85 | | Parameter | Type | Default | Description | 86 | |-----------|------|---------|-------------| 87 | {{- range .Values }} 88 | {{- if not (or (hasPrefix "operator" .Key) (hasPrefix "scaler" .Key) (hasPrefix "interceptor" .Key) ) }} 89 | | `{{ .Key }}` | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | 90 | {{- end }} 91 | {{- end }} 92 | 93 | ### Operator 94 | 95 | | Parameter | Type | Default | Description | 96 | |-----------|------|---------|-------------| 97 | {{- range .Values }} 98 | {{- if hasPrefix "operator" .Key }} 99 | | `{{ .Key }}` | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | 100 | {{- end }} 101 | {{- end }} 102 | 103 | ### Scaler 104 | 105 | | Parameter | Type | Default | Description | 106 | |-----------|------|---------|-------------| 107 | {{- range .Values }} 108 | {{- if hasPrefix "scaler" .Key }} 109 | | `{{ .Key }}` | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | 110 | {{- end }} 111 | {{- end }} 112 | 113 | ### Interceptor 114 | 115 | | Parameter | Type | Default | Description | 116 | |-----------|------|---------|-------------| 117 | {{- range .Values }} 118 | {{- if hasPrefix "interceptor" .Key }} 119 | | `{{ .Key }}` | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | 120 | {{- end }} 121 | {{- end }} 122 | 123 | Specify each parameter using the `--set key=value[,key=value]` argument to 124 | `helm install`. For example: 125 | 126 | ```console 127 | $ helm install http-add-on kedacore/keda-add-ons-http --namespace keda \ 128 | --set version= 129 | ``` 130 | 131 | Alternatively, a YAML file that specifies the values for the above parameters can 132 | be provided while installing the chart. For example, 133 | 134 | ```console 135 | helm install http-add-on kedacore/keda-add-ons-http --namespace keda -f values.yaml 136 | ``` 137 | 138 | ## KEDA is secure by default 139 | 140 | Our default configuration strives to be as secure as possible. Because of that, KEDA will run as non-root and be secure-by-default. You can define global securityContext for all components or switch to granular mode and define securityContext for operator, kuberbacproxy, scaler, and interceptor: 141 | ```yaml 142 | securityContext: 143 | allowPrivilegeEscalation: false 144 | capabilities: 145 | drop: 146 | - ALL 147 | privileged: false 148 | readOnlyRootFilesystem: true 149 | # runAsUser: 1000 150 | # runAsGroup: 1000 151 | # operator: 152 | # capabilities: 153 | # drop: 154 | # - ALL 155 | # allowPrivilegeEscalation: false 156 | # readOnlyRootFilesystem: true 157 | # seccompProfile: 158 | # type: RuntimeDefault 159 | # kuberbacproxy: 160 | # capabilities: 161 | # drop: 162 | # - ALL 163 | # allowPrivilegeEscalation: false 164 | # readOnlyRootFilesystem: true 165 | # seccompProfile: 166 | # type: RuntimeDefault 167 | # scaler: 168 | # capabilities: 169 | # drop: 170 | # - ALL 171 | # allowPrivilegeEscalation: false 172 | # readOnlyRootFilesystem: true 173 | # seccompProfile: 174 | # type: RuntimeDefault 175 | # interceptor: 176 | # capabilities: 177 | # drop: 178 | # - ALL 179 | # allowPrivilegeEscalation: false 180 | # readOnlyRootFilesystem: true 181 | # seccompProfile: 182 | # type: RuntimeDefault 183 | podSecurityContext: 184 | fsGroup: 1000 185 | supplementalGroups: 186 | - 1000 187 | # operator: 188 | # runAsNonRoot: true 189 | # runAsUser: 1000 190 | # runAsGroup: 1000 191 | # fsGroup: 1000 192 | # scaler: 193 | # runAsNonRoot: true 194 | # runAsUser: 1000 195 | # runAsGroup: 1000 196 | # fsGroup: 1000 197 | # interceptor: 198 | # runAsNonRoot: true 199 | # runAsUser: 1000 200 | # runAsGroup: 1000 201 | # fsGroup: 1000 202 | ``` 203 | 204 | ---------------------------------------------- 205 | Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) 206 | -------------------------------------------------------------------------------- /http-add-on/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | 3 | {{/* 4 | Create chart name and version as used by the chart label. 5 | */}} 6 | {{- define "keda-http-add-on.chart" -}} 7 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} 8 | {{- end -}} 9 | 10 | {{/* 11 | Generate match labels 12 | IMPORTANT: Any change of these labels will block 13 | future upgrades 14 | */}} 15 | {{- define "keda-http-add-on.matchLabels" }} 16 | app.kubernetes.io/part-of: {{ .Chart.Name }} 17 | app.kubernetes.io/managed-by: {{ .Release.Service }} 18 | app.kubernetes.io/instance: {{ .Release.Name }} 19 | {{- end }} 20 | 21 | {{/* 22 | Generate basic labels 23 | */}} 24 | {{- define "keda-http-add-on.labels" }} 25 | {{- include "keda-http-add-on.matchLabels" . }} 26 | app.kubernetes.io/version: {{ .Values.images.tag | default .Chart.AppVersion }} 27 | helm.sh/chart: {{ include "keda-http-add-on.chart" . }} 28 | {{- if .Values.additionalLabels }} 29 | {{ toYaml .Values.additionalLabels }} 30 | {{- end }} 31 | {{- end }} 32 | -------------------------------------------------------------------------------- /http-add-on/templates/crd.yaml: -------------------------------------------------------------------------------- 1 | {{ if .Values.crds.install }} 2 | apiVersion: apiextensions.k8s.io/v1 3 | kind: CustomResourceDefinition 4 | metadata: 5 | annotations: 6 | controller-gen.kubebuilder.io/version: v0.15.0 7 | name: httpscaledobjects.http.keda.sh 8 | spec: 9 | group: http.keda.sh 10 | names: 11 | kind: HTTPScaledObject 12 | listKind: HTTPScaledObjectList 13 | plural: httpscaledobjects 14 | shortNames: 15 | - httpso 16 | singular: httpscaledobject 17 | scope: Namespaced 18 | versions: 19 | - additionalPrinterColumns: 20 | - jsonPath: .status.targetWorkload 21 | name: TargetWorkload 22 | type: string 23 | - jsonPath: .status.targetService 24 | name: TargetService 25 | type: string 26 | - jsonPath: .spec.replicas.min 27 | name: MinReplicas 28 | type: integer 29 | - jsonPath: .spec.replicas.max 30 | name: MaxReplicas 31 | type: integer 32 | - jsonPath: .metadata.creationTimestamp 33 | name: Age 34 | type: date 35 | - jsonPath: .status.conditions[?(@.reason=="HTTPScaledObjectIsReady")].status 36 | name: Active 37 | type: string 38 | name: v1alpha1 39 | schema: 40 | openAPIV3Schema: 41 | description: HTTPScaledObject is the Schema for the httpscaledobjects API 42 | properties: 43 | apiVersion: 44 | description: |- 45 | APIVersion defines the versioned schema of this representation of an object. 46 | Servers should convert recognized schemas to the latest internal value, and 47 | may reject unrecognized values. 48 | More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 49 | type: string 50 | kind: 51 | description: |- 52 | Kind is a string value representing the REST resource this object represents. 53 | Servers may infer this from the endpoint the client submits requests to. 54 | Cannot be updated. 55 | In CamelCase. 56 | More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 57 | type: string 58 | metadata: 59 | type: object 60 | spec: 61 | description: HTTPScaledObjectSpec defines the desired state of HTTPScaledObject 62 | properties: 63 | hosts: 64 | description: |- 65 | The hosts to route. All requests which the "Host" header 66 | matches any .spec.hosts (and the Request Target matches any 67 | .spec.pathPrefixes) will be routed to the Service and Port specified in 68 | the scaleTargetRef. 69 | items: 70 | type: string 71 | type: array 72 | initialCooldownPeriod: 73 | description: (optional) Initial period before scaling 74 | format: int32 75 | type: integer 76 | pathPrefixes: 77 | description: |- 78 | The paths to route. All requests which the Request Target matches any 79 | .spec.pathPrefixes (and the "Host" header matches any .spec.hosts) 80 | will be routed to the Service and Port specified in 81 | the scaleTargetRef. 82 | items: 83 | type: string 84 | type: array 85 | replicas: 86 | description: (optional) Replica information 87 | properties: 88 | max: 89 | description: Maximum amount of replicas to have in the deployment 90 | (Default 100) 91 | format: int32 92 | type: integer 93 | min: 94 | description: Minimum amount of replicas to have in the deployment 95 | (Default 0) 96 | format: int32 97 | type: integer 98 | type: object 99 | scaleTargetRef: 100 | description: |- 101 | The name of the deployment to route HTTP requests to (and to autoscale). 102 | Including validation as a requirement to define either the PortName or the Port 103 | properties: 104 | apiVersion: 105 | type: string 106 | kind: 107 | type: string 108 | name: 109 | type: string 110 | port: 111 | description: The port to route to 112 | format: int32 113 | type: integer 114 | portName: 115 | description: The port to route to referenced by name 116 | type: string 117 | service: 118 | description: The name of the service to route to 119 | type: string 120 | required: 121 | - service 122 | type: object 123 | x-kubernetes-validations: 124 | - message: must define either the 'portName' or the 'port' 125 | rule: has(self.portName) != has(self.port) 126 | scaledownPeriod: 127 | description: (optional) Cooldown period value 128 | format: int32 129 | type: integer 130 | scalingMetric: 131 | description: (optional) Configuration for the metric used for scaling 132 | properties: 133 | concurrency: 134 | description: Scaling based on concurrent requests for a given 135 | target 136 | properties: 137 | targetValue: 138 | default: 100 139 | description: Target value for rate scaling 140 | type: integer 141 | type: object 142 | requestRate: 143 | description: Scaling based the average rate during an specific 144 | time window for a given target 145 | properties: 146 | granularity: 147 | default: 1s 148 | description: Time granularity for rate calculation 149 | type: string 150 | targetValue: 151 | default: 100 152 | description: Target value for rate scaling 153 | type: integer 154 | window: 155 | default: 1m 156 | description: Time window for rate calculation 157 | type: string 158 | type: object 159 | type: object 160 | targetPendingRequests: 161 | description: (optional) DEPRECATED (use ScalingMetric instead) Target 162 | metric value 163 | format: int32 164 | type: integer 165 | required: 166 | - scaleTargetRef 167 | type: object 168 | status: 169 | description: HTTPScaledObjectStatus defines the observed state of HTTPScaledObject 170 | properties: 171 | conditions: 172 | description: Conditions of the operator 173 | items: 174 | description: HTTPScaledObjectCondition stores the condition state 175 | properties: 176 | message: 177 | description: Message indicating details about the transition. 178 | type: string 179 | reason: 180 | description: Reason for the condition's last transition. 181 | enum: 182 | - ErrorCreatingAppScaledObject 183 | - AppScaledObjectCreated 184 | - TerminatingResources 185 | - AppScaledObjectTerminated 186 | - AppScaledObjectTerminationError 187 | - PendingCreation 188 | - HTTPScaledObjectIsReady 189 | type: string 190 | status: 191 | description: Status of the condition, one of True, False, Unknown. 192 | type: string 193 | timestamp: 194 | description: Timestamp of the condition 195 | type: string 196 | type: 197 | description: Type of condition 198 | enum: 199 | - Ready 200 | type: string 201 | required: 202 | - status 203 | - type 204 | type: object 205 | type: array 206 | targetService: 207 | description: TargetService reflects details about the scaled service. 208 | type: string 209 | targetWorkload: 210 | description: TargetWorkload reflects details about the scaled workload. 211 | type: string 212 | type: object 213 | type: object 214 | served: true 215 | storage: true 216 | subresources: 217 | status: {} 218 | {{ end }} 219 | -------------------------------------------------------------------------------- /http-add-on/templates/interceptor/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | labels: 5 | app.kubernetes.io/component: interceptor 6 | app.kubernetes.io/name: http-add-on 7 | {{- include "keda-http-add-on.labels" . | indent 4 }} 8 | name: {{ .Chart.Name }}-interceptor 9 | namespace: {{ .Release.Namespace }} 10 | spec: 11 | selector: 12 | matchLabels: 13 | app.kubernetes.io/component: interceptor 14 | app.kubernetes.io/name: http-add-on 15 | {{- include "keda-http-add-on.matchLabels" . | indent 6 }} 16 | template: 17 | metadata: 18 | labels: 19 | app.kubernetes.io/component: interceptor 20 | app.kubernetes.io/name: http-add-on 21 | {{- include "keda-http-add-on.labels" . | indent 8 }} 22 | annotations: 23 | {{- with .Values.interceptor.podAnnotations }} 24 | {{- range $key, $value := . }} 25 | {{ $key }}: {{ $value | quote }} 26 | {{- end }} 27 | {{- end }} 28 | spec: 29 | imagePullSecrets: 30 | {{- toYaml .Values.interceptor.imagePullSecrets | nindent 8 }} 31 | serviceAccountName: {{ .Chart.Name }}-interceptor 32 | {{- if .Values.podSecurityContext.interceptor }} 33 | securityContext: 34 | {{- toYaml .Values.podSecurityContext.interceptor | nindent 8 }} 35 | {{- else }} 36 | securityContext: 37 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 38 | {{- end }} 39 | containers: 40 | - args: 41 | - "--zap-log-level={{ .Values.logging.interceptor.level }}" 42 | - "--zap-encoder={{ .Values.logging.interceptor.format }}" 43 | - "--zap-time-encoding={{ .Values.logging.interceptor.timeEncoding }}" 44 | {{- if .Values.logging.interceptor.stackTracesEnabled }} 45 | - "--zap-stacktrace-level=error" 46 | {{- end }} 47 | image: "{{ .Values.images.interceptor }}:{{ .Values.images.tag | default .Chart.AppVersion }}" 48 | imagePullPolicy: '{{ .Values.interceptor.pullPolicy | default "Always" }}' 49 | name: "{{ .Chart.Name }}-interceptor" 50 | env: 51 | - name: KEDA_HTTP_CURRENT_NAMESPACE 52 | value: "{{ .Release.Namespace }}" 53 | - name: KEDA_HTTP_PROXY_PORT 54 | value: "{{ .Values.interceptor.proxy.port }}" 55 | - name: KEDA_HTTP_ADMIN_PORT 56 | value: "{{ .Values.interceptor.admin.port }}" 57 | - name: KEDA_HTTP_CONNECT_TIMEOUT 58 | value: "{{ .Values.interceptor.tcpConnectTimeout }}" 59 | - name: KEDA_HTTP_KEEP_ALIVE 60 | value: "{{ .Values.interceptor.keepAlive }}" 61 | - name: KEDA_RESPONSE_HEADER_TIMEOUT 62 | value: "{{ .Values.interceptor.responseHeaderTimeout }}" 63 | - name: KEDA_CONDITION_WAIT_TIMEOUT 64 | value: "{{ .Values.interceptor.replicas.waitTimeout }}" 65 | - name: KEDA_HTTP_ENDPOINTS_CACHE_POLLING_INTERVAL_MS 66 | value: "{{ .Values.interceptor.endpointsCachePollingIntervalMS }}" 67 | - name: KEDA_HTTP_FORCE_HTTP2 68 | value: "{{ .Values.interceptor.forceHTTP2 }}" 69 | - name: KEDA_HTTP_MAX_IDLE_CONNS 70 | value: "{{ .Values.interceptor.maxIdleConns }}" 71 | - name: KEDA_HTTP_IDLE_CONN_TIMEOUT 72 | value: "{{ .Values.interceptor.idleConnTimeout }}" 73 | - name: KEDA_HTTP_TLS_HANDSHAKE_TIMEOUT 74 | value: "{{ .Values.interceptor.tlsHandshakeTimeout }}" 75 | - name: KEDA_HTTP_EXPECT_CONTINUE_TIMEOUT 76 | value: "{{ .Values.interceptor.expectContinueTimeout }}" 77 | {{- if .Values.interceptor.tls.enabled }} 78 | - name: KEDA_HTTP_PROXY_TLS_ENABLED 79 | value: "true" 80 | - name: KEDA_HTTP_PROXY_TLS_CERT_PATH 81 | value: "{{ .Values.interceptor.tls.cert_path }}" 82 | - name: KEDA_HTTP_PROXY_TLS_KEY_PATH 83 | value: "{{ .Values.interceptor.tls.key_path }}" 84 | - name: KEDA_HTTP_PROXY_TLS_PORT 85 | value: "{{ .Values.interceptor.tls.port }}" 86 | {{- end }} 87 | ports: 88 | - containerPort: {{ .Values.interceptor.admin.port }} 89 | name: admin 90 | - containerPort: {{ .Values.interceptor.proxy.port }} 91 | name: proxy 92 | {{- if .Values.interceptor.tls.enabled }} 93 | - containerPort: {{ .Values.interceptor.tls.port }} 94 | name: proxy-tls 95 | volumeMounts: 96 | - readOnly: true 97 | mountPath: "/certs" 98 | name: certs 99 | {{- end }} 100 | livenessProbe: 101 | httpGet: 102 | path: /livez 103 | port: proxy 104 | readinessProbe: 105 | httpGet: 106 | path: /readyz 107 | port: proxy 108 | resources: 109 | {{- toYaml .Values.interceptor.resources | nindent 10 }} 110 | {{- if .Values.securityContext.interceptor }} 111 | securityContext: 112 | {{- toYaml .Values.securityContext.interceptor | nindent 10 }} 113 | {{- else }} 114 | securityContext: 115 | {{- toYaml .Values.securityContext | nindent 10 }} 116 | {{- end }} 117 | terminationGracePeriodSeconds: 10 118 | {{- if .Values.interceptor.tls.enabled }} 119 | volumes: 120 | - name: certs 121 | secret: 122 | secretName: {{ .Values.interceptor.tls.cert_secret }} 123 | {{- end }} 124 | nodeSelector: 125 | kubernetes.io/os: linux 126 | {{- with .Values.interceptor.nodeSelector }} 127 | {{- toYaml . | nindent 8 }} 128 | {{- end }} 129 | {{- with .Values.interceptor.affinity }} 130 | affinity: 131 | {{- toYaml . | nindent 8 }} 132 | {{- end }} 133 | {{- with .Values.interceptor.tolerations }} 134 | tolerations: 135 | {{- toYaml . | nindent 8 }} 136 | {{- end }} 137 | {{- with .Values.interceptor.topologySpreadConstraints }} 138 | topologySpreadConstraints: 139 | {{- toYaml . | nindent 8 }} 140 | {{- end }} 141 | -------------------------------------------------------------------------------- /http-add-on/templates/interceptor/poddisruptionbudget.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.interceptor.pdb.enabled -}} 2 | apiVersion: policy/v1 3 | kind: PodDisruptionBudget 4 | metadata: 5 | labels: 6 | app.kubernetes.io/component: interceptor 7 | app.kubernetes.io/name: http-add-on 8 | {{- include "keda-http-add-on.labels" . | indent 4 }} 9 | name: {{ .Chart.Name }}-interceptor 10 | namespace: {{ .Release.Namespace }} 11 | spec: 12 | selector: 13 | matchLabels: 14 | app.kubernetes.io/component: interceptor 15 | app.kubernetes.io/name: http-add-on 16 | {{- include "keda-http-add-on.matchLabels" . | indent 6 }} 17 | {{- if .Values.interceptor.pdb.minAvailable }} 18 | minAvailable: {{ .Values.interceptor.pdb.minAvailable }} 19 | {{- end }} 20 | {{- if .Values.interceptor.pdb.maxUnavailable }} 21 | maxUnavailable: {{ .Values.interceptor.pdb.maxUnavailable }} 22 | {{- end }} 23 | {{- end -}} 24 | -------------------------------------------------------------------------------- /http-add-on/templates/interceptor/rbac.yml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | labels: 5 | app.kubernetes.io/component: interceptor 6 | app.kubernetes.io/name: http-add-on 7 | {{- include "keda-http-add-on.labels" . | indent 4 }} 8 | name: {{ .Chart.Name }}-interceptor 9 | rules: 10 | - apiGroups: 11 | - "" 12 | resources: 13 | - endpoints 14 | verbs: 15 | - get 16 | - list 17 | - watch 18 | - apiGroups: 19 | - "" 20 | resources: 21 | - services 22 | verbs: 23 | - get 24 | - list 25 | - watch 26 | - apiGroups: 27 | - http.keda.sh 28 | resources: 29 | - httpscaledobjects 30 | verbs: 31 | - get 32 | - list 33 | - watch 34 | --- 35 | apiVersion: rbac.authorization.k8s.io/v1 36 | kind: ClusterRoleBinding 37 | metadata: 38 | labels: 39 | httpscaledobjects.http.keda.sh/version: {{ .Values.images.tag | default .Chart.AppVersion }} 40 | keda.sh/addon: {{ .Chart.Name }} 41 | app: {{ .Chart.Name }} 42 | name: {{ .Chart.Name }}-interceptor 43 | app.kubernetes.io/component: interceptor 44 | app.kubernetes.io/name: http-add-on 45 | {{- include "keda-http-add-on.labels" . | indent 4 }} 46 | name: {{ .Chart.Name }}-interceptor 47 | roleRef: 48 | apiGroup: rbac.authorization.k8s.io 49 | kind: ClusterRole 50 | name: {{ .Chart.Name }}-interceptor 51 | subjects: 52 | - kind: ServiceAccount 53 | name: {{ .Chart.Name }}-interceptor 54 | namespace: {{ .Release.Namespace }} 55 | -------------------------------------------------------------------------------- /http-add-on/templates/interceptor/scaledobject.yaml: -------------------------------------------------------------------------------- 1 | # this is the ScaledObject that tells KEDA to scale the interceptor fleet 2 | apiVersion: keda.sh/v1alpha1 3 | kind: ScaledObject 4 | metadata: 5 | name: "{{ .Chart.Name }}-interceptor" 6 | namespace: {{ .Release.Namespace }} 7 | labels: 8 | app.kubernetes.io/component: interceptor 9 | app.kubernetes.io/name: http-add-on 10 | {{- include "keda-http-add-on.labels" . | indent 4 }} 11 | spec: 12 | minReplicaCount: {{ .Values.interceptor.replicas.min }} 13 | maxReplicaCount: {{ .Values.interceptor.replicas.max }} 14 | pollingInterval: {{ .Values.interceptor.scaledObject.pollingInterval }} 15 | scaleTargetRef: 16 | name: "{{ .Chart.Name }}-interceptor" 17 | kind: Deployment 18 | triggers: 19 | - type: external 20 | metadata: 21 | scalerAddress: "{{ .Chart.Name }}-{{ .Values.scaler.service }}.{{ .Release.Namespace }}:{{ default 9091 .Values.scaler.grpcPort }}" 22 | interceptorTargetPendingRequests: "{{ default 200 .Values.scaler.pendingRequestsInterceptor }}" 23 | -------------------------------------------------------------------------------- /http-add-on/templates/interceptor/service-admin.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | app.kubernetes.io/component: interceptor 6 | app.kubernetes.io/name: http-add-on 7 | {{- include "keda-http-add-on.labels" . | indent 4 }} 8 | name: "{{ .Chart.Name }}-{{ .Values.interceptor.admin.service }}" 9 | namespace: {{ .Release.Namespace }} 10 | spec: 11 | ports: 12 | - name: admin 13 | port: {{ default 9091 .Values.interceptor.admin.port }} 14 | targetPort: admin 15 | selector: 16 | app.kubernetes.io/component: interceptor 17 | app.kubernetes.io/name: http-add-on 18 | {{- include "keda-http-add-on.matchLabels" . | indent 4 }} 19 | -------------------------------------------------------------------------------- /http-add-on/templates/interceptor/service-proxy.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | app.kubernetes.io/component: interceptor 6 | app.kubernetes.io/name: http-add-on 7 | {{- include "keda-http-add-on.labels" . | indent 4 }} 8 | name: "{{ .Chart.Name }}-{{ .Values.interceptor.proxy.service }}" 9 | namespace: {{ .Release.Namespace }} 10 | spec: 11 | ports: 12 | - name: proxy 13 | port: {{ default 9091 .Values.interceptor.proxy.port }} 14 | targetPort: proxy 15 | {{- if .Values.interceptor.tls.enabled }} 16 | - name: proxy-tls 17 | port: {{ default 8443 .Values.interceptor.tls.port }} 18 | targetPort: proxy-tls 19 | {{- end }} 20 | selector: 21 | app.kubernetes.io/component: interceptor 22 | app.kubernetes.io/name: http-add-on 23 | {{- include "keda-http-add-on.matchLabels" . | indent 4 }} 24 | -------------------------------------------------------------------------------- /http-add-on/templates/interceptor/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | labels: 5 | app.kubernetes.io/component: interceptor 6 | app.kubernetes.io/name: http-add-on 7 | {{- include "keda-http-add-on.labels" . | indent 4 }} 8 | name: {{ .Chart.Name }}-interceptor 9 | namespace: {{ .Release.Namespace }} 10 | -------------------------------------------------------------------------------- /http-add-on/templates/operator/deployment.yaml: -------------------------------------------------------------------------------- 1 | {{- if gt (int .Values.operator.replicas) 0 }} 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | labels: 6 | app.kubernetes.io/component: operator 7 | app.kubernetes.io/name: http-add-on 8 | {{- include "keda-http-add-on.labels" . | indent 4 }} 9 | name: {{ .Chart.Name }}-controller-manager 10 | namespace: {{ .Release.Namespace }} 11 | spec: 12 | replicas: {{ .Values.operator.replicas }} 13 | selector: 14 | matchLabels: 15 | app.kubernetes.io/component: operator 16 | app.kubernetes.io/name: http-add-on 17 | {{- include "keda-http-add-on.matchLabels" . | indent 6 }} 18 | template: 19 | metadata: 20 | labels: 21 | app.kubernetes.io/component: operator 22 | app.kubernetes.io/name: http-add-on 23 | {{- include "keda-http-add-on.labels" . | indent 8 }} 24 | annotations: 25 | {{- with .Values.operator.podAnnotations }} 26 | {{- range $key, $value := . }} 27 | {{ $key }}: {{ $value | quote }} 28 | {{- end }} 29 | {{- end }} 30 | spec: 31 | imagePullSecrets: 32 | {{- toYaml .Values.operator.imagePullSecrets | nindent 8 }} 33 | serviceAccountName: {{ .Chart.Name }} 34 | {{- if .Values.podSecurityContext.operator }} 35 | securityContext: 36 | {{- toYaml .Values.podSecurityContext.operator | nindent 8 }} 37 | {{- else }} 38 | securityContext: 39 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 40 | {{- end }} 41 | containers: 42 | - args: 43 | - --secure-listen-address=0.0.0.0:{{ .Values.operator.port | default 8443 }} 44 | - --upstream=http://127.0.0.1:8080/ 45 | - --logtostderr=true 46 | - --v={{ .Values.logging.operator.kubeRbacProxy.level }} 47 | image: "{{ .Values.images.kubeRbacProxy.name }}:{{ .Values.images.kubeRbacProxy.tag }}" 48 | name: kube-rbac-proxy 49 | resources: 50 | {{- toYaml .Values.operator.kubeRbacProxy.resources | nindent 10 }} 51 | {{- if .Values.securityContext.kuberbacproxy }} 52 | securityContext: 53 | {{- toYaml .Values.securityContext.kuberbacproxy | nindent 10 }} 54 | {{- else }} 55 | securityContext: 56 | {{- toYaml .Values.securityContext | nindent 10 }} 57 | {{- end }} 58 | - args: 59 | - --metrics-bind-address=127.0.0.1:8080 60 | - --leader-elect 61 | - --zap-log-level={{ .Values.logging.operator.level }} 62 | - --zap-time-encoding={{ .Values.logging.operator.timeEncoding }} 63 | - --zap-encoder={{ .Values.logging.operator.format }} 64 | {{- if .Values.logging.operator.stackTracesEnabled }} 65 | - "--zap-stacktrace-level=error" 66 | {{- end }} 67 | image: "{{ .Values.images.operator }}:{{ .Values.images.tag | default .Chart.AppVersion }}" 68 | imagePullPolicy: '{{ .Values.operator.pullPolicy | default "Always" }}' 69 | name: "{{ .Chart.Name }}-operator" 70 | env: 71 | - name: KEDAHTTP_OPERATOR_EXTERNAL_SCALER_SERVICE 72 | value: "{{ .Chart.Name }}-{{ .Values.scaler.service }}" 73 | - name: KEDAHTTP_OPERATOR_EXTERNAL_SCALER_PORT 74 | value: "{{ default 9090 .Values.scaler.grpcPort }}" 75 | - name: KEDA_HTTP_OPERATOR_NAMESPACE 76 | value: "{{ .Release.Namespace }}" 77 | - name: KEDA_HTTP_OPERATOR_WATCH_NAMESPACE 78 | value: "{{ .Values.operator.watchNamespace }}" 79 | ports: 80 | - name: metrics 81 | containerPort: 8080 82 | - name: probes 83 | containerPort: 8081 84 | livenessProbe: 85 | httpGet: 86 | path: /healthz 87 | port: probes 88 | readinessProbe: 89 | httpGet: 90 | path: /readyz 91 | port: probes 92 | resources: 93 | {{- toYaml .Values.operator.resources | nindent 10 }} 94 | {{- if .Values.securityContext.operator }} 95 | securityContext: 96 | {{- toYaml .Values.securityContext.operator | nindent 10 }} 97 | {{- else }} 98 | securityContext: 99 | {{- toYaml .Values.securityContext | nindent 10 }} 100 | {{- end }} 101 | terminationGracePeriodSeconds: 10 102 | nodeSelector: 103 | kubernetes.io/os: linux 104 | {{- with .Values.operator.nodeSelector }} 105 | {{- toYaml . | nindent 8 }} 106 | {{- end }} 107 | {{- with .Values.operator.affinity }} 108 | affinity: 109 | {{- toYaml . | nindent 8 }} 110 | {{- end }} 111 | {{- with .Values.operator.tolerations }} 112 | tolerations: 113 | {{- toYaml . | nindent 8 }} 114 | {{- end }} 115 | {{- end }} 116 | -------------------------------------------------------------------------------- /http-add-on/templates/operator/rbac.yml: -------------------------------------------------------------------------------- 1 | {{- if gt (int .Values.operator.replicas) 0 }} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: Role 4 | metadata: 5 | labels: 6 | app.kubernetes.io/component: operator 7 | app.kubernetes.io/name: http-add-on 8 | {{- include "keda-http-add-on.labels" . | indent 4 }} 9 | name: {{ .Chart.Name }}-role 10 | namespace: {{ .Release.Namespace }} 11 | rules: 12 | - apiGroups: 13 | - "" 14 | resources: 15 | - events 16 | verbs: 17 | - create 18 | - patch 19 | - apiGroups: 20 | - coordination.k8s.io 21 | resources: 22 | - leases 23 | verbs: 24 | - create 25 | - delete 26 | - get 27 | - list 28 | - patch 29 | - update 30 | - watch 31 | --- 32 | apiVersion: rbac.authorization.k8s.io/v1 33 | kind: ClusterRole 34 | metadata: 35 | labels: 36 | httpscaledobjects.http.keda.sh/version: {{ .Values.images.tag | default .Chart.AppVersion }} 37 | keda.sh/addon: {{ .Chart.Name }} 38 | app: {{ .Chart.Name }} 39 | name: {{ .Chart.Name }}-role 40 | app.kubernetes.io/component: operator 41 | app.kubernetes.io/name: http-add-on 42 | {{- include "keda-http-add-on.labels" . | indent 4 }} 43 | name: {{ .Chart.Name }}-role 44 | rules: 45 | - apiGroups: 46 | - http.keda.sh 47 | resources: 48 | - httpscaledobjects 49 | verbs: 50 | - create 51 | - delete 52 | - get 53 | - list 54 | - patch 55 | - update 56 | - watch 57 | - apiGroups: 58 | - http.keda.sh 59 | resources: 60 | - httpscaledobjects/finalizers 61 | verbs: 62 | - update 63 | - apiGroups: 64 | - http.keda.sh 65 | resources: 66 | - httpscaledobjects/status 67 | verbs: 68 | - get 69 | - patch 70 | - update 71 | - apiGroups: 72 | - keda.sh 73 | resources: 74 | - scaledobjects 75 | verbs: 76 | - create 77 | - delete 78 | - get 79 | - list 80 | - patch 81 | - update 82 | - watch 83 | --- 84 | apiVersion: rbac.authorization.k8s.io/v1 85 | kind: ClusterRole 86 | metadata: 87 | labels: 88 | httpscaledobjects.http.keda.sh/version: {{ .Values.images.tag | default .Chart.AppVersion }} 89 | keda.sh/addon: {{ .Chart.Name }} 90 | app: {{ .Chart.Name }} 91 | name: {{ .Chart.Name }}-proxy-role 92 | app.kubernetes.io/component: operator 93 | app.kubernetes.io/name: http-add-on 94 | {{- include "keda-http-add-on.labels" . | indent 4 }} 95 | name: {{ .Chart.Name }}-proxy-role 96 | rules: 97 | - apiGroups: ["authentication.k8s.io"] 98 | resources: 99 | - tokenreviews 100 | verbs: ["create"] 101 | - apiGroups: ["authorization.k8s.io"] 102 | resources: 103 | - subjectaccessreviews 104 | verbs: ["create"] 105 | --- 106 | apiVersion: rbac.authorization.k8s.io/v1 107 | kind: ClusterRole 108 | metadata: 109 | labels: 110 | httpscaledobjects.http.keda.sh/version: {{ .Values.images.tag | default .Chart.AppVersion }} 111 | keda.sh/addon: {{ .Chart.Name }} 112 | app: {{ .Chart.Name }} 113 | name: {{ .Chart.Name }}-metrics-reader 114 | app.kubernetes.io/component: operator 115 | app.kubernetes.io/name: http-add-on 116 | {{- include "keda-http-add-on.labels" . | indent 4 }} 117 | name: {{ .Chart.Name }}-metrics-reader 118 | rules: 119 | - nonResourceURLs: 120 | - /metrics 121 | verbs: 122 | - get 123 | --- 124 | apiVersion: rbac.authorization.k8s.io/v1 125 | kind: RoleBinding 126 | metadata: 127 | labels: 128 | httpscaledobjects.http.keda.sh/version: {{ .Values.images.tag | default .Chart.AppVersion }} 129 | keda.sh/addon: {{ .Chart.Name }} 130 | app: {{ .Chart.Name }} 131 | name: {{ .Chart.Name }}-role-binding 132 | app.kubernetes.io/component: operator 133 | app.kubernetes.io/name: http-add-on 134 | {{- include "keda-http-add-on.labels" . | indent 4 }} 135 | name: {{ .Chart.Name }}-role-rolebinding 136 | namespace: {{ .Release.Namespace }} 137 | roleRef: 138 | apiGroup: rbac.authorization.k8s.io 139 | kind: Role 140 | name: {{ .Chart.Name }}-role 141 | subjects: 142 | - kind: ServiceAccount 143 | name: {{ .Chart.Name }} 144 | namespace: {{ .Release.Namespace }} 145 | --- 146 | apiVersion: rbac.authorization.k8s.io/v1 147 | kind: ClusterRoleBinding 148 | metadata: 149 | labels: 150 | httpscaledobjects.http.keda.sh/version: {{ .Values.images.tag | default .Chart.AppVersion }} 151 | keda.sh/addon: {{ .Chart.Name }} 152 | app: {{ .Chart.Name }} 153 | name: {{ .Chart.Name }}-rolebinding 154 | app.kubernetes.io/component: operator 155 | app.kubernetes.io/name: http-add-on 156 | {{- include "keda-http-add-on.labels" . | indent 4 }} 157 | name: {{ .Chart.Name }}-rolebinding 158 | roleRef: 159 | apiGroup: rbac.authorization.k8s.io 160 | kind: ClusterRole 161 | name: {{ .Chart.Name }}-role 162 | subjects: 163 | - kind: ServiceAccount 164 | name: {{ .Chart.Name }} 165 | namespace: {{ .Release.Namespace }} 166 | --- 167 | apiVersion: rbac.authorization.k8s.io/v1 168 | kind: ClusterRoleBinding 169 | metadata: 170 | labels: 171 | httpscaledobjects.http.keda.sh/version: {{ .Values.images.tag | default .Chart.AppVersion }} 172 | keda.sh/addon: {{ .Chart.Name }} 173 | app: {{ .Chart.Name }} 174 | name: {{ .Chart.Name }}-rolebinding 175 | app.kubernetes.io/component: operator 176 | app.kubernetes.io/name: http-add-on 177 | {{- include "keda-http-add-on.labels" . | indent 4 }} 178 | name: {{ .Chart.Name }}-proxy-rolebinding 179 | roleRef: 180 | apiGroup: rbac.authorization.k8s.io 181 | kind: ClusterRole 182 | name: {{ .Chart.Name }}-proxy-role 183 | subjects: 184 | - kind: ServiceAccount 185 | name: {{ .Chart.Name }} 186 | namespace: {{ .Release.Namespace }} 187 | {{- end }} 188 | -------------------------------------------------------------------------------- /http-add-on/templates/operator/service.yaml: -------------------------------------------------------------------------------- 1 | {{- if gt (int .Values.operator.replicas) 0 }} 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | labels: 6 | app.kubernetes.io/component: operator 7 | app.kubernetes.io/name: http-add-on 8 | {{- include "keda-http-add-on.labels" . | indent 4 }} 9 | name: {{ .Chart.Name }}-controller-manager-metrics-service 10 | namespace: {{ .Release.Namespace }} 11 | spec: 12 | ports: 13 | - name: metrics 14 | port: {{ default 8443 .Values.operator.port }} 15 | targetPort: metrics 16 | selector: 17 | app.kubernetes.io/component: operator 18 | app.kubernetes.io/name: http-add-on 19 | {{- include "keda-http-add-on.matchLabels" . | indent 4 }} 20 | {{- end }} 21 | -------------------------------------------------------------------------------- /http-add-on/templates/operator/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if gt (int .Values.operator.replicas) 0 }} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | labels: 6 | app.kubernetes.io/component: operator 7 | app.kubernetes.io/name: http-add-on 8 | {{- include "keda-http-add-on.labels" . | indent 4 }} 9 | name: {{ .Chart.Name }} 10 | namespace: {{ .Release.Namespace }} 11 | {{- end }} 12 | -------------------------------------------------------------------------------- /http-add-on/templates/rbac-aggregateclusterroles.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.rbac.aggregateToDefaultRoles }} 2 | --- 3 | apiVersion: rbac.authorization.k8s.io/v1 4 | kind: ClusterRole 5 | metadata: 6 | name: {{ .Chart.Name }}-edit 7 | labels: 8 | app.kubernetes.io/name: http-add-on 9 | {{- include "keda-http-add-on.labels" . | indent 4 }} 10 | rbac.authorization.k8s.io/aggregate-to-admin: "true" 11 | rbac.authorization.k8s.io/aggregate-to-edit: "true" 12 | rules: 13 | - apiGroups: 14 | - http.keda.sh 15 | resources: 16 | - httpscaledobjects 17 | verbs: 18 | - create 19 | - delete 20 | - get 21 | - list 22 | - patch 23 | - update 24 | - watch 25 | --- 26 | apiVersion: rbac.authorization.k8s.io/v1 27 | kind: ClusterRole 28 | metadata: 29 | name: {{ .Chart.Name }}-view 30 | labels: 31 | app.kubernetes.io/name: http-add-on 32 | rbac.authorization.k8s.io/aggregate-to-admin: "true" 33 | rbac.authorization.k8s.io/aggregate-to-edit: "true" 34 | rbac.authorization.k8s.io/aggregate-to-view: "true" 35 | {{- include "keda-http-add-on.labels" . | indent 4 }} 36 | rules: 37 | - apiGroups: 38 | - http.keda.sh 39 | resources: 40 | - httpscaledobjects 41 | verbs: 42 | - get 43 | - list 44 | - watch 45 | {{- end -}} -------------------------------------------------------------------------------- /http-add-on/templates/scaler/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | labels: 5 | app.kubernetes.io/component: scaler 6 | app.kubernetes.io/name: http-add-on 7 | {{- include "keda-http-add-on.labels" . | indent 4 }} 8 | name: {{ .Chart.Name }}-external-scaler 9 | namespace: {{ .Release.Namespace }} 10 | spec: 11 | replicas: {{ .Values.scaler.replicas }} 12 | selector: 13 | matchLabels: 14 | app.kubernetes.io/component: scaler 15 | app.kubernetes.io/name: http-add-on 16 | {{- include "keda-http-add-on.matchLabels" . | indent 6 }} 17 | template: 18 | metadata: 19 | labels: 20 | app.kubernetes.io/component: scaler 21 | app.kubernetes.io/name: http-add-on 22 | {{- include "keda-http-add-on.labels" . | indent 8 }} 23 | annotations: 24 | {{- with .Values.scaler.podAnnotations }} 25 | {{- range $key, $value := . }} 26 | {{ $key }}: {{ $value | quote }} 27 | {{- end }} 28 | {{- end }} 29 | spec: 30 | imagePullSecrets: 31 | {{- toYaml .Values.scaler.imagePullSecrets | nindent 8 }} 32 | serviceAccountName: {{ .Chart.Name }}-external-scaler 33 | {{- if .Values.podSecurityContext.scaler }} 34 | securityContext: 35 | {{- toYaml .Values.podSecurityContext.scaler | nindent 8 }} 36 | {{- else }} 37 | securityContext: 38 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 39 | {{- end }} 40 | containers: 41 | - args: 42 | - "--zap-log-level={{ .Values.logging.scaler.level }}" 43 | - "--zap-encoder={{ .Values.logging.scaler.format }}" 44 | - "--zap-time-encoding={{ .Values.logging.scaler.timeEncoding }}" 45 | {{- if .Values.logging.scaler.stackTracesEnabled }} 46 | - "--zap-stacktrace-level=error" 47 | {{- end }} 48 | image: "{{ .Values.images.scaler }}:{{ .Values.images.tag | default .Chart.AppVersion }}" 49 | imagePullPolicy: {{ .Values.scaler.pullPolicy | default "Always" }} 50 | name: "{{ .Chart.Name }}-external-scaler" 51 | ports: 52 | - containerPort: {{ .Values.scaler.grpcPort }} 53 | name: grpc 54 | env: 55 | - name: KEDA_HTTP_SCALER_TARGET_ADMIN_DEPLOYMENT 56 | value: "{{ .Chart.Name }}-interceptor" 57 | - name: KEDA_HTTP_SCALER_PORT 58 | value: "{{ .Values.scaler.grpcPort }}" 59 | - name: KEDA_HTTP_SCALER_TARGET_ADMIN_NAMESPACE 60 | value: "{{ .Release.Namespace }}" 61 | - name: KEDA_HTTP_SCALER_TARGET_ADMIN_SERVICE 62 | value: "{{ .Chart.Name }}-{{ .Values.interceptor.admin.service }}" 63 | - name: KEDA_HTTP_SCALER_TARGET_ADMIN_PORT 64 | value: "{{ default 9091 .Values.interceptor.admin.port }}" 65 | - name: KEDA_HTTP_SCALER_STREAM_INTERVAL_MS 66 | value: "{{ .Values.scaler.streamInterval }}" 67 | resources: 68 | {{- toYaml .Values.scaler.resources | nindent 10 }} 69 | livenessProbe: 70 | grpc: 71 | port: {{ .Values.scaler.grpcPort }} 72 | service: liveness 73 | timeoutSeconds: 5 74 | periodSeconds: 5 75 | successThreshold: 1 76 | failureThreshold: 6 77 | readinessProbe: 78 | grpc: 79 | port: {{ .Values.scaler.grpcPort }} 80 | service: readiness 81 | timeoutSeconds: 1 82 | periodSeconds: 5 83 | successThreshold: 1 84 | failureThreshold: 3 85 | {{- if .Values.securityContext.scaler }} 86 | securityContext: 87 | {{- toYaml .Values.securityContext.scaler | nindent 10 }} 88 | {{- else }} 89 | securityContext: 90 | {{- toYaml .Values.securityContext | nindent 10 }} 91 | {{- end }} 92 | terminationGracePeriodSeconds: 10 93 | nodeSelector: 94 | kubernetes.io/os: linux 95 | {{- with .Values.scaler.nodeSelector }} 96 | {{- toYaml . | nindent 8 }} 97 | {{- end }} 98 | {{- with .Values.scaler.affinity }} 99 | affinity: 100 | {{- toYaml . | nindent 8 }} 101 | {{- end }} 102 | {{- with .Values.scaler.tolerations }} 103 | tolerations: 104 | {{- toYaml . | nindent 8 }} 105 | {{- end }} 106 | -------------------------------------------------------------------------------- /http-add-on/templates/scaler/rbac.yml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | labels: 5 | app.kubernetes.io/component: scaler 6 | app.kubernetes.io/name: http-add-on 7 | {{- include "keda-http-add-on.labels" . | indent 4 }} 8 | name: {{ .Chart.Name }}-external-scaler 9 | rules: 10 | - apiGroups: 11 | - "" 12 | resources: 13 | - endpoints 14 | verbs: 15 | - get 16 | - list 17 | - watch 18 | - apiGroups: 19 | - http.keda.sh 20 | resources: 21 | - httpscaledobjects 22 | verbs: 23 | - get 24 | - list 25 | - watch 26 | --- 27 | apiVersion: rbac.authorization.k8s.io/v1 28 | kind: ClusterRoleBinding 29 | metadata: 30 | labels: 31 | httpscaledobjects.http.keda.sh/version: {{ .Values.images.tag | default .Chart.AppVersion }} 32 | keda.sh/addon: {{ .Chart.Name }} 33 | app: {{ .Chart.Name }} 34 | name: {{ .Chart.Name }}-external-scaler 35 | app.kubernetes.io/component: scaler 36 | app.kubernetes.io/name: http-add-on 37 | {{- include "keda-http-add-on.labels" . | indent 4 }} 38 | name: {{ .Chart.Name }}-external-scaler 39 | roleRef: 40 | apiGroup: rbac.authorization.k8s.io 41 | kind: ClusterRole 42 | name: {{ .Chart.Name }}-external-scaler 43 | subjects: 44 | - kind: ServiceAccount 45 | name: {{ .Chart.Name }}-external-scaler 46 | namespace: {{ .Release.Namespace }} 47 | -------------------------------------------------------------------------------- /http-add-on/templates/scaler/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | app.kubernetes.io/component: scaler 6 | app.kubernetes.io/name: http-add-on 7 | {{- include "keda-http-add-on.labels" . | indent 4 }} 8 | name: "{{ .Chart.Name }}-{{ .Values.scaler.service }}" 9 | namespace: {{ .Release.Namespace }} 10 | spec: 11 | ports: 12 | - name: grpc 13 | port: {{ default 9090 .Values.scaler.grpcPort }} 14 | targetPort: grpc 15 | selector: 16 | app.kubernetes.io/component: scaler 17 | app.kubernetes.io/name: http-add-on 18 | {{- include "keda-http-add-on.matchLabels" . | indent 4 }} 19 | -------------------------------------------------------------------------------- /http-add-on/templates/scaler/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | labels: 5 | app.kubernetes.io/component: scaler 6 | app.kubernetes.io/name: http-add-on 7 | {{- include "keda-http-add-on.labels" . | indent 4 }} 8 | name: {{ .Chart.Name }}-external-scaler 9 | namespace: {{ .Release.Namespace }} 10 | -------------------------------------------------------------------------------- /keda/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | .vscode/ 23 | *.gotmpl 24 | -------------------------------------------------------------------------------- /keda/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: keda 3 | description: Event-based autoscaler for workloads on Kubernetes 4 | 5 | # Specify the Kubernetes version range that we support. 6 | # We allow pre-release versions for cloud-specific Kubernetes versions such as v1.21.5-gke.1302 or v1.18.9-eks-d1db3c 7 | kubeVersion: ">=v1.23.0-0" 8 | 9 | # This is the chart version. This version number should be incremented each time you make changes 10 | # to the chart and its templates, including the app version. 11 | version: 2.17.1 12 | 13 | # This is the version number of the application being deployed. This version number should be 14 | # incremented each time you make changes to the application. 15 | appVersion: 2.17.1 16 | 17 | home: https://github.com/kedacore/keda 18 | icon: https://raw.githubusercontent.com/kedacore/keda/main/images/keda-logo-500x500-white.png 19 | sources: 20 | - https://github.com/kedacore/keda 21 | maintainers: 22 | - name: Jorge Turrado 23 | email: jorge_turrado@hotmail.es 24 | - name: Zbynek Roubalik 25 | email: zbynek@kedify.io 26 | - name: Jan Wozniak 27 | email: jan@kedify.io 28 | -------------------------------------------------------------------------------- /keda/README.md.gotmpl: -------------------------------------------------------------------------------- 1 |

2 |

Kubernetes-based Event Driven Autoscaling

3 | 4 | KEDA allows for fine grained autoscaling (including to/from zero) for event driven Kubernetes workloads. KEDA serves as a Kubernetes Metrics Server and allows users to define autoscaling rules using a dedicated Kubernetes custom resource definition. 5 | 6 | KEDA can run on both the cloud and the edge, integrates natively with Kubernetes components such as the Horizontal Pod Autoscaler, and has no external dependencies. 7 | 8 | --- 9 |

10 | We are a Cloud Native Computing Foundation (CNCF) graduated project. 11 | 12 | 13 |

14 | 15 | --- 16 | 17 | ## TL;DR 18 | 19 | ```console 20 | helm repo add kedacore https://kedacore.github.io/charts 21 | helm repo update 22 | 23 | kubectl create namespace keda 24 | helm install keda kedacore/keda --namespace keda --version {{ template "chart.appVersion" . }} 25 | ``` 26 | 27 | ## Introduction 28 | 29 | This chart bootstraps KEDA infrastructure on a Kubernetes cluster using the Helm package manager. 30 | 31 | As part of that, it will install all the required Custom Resource Definitions (CRD). 32 | 33 | ## Installing the Chart 34 | 35 | To install the chart with the release name `keda`: 36 | 37 | ```console 38 | $ kubectl create namespace keda 39 | $ helm install keda kedacore/keda --namespace keda --version {{ template "chart.version" . }} 40 | ``` 41 | 42 | ## Uninstalling the Chart 43 | 44 | To uninstall/delete the `keda` Helm chart: 45 | 46 | ```console 47 | helm uninstall keda 48 | ``` 49 | 50 | The command removes all the Kubernetes components associated with the chart and deletes the release. 51 | 52 | ## Configuration 53 | 54 | The following table lists the configurable parameters of the KEDA chart and 55 | their default values. 56 | 57 | ### General parameters 58 | 59 | | Parameter | Type | Default | Description | 60 | |-----------|------|---------|-------------| 61 | {{- range .Values }} 62 | {{- if not (or (contains "operator" .Key) (contains "keda" .Key) (contains "opentelemetry" .Key) (contains "prometheus" .Key) (contains "metricServer" .Key) (contains "metricsServer" .Key) (contains "metricsApiServer" .Key) (contains "metricsAdapter" .Key) (contains "webhooks" .Key) (hasPrefix "service." .Key) ) }} 63 | | `{{ .Key }}` | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | 64 | {{- end }} 65 | {{- end }} 66 | 67 | ### Operator 68 | 69 | | Parameter | Type | Default | Description | 70 | |-----------|------|---------|-------------| 71 | {{- range .Values }} 72 | {{- if and (or (contains "operator" .Key) (contains "keda" .Key)) (not (or (contains "opentelemetry" .Key) (contains "prometheus" .Key) (contains "profiling" .Key))) }} 73 | | `{{ .Key }}` | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | 74 | {{- end }} 75 | {{- end }} 76 | 77 | ### Metrics server 78 | 79 | | Parameter | Type | Default | Description | 80 | |-----------|------|---------|-------------| 81 | {{- range .Values }} 82 | {{- if and (or (contains "metricServer" .Key) (contains "metricsServer" .Key) (contains "metricsApiServer" .Key) (contains "metricsAdapter" .Key) (hasPrefix "service." .Key)) (not (or (contains "opentelemetry" .Key) (contains "prometheus" .Key) (contains "profiling" .Key)))}} 83 | | `{{ .Key }}` | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | 84 | {{- end }} 85 | {{- end }} 86 | 87 | ### Operations 88 | 89 | | Parameter | Type | Default | Description | 90 | |-----------|------|---------|-------------| 91 | {{- range .Values }} 92 | {{- if or (contains "opentelemetry" .Key) (contains "prometheus" .Key) }} 93 | | `{{ .Key }}` | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | 94 | {{- end }} 95 | {{- end }} 96 | 97 | ### Troubleshooting 98 | 99 | | Parameter | Type | Default | Description | 100 | |-----------|------|---------|-------------| 101 | {{- range .Values }} 102 | {{- if (contains "profiling" .Key) }} 103 | | `{{ .Key }}` | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | 104 | {{- end }} 105 | {{- end }} 106 | 107 | ### Admission Webhooks 108 | 109 | | Parameter | Type | Default | Description | 110 | |-----------|------|---------|-------------| 111 | {{- range .Values }} 112 | {{- if and (contains "webhooks" .Key) (not (or (contains "opentelemetry" .Key) (contains "prometheus" .Key) (contains "profiling" .Key))) }} 113 | | `{{ .Key }}` | {{ .Type }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | 114 | {{- end }} 115 | {{- end }} 116 | 117 | Specify each parameter using the `--set key=value[,key=value]` argument to 118 | `helm install`. For example: 119 | 120 | ```console 121 | $ helm install keda kedacore/keda --namespace keda \ 122 | --set image.keda.tag= \ 123 | --set image.metricsApiServer.tag= \ 124 | --set image.webhooks.tag= 125 | ``` 126 | 127 | Alternatively, a YAML file that specifies the values for the above parameters can 128 | be provided while installing the chart. For example, 129 | 130 | ```console 131 | helm install keda kedacore/keda --namespace keda -f values.yaml 132 | ``` 133 | 134 | ## KEDA is secure by default 135 | 136 | Our default configuration strives to be as secure as possible. Because of that, KEDA will run as non-root and be secure-by-default: 137 | ```yaml 138 | securityContext: 139 | operator: 140 | capabilities: 141 | drop: 142 | - ALL 143 | allowPrivilegeEscalation: false 144 | readOnlyRootFilesystem: true 145 | seccompProfile: 146 | type: RuntimeDefault 147 | metricServer: 148 | capabilities: 149 | drop: 150 | - ALL 151 | allowPrivilegeEscalation: false 152 | ## Metrics server needs to write the self-signed cert. See FAQ for discussion of options. 153 | # readOnlyRootFilesystem: true 154 | seccompProfile: 155 | type: RuntimeDefault 156 | webhooks: 157 | capabilities: 158 | drop: 159 | - ALL 160 | allowPrivilegeEscalation: false 161 | readOnlyRootFilesystem: true 162 | seccompProfile: 163 | type: RuntimeDefault 164 | 165 | podSecurityContext: 166 | operator: 167 | runAsNonRoot: true 168 | metricServer: 169 | runAsNonRoot: true 170 | webhooks: 171 | runAsNonRoot: true 172 | ``` 173 | 174 | ---------------------------------------------- 175 | Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) 176 | 177 | [Affinity]: https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/ 178 | [Deployment upgrade strategy]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy 179 | [GCP Workload Identity]: https://keda.sh/docs/2.10/authentication-providers/gcp-workload-identity/ 180 | [Pod Disruption Budget]: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ 181 | [Pod security context]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ 182 | [Security context]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container 183 | [Pod Topology Constraints]: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ 184 | [RelabelConfig Spec]: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.RelabelConfig 185 | [resource request & limits]: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ 186 | [ServiceMonitor Spec]: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.ServiceMonitor 187 | -------------------------------------------------------------------------------- /keda/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | {{- if .Values.asciiArt }} 2 | :::^. .::::^: ::::::::::::::: .:::::::::. .^. 3 | 7???~ .^7????~. 7??????????????. :?????????77!^. .7?7. 4 | 7???~ ^7???7~. ~!!!!!!!!!!!!!!. :????!!!!7????7~. .7???7. 5 | 7???~^7????~. :????: :~7???7. :7?????7. 6 | 7???7????!. ::::::::::::. :????: .7???! :7??77???7. 7 | 7????????7: 7???????????~ :????: :????: :???7?5????7. 8 | 7????!~????^ !77777777777^ :????: :????: ^???7?#P7????7. 9 | 7???~ ^????~ :????: :7???! ^???7J#@J7?????7. 10 | 7???~ :7???!. :????: .:~7???!. ~???7Y&@#7777????7. 11 | 7???~ .7???7: !!!!!!!!!!!!!!! :????7!!77????7^ ~??775@@@GJJYJ?????7. 12 | 7???~ .!????^ 7?????????????7. :?????????7!~: !????G@@@@@@@@5??????7: 13 | ::::. ::::: ::::::::::::::: .::::::::.. .::::JGGGB@@@&7::::::::: 14 | ?@@#~ 15 | P@B^ 16 | :&G: 17 | !5. 18 | . 19 | {{- end -}} 20 | 21 | Kubernetes Event-driven Autoscaling (KEDA) - Application autoscaling made simple. 22 | 23 | Get started by deploying Scaled Objects to your cluster: 24 | - Information about Scaled Objects : https://keda.sh/docs/latest/concepts/ 25 | - Samples: https://github.com/kedacore/samples 26 | 27 | Get information about the deployed ScaledObjects: 28 | kubectl get scaledobject [--namespace ] 29 | 30 | Get details about a deployed ScaledObject: 31 | kubectl describe scaledobject [--namespace ] 32 | 33 | Get information about the deployed ScaledObjects: 34 | kubectl get triggerauthentication [--namespace ] 35 | 36 | Get details about a deployed ScaledObject: 37 | kubectl describe triggerauthentication [--namespace ] 38 | 39 | Get an overview of the Horizontal Pod Autoscalers (HPA) that KEDA is using behind the scenes: 40 | kubectl get hpa [--all-namespaces] [--namespace ] 41 | 42 | {{- if .Values.prometheus.operator.serviceMonitor.relabellings}} 43 | ------------------------------------------------------------------------------------- 44 | WARNING - prometheus.operator.serviceMonitor.relabellings is deprecated, please migrate to prometheus.operator.serviceMonitor.relabelings instead. 45 | ------------------------------------------------------------------------------------- 46 | {{- end }} 47 | {{- if .Values.prometheus.metricServer.serviceMonitor.relabellings}} 48 | WARNING - prometheus.metricServer.serviceMonitor.relabellings is deprecated, please migrate to prometheus.metricServer.serviceMonitor.relabelings instead. 49 | {{- end }} 50 | {{- if .Values.prometheus.webhooks.serviceMonitor.relabellings}} 51 | ------------------------------------------------------------------------------------- 52 | WARNING - prometheus.webhooks.serviceMonitor.relabellings is deprecated, please migrate to prometheus.webhooks.serviceMonitor.relabelings instead. 53 | ------------------------------------------------------------------------------------- 54 | {{- end }} 55 | 56 | {{- if lt .Capabilities.KubeVersion.Minor "28" }} 57 | ------------------------------------------------------------------------------------- 58 | WARNING - Running on unsupported Kubernetes version "1.{{.Capabilities.KubeVersion.Minor}}". KEDA 2.13 is supported and tested on Kubernetes "1.28" or higher. See https://keda.sh/docs/latest/operate/cluster/ for details. 59 | ------------------------------------------------------------------------------------- 60 | {{- end }} 61 | 62 | {{- if .Values.serviceAccount.name }} 63 | ------------------------------------------------------------------------------------- 64 | WARNING - .serviceAccount.name has been deprecated, please migrate to newest version of the Helm Chart values that allows overriding the service account name for each KEDA component. 65 | New version: serviceAccount.{operator,metricServer,webhooks}.{create,name,automountServiceAccountToken,annotations} 66 | ------------------------------------------------------------------------------------- 67 | {{- end }} 68 | 69 | Learn more about KEDA: 70 | - Documentation: https://keda.sh/ 71 | - Support: https://keda.sh/support/ 72 | - File an issue: https://github.com/kedacore/keda/issues/new/choose 73 | -------------------------------------------------------------------------------- /keda/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | 3 | {{/* 4 | Create chart name and version as used by the chart label. 5 | */}} 6 | {{- define "keda.chart" -}} 7 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} 8 | {{- end -}} 9 | 10 | {{/* 11 | Generate basic labels for CRD 12 | */}} 13 | {{- define "keda.crd-labels" }} 14 | helm.sh/chart: {{ include "keda.chart" . }} 15 | app.kubernetes.io/component: operator 16 | app.kubernetes.io/managed-by: {{ .Values.customManagedBy | default .Release.Service }} 17 | app.kubernetes.io/part-of: {{ .Values.operator.name }} 18 | {{- if .Chart.AppVersion }} 19 | app.kubernetes.io/version: {{ .Chart.AppVersion }} 20 | {{- end }} 21 | {{- end }} 22 | 23 | {{/* 24 | Generate basic labels 25 | */}} 26 | {{- define "keda.labels" -}} 27 | {{- include "keda.crd-labels" . }} 28 | app.kubernetes.io/instance: {{ .Release.Name }} 29 | {{- if .Values.additionalLabels }} 30 | {{ toYaml .Values.additionalLabels }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /keda/templates/cert-manager/keda-issuer.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.certificates.certManager.enabled .Values.certificates.certManager.issuer.generate }} 2 | apiVersion: cert-manager.io/v1 3 | kind: Issuer 4 | metadata: 5 | {{- with .Values.additionalAnnotations }} 6 | annotations: 7 | {{- toYaml . | nindent 4 }} 8 | {{- end }} 9 | name: {{ .Values.operator.name }}-issuer 10 | namespace: {{ .Release.Namespace }} 11 | labels: 12 | {{- include "keda.labels" . | indent 4 }} 13 | spec: 14 | ca: 15 | secretName: {{ .Values.certificates.certManager.caSecretName }} 16 | {{- end }} 17 | -------------------------------------------------------------------------------- /keda/templates/cert-manager/keda-tls-certificate.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.certificates.certManager.enabled }} 2 | apiVersion: cert-manager.io/v1 3 | kind: Certificate 4 | metadata: 5 | name: {{ .Values.operator.name }}-tls-certificates 6 | namespace: {{ .Release.Namespace }} 7 | labels: 8 | {{- include "keda.labels" . | indent 4 }} 9 | spec: 10 | commonName: {{ .Values.operator.name }} 11 | dnsNames: 12 | - {{ .Values.operator.name }}.{{ .Release.Namespace }} 13 | - {{ .Values.operator.name }}.{{ .Release.Namespace }}.svc 14 | - {{ .Values.operator.name }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} 15 | - {{ .Values.operator.name }}-metrics-apiserver.{{ .Release.Namespace }} 16 | - {{ .Values.operator.name }}-metrics-apiserver.{{ .Release.Namespace }}.svc 17 | - {{ .Values.operator.name }}-metrics-apiserver.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} 18 | - {{ .Values.webhooks.name }}.{{ .Release.Namespace }} 19 | - {{ .Values.webhooks.name }}.{{ .Release.Namespace }}.svc 20 | - {{ .Values.webhooks.name }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} 21 | secretName: {{ .Values.certificates.secretName }} 22 | secretTemplate: 23 | {{- toYaml .Values.certificates.certManager.secretTemplate | nindent 4 }} 24 | usages: 25 | - server auth 26 | - client auth 27 | privateKey: 28 | algorithm: RSA 29 | size: 2048 30 | duration: {{ .Values.certificates.certManager.duration }} 31 | renewBefore: {{ .Values.certificates.certManager.renewBefore }} 32 | issuerRef: 33 | {{- if .Values.certificates.certManager.issuer.generate }} 34 | name: {{ .Values.operator.name }}-issuer 35 | kind: Issuer 36 | group: cert-manager.io 37 | {{- else }} 38 | {{- if .Values.certificates.certManager.issuer.name }} 39 | name: {{ .Values.certificates.certManager.issuer.name }} 40 | {{- end }} 41 | {{- if .Values.certificates.certManager.issuer.kind }} 42 | kind: {{ .Values.certificates.certManager.issuer.kind }} 43 | {{- end }} 44 | {{- if .Values.certificates.certManager.issuer.group }} 45 | group: {{ .Values.certificates.certManager.issuer.group }} 46 | {{- end }} 47 | {{- end }} 48 | {{- end }} 49 | -------------------------------------------------------------------------------- /keda/templates/cert-manager/self-ca.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.certificates.certManager.enabled .Values.certificates.certManager.generateCA .Values.certificates.certManager.issuer.generate }} 2 | apiVersion: cert-manager.io/v1 3 | kind: Certificate 4 | metadata: 5 | name: {{ .Values.operator.name }}-ca 6 | namespace: {{ .Release.Namespace }} 7 | labels: 8 | {{- include "keda.labels" . | indent 4 }} 9 | spec: 10 | isCA: true 11 | commonName: {{ .Values.operator.name }} 12 | secretName: {{ .Values.certificates.certManager.caSecretName }} 13 | secretTemplate: 14 | {{- toYaml .Values.certificates.certManager.secretTemplate | nindent 4 }} 15 | privateKey: 16 | algorithm: RSA 17 | size: 2048 18 | duration: 43800h0m0s # 5 years 19 | renewBefore: 14600h0m0s # 1.6 year, 1/3rd of the duration 20 | issuerRef: 21 | name: {{ .Values.operator.name }}-selfsigned-issuer 22 | kind: Issuer 23 | group: cert-manager.io 24 | {{- end }} 25 | -------------------------------------------------------------------------------- /keda/templates/cert-manager/self-issuer.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.certificates.certManager.enabled .Values.certificates.certManager.generateCA .Values.certificates.certManager.issuer.generate }} 2 | apiVersion: cert-manager.io/v1 3 | kind: Issuer 4 | metadata: 5 | {{- with .Values.additionalAnnotations }} 6 | annotations: 7 | {{- toYaml . | nindent 4 }} 8 | {{- end }} 9 | name: {{ .Values.operator.name }}-selfsigned-issuer 10 | namespace: {{ .Release.Namespace }} 11 | labels: 12 | {{- include "keda.labels" . | indent 4 }} 13 | spec: 14 | selfSigned: {} 15 | {{- end }} 16 | -------------------------------------------------------------------------------- /keda/templates/crds/crd-cloudeventsources.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.crds.install }} 2 | apiVersion: apiextensions.k8s.io/v1 3 | kind: CustomResourceDefinition 4 | metadata: 5 | annotations: 6 | controller-gen.kubebuilder.io/version: v0.16.5 7 | {{- if (or .Values.crds.additionalAnnotations .Values.additionalAnnotations) }} 8 | {{- toYaml (merge .Values.crds.additionalAnnotations .Values.additionalAnnotations) | nindent 4 }} 9 | {{- end }} 10 | labels: 11 | app.kubernetes.io/name: {{ .Values.operator.name }} 12 | {{- include "keda.crd-labels" . | indent 4 }} 13 | name: cloudeventsources.eventing.keda.sh 14 | spec: 15 | group: eventing.keda.sh 16 | names: 17 | kind: CloudEventSource 18 | listKind: CloudEventSourceList 19 | plural: cloudeventsources 20 | singular: cloudeventsource 21 | scope: Namespaced 22 | versions: 23 | - additionalPrinterColumns: 24 | - jsonPath: .status.conditions[?(@.type=="Active")].status 25 | name: Active 26 | type: string 27 | name: v1alpha1 28 | schema: 29 | openAPIV3Schema: 30 | description: CloudEventSource defines how a KEDA event will be sent to event 31 | sink 32 | properties: 33 | apiVersion: 34 | description: |- 35 | APIVersion defines the versioned schema of this representation of an object. 36 | Servers should convert recognized schemas to the latest internal value, and 37 | may reject unrecognized values. 38 | More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 39 | type: string 40 | kind: 41 | description: |- 42 | Kind is a string value representing the REST resource this object represents. 43 | Servers may infer this from the endpoint the client submits requests to. 44 | Cannot be updated. 45 | In CamelCase. 46 | More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 47 | type: string 48 | metadata: 49 | type: object 50 | spec: 51 | description: CloudEventSourceSpec defines the spec of CloudEventSource 52 | properties: 53 | authenticationRef: 54 | description: |- 55 | AuthenticationRef points to the TriggerAuthentication or ClusterTriggerAuthentication object that 56 | is used to authenticate the scaler with the environment 57 | properties: 58 | kind: 59 | description: Kind of the resource being referred to. Defaults 60 | to TriggerAuthentication. 61 | type: string 62 | name: 63 | type: string 64 | required: 65 | - name 66 | type: object 67 | clusterName: 68 | type: string 69 | destination: 70 | description: Destination defines the various ways to emit events 71 | properties: 72 | azureEventGridTopic: 73 | properties: 74 | endpoint: 75 | type: string 76 | required: 77 | - endpoint 78 | type: object 79 | http: 80 | properties: 81 | uri: 82 | type: string 83 | required: 84 | - uri 85 | type: object 86 | type: object 87 | eventSubscription: 88 | description: EventSubscription defines filters for events 89 | properties: 90 | excludedEventTypes: 91 | items: 92 | enum: 93 | - keda.scaledobject.ready.v1 94 | - keda.scaledobject.failed.v1 95 | - keda.scaledobject.removed.v1 96 | - keda.scaledjob.ready.v1 97 | - keda.scaledjob.failed.v1 98 | - keda.scaledjob.removed.v1 99 | - keda.authentication.triggerauthentication.created.v1 100 | - keda.authentication.triggerauthentication.updated.v1 101 | - keda.authentication.triggerauthentication.removed.v1 102 | - keda.authentication.clustertriggerauthentication.created.v1 103 | - keda.authentication.clustertriggerauthentication.updated.v1 104 | - keda.authentication.clustertriggerauthentication.removed.v1 105 | type: string 106 | type: array 107 | includedEventTypes: 108 | items: 109 | enum: 110 | - keda.scaledobject.ready.v1 111 | - keda.scaledobject.failed.v1 112 | - keda.scaledobject.removed.v1 113 | - keda.scaledjob.ready.v1 114 | - keda.scaledjob.failed.v1 115 | - keda.scaledjob.removed.v1 116 | - keda.authentication.triggerauthentication.created.v1 117 | - keda.authentication.triggerauthentication.updated.v1 118 | - keda.authentication.triggerauthentication.removed.v1 119 | - keda.authentication.clustertriggerauthentication.created.v1 120 | - keda.authentication.clustertriggerauthentication.updated.v1 121 | - keda.authentication.clustertriggerauthentication.removed.v1 122 | type: string 123 | type: array 124 | type: object 125 | required: 126 | - destination 127 | type: object 128 | status: 129 | description: CloudEventSourceStatus defines the observed state of CloudEventSource 130 | properties: 131 | conditions: 132 | description: Conditions an array representation to store multiple 133 | Conditions 134 | items: 135 | description: Condition to store the condition state 136 | properties: 137 | message: 138 | description: A human readable message indicating details about 139 | the transition. 140 | type: string 141 | reason: 142 | description: The reason for the condition's last transition. 143 | type: string 144 | status: 145 | description: Status of the condition, one of True, False, Unknown. 146 | type: string 147 | type: 148 | description: Type of condition 149 | type: string 150 | required: 151 | - status 152 | - type 153 | type: object 154 | type: array 155 | type: object 156 | required: 157 | - spec 158 | type: object 159 | served: true 160 | storage: true 161 | subresources: 162 | status: {} 163 | {{- end -}} 164 | -------------------------------------------------------------------------------- /keda/templates/crds/crd-clustercloudeventsources.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.crds.install }} 2 | apiVersion: apiextensions.k8s.io/v1 3 | kind: CustomResourceDefinition 4 | metadata: 5 | annotations: 6 | controller-gen.kubebuilder.io/version: v0.16.5 7 | {{- if (or .Values.crds.additionalAnnotations .Values.additionalAnnotations) }} 8 | {{- toYaml (merge .Values.crds.additionalAnnotations .Values.additionalAnnotations) | nindent 4 }} 9 | {{- end }} 10 | labels: 11 | app.kubernetes.io/name: {{ .Values.operator.name }} 12 | {{- include "keda.crd-labels" . | indent 4 }} 13 | name: clustercloudeventsources.eventing.keda.sh 14 | spec: 15 | group: eventing.keda.sh 16 | names: 17 | kind: ClusterCloudEventSource 18 | listKind: ClusterCloudEventSourceList 19 | plural: clustercloudeventsources 20 | singular: clustercloudeventsource 21 | scope: Cluster 22 | versions: 23 | - additionalPrinterColumns: 24 | - jsonPath: .status.conditions[?(@.type=="Active")].status 25 | name: Active 26 | type: string 27 | name: v1alpha1 28 | schema: 29 | openAPIV3Schema: 30 | properties: 31 | apiVersion: 32 | description: |- 33 | APIVersion defines the versioned schema of this representation of an object. 34 | Servers should convert recognized schemas to the latest internal value, and 35 | may reject unrecognized values. 36 | More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 37 | type: string 38 | kind: 39 | description: |- 40 | Kind is a string value representing the REST resource this object represents. 41 | Servers may infer this from the endpoint the client submits requests to. 42 | Cannot be updated. 43 | In CamelCase. 44 | More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 45 | type: string 46 | metadata: 47 | type: object 48 | spec: 49 | description: CloudEventSourceSpec defines the spec of CloudEventSource 50 | properties: 51 | authenticationRef: 52 | description: |- 53 | AuthenticationRef points to the TriggerAuthentication or ClusterTriggerAuthentication object that 54 | is used to authenticate the scaler with the environment 55 | properties: 56 | kind: 57 | description: Kind of the resource being referred to. Defaults 58 | to TriggerAuthentication. 59 | type: string 60 | name: 61 | type: string 62 | required: 63 | - name 64 | type: object 65 | clusterName: 66 | type: string 67 | destination: 68 | description: Destination defines the various ways to emit events 69 | properties: 70 | azureEventGridTopic: 71 | properties: 72 | endpoint: 73 | type: string 74 | required: 75 | - endpoint 76 | type: object 77 | http: 78 | properties: 79 | uri: 80 | type: string 81 | required: 82 | - uri 83 | type: object 84 | type: object 85 | eventSubscription: 86 | description: EventSubscription defines filters for events 87 | properties: 88 | excludedEventTypes: 89 | items: 90 | enum: 91 | - keda.scaledobject.ready.v1 92 | - keda.scaledobject.failed.v1 93 | - keda.scaledobject.removed.v1 94 | - keda.scaledjob.ready.v1 95 | - keda.scaledjob.failed.v1 96 | - keda.scaledjob.removed.v1 97 | - keda.authentication.triggerauthentication.created.v1 98 | - keda.authentication.triggerauthentication.updated.v1 99 | - keda.authentication.triggerauthentication.removed.v1 100 | - keda.authentication.clustertriggerauthentication.created.v1 101 | - keda.authentication.clustertriggerauthentication.updated.v1 102 | - keda.authentication.clustertriggerauthentication.removed.v1 103 | type: string 104 | type: array 105 | includedEventTypes: 106 | items: 107 | enum: 108 | - keda.scaledobject.ready.v1 109 | - keda.scaledobject.failed.v1 110 | - keda.scaledobject.removed.v1 111 | - keda.scaledjob.ready.v1 112 | - keda.scaledjob.failed.v1 113 | - keda.scaledjob.removed.v1 114 | - keda.authentication.triggerauthentication.created.v1 115 | - keda.authentication.triggerauthentication.updated.v1 116 | - keda.authentication.triggerauthentication.removed.v1 117 | - keda.authentication.clustertriggerauthentication.created.v1 118 | - keda.authentication.clustertriggerauthentication.updated.v1 119 | - keda.authentication.clustertriggerauthentication.removed.v1 120 | type: string 121 | type: array 122 | type: object 123 | required: 124 | - destination 125 | type: object 126 | status: 127 | description: CloudEventSourceStatus defines the observed state of CloudEventSource 128 | properties: 129 | conditions: 130 | description: Conditions an array representation to store multiple 131 | Conditions 132 | items: 133 | description: Condition to store the condition state 134 | properties: 135 | message: 136 | description: A human readable message indicating details about 137 | the transition. 138 | type: string 139 | reason: 140 | description: The reason for the condition's last transition. 141 | type: string 142 | status: 143 | description: Status of the condition, one of True, False, Unknown. 144 | type: string 145 | type: 146 | description: Type of condition 147 | type: string 148 | required: 149 | - status 150 | - type 151 | type: object 152 | type: array 153 | type: object 154 | required: 155 | - spec 156 | type: object 157 | served: true 158 | storage: true 159 | subresources: 160 | status: {} 161 | {{- end -}} 162 | -------------------------------------------------------------------------------- /keda/templates/extensibility/extra-manifests.yaml: -------------------------------------------------------------------------------- 1 | {{ range .Values.extraObjects }} 2 | --- 3 | {{ tpl (toYaml .) $ }} 4 | {{ end }} -------------------------------------------------------------------------------- /keda/templates/manager/ciliumnetworkpolicy.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.networkPolicy.enabled (eq .Values.networkPolicy.flavor "cilium") }} 2 | apiVersion: "cilium.io/v2" 3 | kind: CiliumNetworkPolicy 4 | metadata: 5 | name: {{ .Values.operator.name }} 6 | namespace: {{ .Release.Namespace }} 7 | {{- with .Values.additionalAnnotations }} 8 | annotations: 9 | {{- toYaml . | nindent 4 }} 10 | {{- end }} 11 | labels: 12 | app: {{ .Values.operator.name }} 13 | name: {{ .Values.operator.name }} 14 | app.kubernetes.io/name: {{ .Values.operator.name }} 15 | {{- include "keda.labels" . | indent 4 }} 16 | spec: 17 | endpointSelector: 18 | matchLabels: 19 | app: {{ .Values.operator.name }} 20 | egress: 21 | - toEntities: 22 | - kube-apiserver 23 | - cluster 24 | {{- if and .Values.networkPolicy.cilium.operator.extraEgressRules }} 25 | {{ toYaml .Values.networkPolicy.cilium.operator.extraEgressRules | nindent 4 }} 26 | {{- end }} 27 | ingress: 28 | - fromEntities: 29 | - cluster 30 | {{ end }} 31 | -------------------------------------------------------------------------------- /keda/templates/manager/clusterrole.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.rbac.create }} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRole 4 | metadata: 5 | {{- with .Values.additionalAnnotations }} 6 | annotations: 7 | {{- toYaml . | nindent 4 }} 8 | {{- end }} 9 | labels: 10 | app.kubernetes.io/name: {{ .Values.operator.name }} 11 | {{- include "keda.labels" . | indent 4 }} 12 | name: {{ .Values.operator.name }} 13 | rules: 14 | - apiGroups: 15 | - "" 16 | resources: 17 | - configmaps 18 | - configmaps/status 19 | - limitranges 20 | - pods 21 | - services 22 | - serviceaccounts 23 | verbs: 24 | - get 25 | - list 26 | - watch 27 | - apiGroups: 28 | - "" 29 | resources: 30 | - events 31 | verbs: 32 | - create 33 | - patch 34 | {{- if not .Values.permissions.operator.restrict.secret }} 35 | - apiGroups: 36 | - "" 37 | resources: 38 | - secrets 39 | verbs: 40 | - list 41 | - watch 42 | {{- with .Values.permissions.operator.restrict.namesAllowList }} 43 | - apiGroups: 44 | - "" 45 | resources: 46 | - secrets 47 | verbs: 48 | - get 49 | resourceNames: {{ toYaml . | nindent 4 }} 50 | {{- end }} 51 | {{- end }} 52 | {{- if .Values.rbac.enabledCustomScaledRefKinds }} 53 | {{- range .Values.rbac.scaledRefKinds }} 54 | - apiGroups: 55 | - {{ .apiGroup | quote }} 56 | resources: 57 | - {{ printf "%s/scale" .kind | quote }} 58 | verbs: 59 | - get 60 | - list 61 | - patch 62 | - update 63 | - watch 64 | - apiGroups: 65 | - {{ .apiGroup | quote }} 66 | resources: 67 | - {{ .kind | quote }} 68 | verbs: 69 | - get 70 | {{- end }} 71 | {{- end }} 72 | - apiGroups: 73 | - apps 74 | resources: 75 | - deployments/scale 76 | - statefulsets/scale 77 | verbs: 78 | - get 79 | - list 80 | - patch 81 | - update 82 | - watch 83 | - apiGroups: 84 | - apps 85 | resources: 86 | - deployments 87 | - statefulsets 88 | verbs: 89 | - get 90 | - list 91 | - watch 92 | - apiGroups: 93 | - autoscaling 94 | resources: 95 | - horizontalpodautoscalers 96 | verbs: 97 | - create 98 | - delete 99 | - get 100 | - list 101 | - patch 102 | - update 103 | - watch 104 | - apiGroups: 105 | - batch 106 | resources: 107 | - jobs 108 | verbs: 109 | - create 110 | - delete 111 | - get 112 | - list 113 | - patch 114 | - update 115 | - watch 116 | - apiGroups: 117 | - eventing.keda.sh 118 | resources: 119 | - cloudeventsources 120 | - cloudeventsources/status 121 | - clustercloudeventsources 122 | - clustercloudeventsources/status 123 | verbs: 124 | - get 125 | - list 126 | - patch 127 | - update 128 | - watch 129 | - apiGroups: 130 | - keda.sh 131 | resources: 132 | - scaledjobs 133 | - scaledjobs/finalizers 134 | - scaledjobs/status 135 | - scaledobjects 136 | - scaledobjects/finalizers 137 | - scaledobjects/status 138 | - triggerauthentications 139 | - triggerauthentications/status 140 | verbs: 141 | - get 142 | - list 143 | - patch 144 | - update 145 | - watch 146 | {{- if .Values.rbac.aggregateToDefaultRoles }} 147 | --- 148 | apiVersion: rbac.authorization.k8s.io/v1 149 | kind: ClusterRole 150 | metadata: 151 | name: keda:edit 152 | labels: 153 | rbac.authorization.k8s.io/aggregate-to-admin: "true" 154 | rbac.authorization.k8s.io/aggregate-to-edit: "true" 155 | app.kubernetes.io/name: {{ .Values.operator.name }} 156 | {{- include "keda.labels" . | indent 4 }} 157 | rules: 158 | - apiGroups: 159 | - keda.sh 160 | resources: 161 | - clustertriggerauthentications 162 | - scaledjobs 163 | - scaledobjects 164 | - triggerauthentications 165 | verbs: 166 | - create 167 | - delete 168 | - patch 169 | - update 170 | - apiGroups: 171 | - eventing.keda.sh 172 | resources: 173 | - cloudeventsources 174 | - clustercloudeventsources 175 | verbs: 176 | - create 177 | - delete 178 | - patch 179 | - update 180 | --- 181 | apiVersion: rbac.authorization.k8s.io/v1 182 | kind: ClusterRole 183 | metadata: 184 | name: keda:view 185 | labels: 186 | rbac.authorization.k8s.io/aggregate-to-admin: "true" 187 | rbac.authorization.k8s.io/aggregate-to-edit: "true" 188 | rbac.authorization.k8s.io/aggregate-to-view: "true" 189 | app.kubernetes.io/name: {{ .Values.operator.name }} 190 | {{- include "keda.labels" . | indent 4 }} 191 | rules: 192 | - apiGroups: 193 | - keda.sh 194 | resources: 195 | - clustertriggerauthentications 196 | - scaledjobs 197 | - scaledobjects 198 | - triggerauthentications 199 | verbs: 200 | - get 201 | - list 202 | - watch 203 | - apiGroups: 204 | - eventing.keda.sh 205 | resources: 206 | - cloudeventsources 207 | - clustercloudeventsources 208 | verbs: 209 | - get 210 | - list 211 | - watch 212 | {{- end -}} 213 | {{- if .Values.permissions.operator.restrict.serviceAccountTokenCreationRoles }} 214 | {{- range $r := .Values.permissions.operator.restrict.serviceAccountTokenCreationRoles }} 215 | --- 216 | apiVersion: rbac.authorization.k8s.io/v1 217 | kind: Role 218 | metadata: 219 | {{- with $.Values.additionalAnnotations }} 220 | annotations: 221 | {{- toYaml . | nindent 4 }} 222 | {{- end }} 223 | labels: 224 | app.kubernetes.io/name: {{ $.Values.operator.name }} 225 | {{- include "keda.labels" $ | indent 4 }} 226 | name: {{ $.Values.operator.name }}-token-creator-{{ $r.name }} 227 | namespace: {{ $r.namespace }} 228 | rules: 229 | - apiGroups: 230 | - "" 231 | resources: 232 | - serviceaccounts/token 233 | verbs: 234 | - create 235 | resourceNames: 236 | - {{ $r.name }} 237 | --- 238 | apiVersion: rbac.authorization.k8s.io/v1 239 | kind: RoleBinding 240 | metadata: 241 | {{- with $.Values.additionalAnnotations }} 242 | annotations: 243 | {{- toYaml . | nindent 4 }} 244 | {{- end }} 245 | labels: 246 | app.kubernetes.io/name: {{ $.Values.operator.name }} 247 | {{- include "keda.labels" $ | indent 4 }} 248 | name: {{ $.Values.operator.name }}-token-creator-{{ $r.name }} 249 | namespace: {{ $r.namespace }} 250 | roleRef: 251 | apiGroup: rbac.authorization.k8s.io 252 | kind: Role 253 | name: {{ $.Values.operator.name }}-token-creator-{{ $r.name }} 254 | subjects: 255 | - kind: ServiceAccount 256 | name: {{ $.Values.operator.name }} 257 | namespace: {{ $.Release.Namespace }} 258 | {{- end }} 259 | {{- end }} 260 | {{- end -}} 261 | -------------------------------------------------------------------------------- /keda/templates/manager/clusterrolebindings.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.rbac.create }} 2 | {{- if not .Values.watchNamespace }} 3 | apiVersion: rbac.authorization.k8s.io/v1 4 | kind: ClusterRoleBinding 5 | metadata: 6 | {{- with .Values.additionalAnnotations }} 7 | annotations: 8 | {{- toYaml . | nindent 4 }} 9 | {{- end }} 10 | labels: 11 | app.kubernetes.io/name: {{ .Values.operator.name }} 12 | {{- include "keda.labels" . | indent 4 }} 13 | name: {{ .Values.operator.name }} 14 | roleRef: 15 | apiGroup: rbac.authorization.k8s.io 16 | kind: ClusterRole 17 | name: {{ .Values.operator.name }} 18 | subjects: 19 | - kind: ServiceAccount 20 | name: {{ (.Values.serviceAccount.operator).name | default .Values.serviceAccount.name }} 21 | namespace: {{ .Release.Namespace }} 22 | {{- else }} 23 | {{- $namespaces := append (splitList "," .Values.watchNamespace) .Release.Namespace -}} 24 | {{- range $namespaces }} 25 | --- 26 | # Role binding for namespace '{{ . }}' 27 | apiVersion: rbac.authorization.k8s.io/v1 28 | kind: RoleBinding 29 | metadata: 30 | {{- with $.Values.additionalAnnotations }} 31 | annotations: 32 | {{- toYaml . | nindent 4 }} 33 | {{- end }} 34 | labels: 35 | app.kubernetes.io/name: {{ $.Values.operator.name }} 36 | {{- include "keda.labels" $ | indent 4 }} 37 | name: {{ $.Values.operator.name }} 38 | namespace: {{ . | trim }} 39 | roleRef: 40 | apiGroup: rbac.authorization.k8s.io 41 | kind: ClusterRole 42 | name: {{ $.Values.operator.name }} 43 | subjects: 44 | - kind: ServiceAccount 45 | name: {{ ($.Values.serviceAccount.operator).name | default $.Values.serviceAccount.name }} 46 | namespace: {{ $.Release.Namespace }} 47 | --- 48 | {{- end }} 49 | {{- end }} 50 | {{- end }} 51 | -------------------------------------------------------------------------------- /keda/templates/manager/minimal-rbac.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.rbac.create }} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: Role 4 | metadata: 5 | {{- with .Values.additionalAnnotations }} 6 | annotations: 7 | {{- toYaml . | nindent 4 }} 8 | {{- end }} 9 | labels: 10 | app.kubernetes.io/name: {{ .Values.operator.name }}-certs 11 | {{- include "keda.labels" . | indent 4 }} 12 | name: {{ .Values.operator.name }}-certs 13 | namespace: {{ .Release.Namespace }} 14 | rules: 15 | - apiGroups: 16 | - coordination.k8s.io 17 | resources: 18 | - leases 19 | verbs: 20 | - create 21 | - delete 22 | - get 23 | - list 24 | - patch 25 | - update 26 | - watch 27 | {{- if and .Values.certificates.autoGenerated (not .Values.certificates.certManager.enabled) }} 28 | - apiGroups: 29 | - "" 30 | resources: 31 | - secrets 32 | verbs: 33 | - get 34 | resourceNames: 35 | - {{ .Values.certificates.secretName | quote }} 36 | - apiGroups: 37 | - "" 38 | resources: 39 | - secrets 40 | verbs: 41 | - create 42 | - update 43 | {{- if .Values.permissions.operator.restrict.secret }} 44 | - get 45 | - list 46 | - watch 47 | {{- end }} 48 | {{- end }} 49 | --- 50 | apiVersion: rbac.authorization.k8s.io/v1 51 | kind: RoleBinding 52 | metadata: 53 | {{- with .Values.additionalAnnotations }} 54 | annotations: 55 | {{- toYaml . | nindent 4 }} 56 | {{- end }} 57 | labels: 58 | app.kubernetes.io/name: {{ .Values.operator.name }}-certs 59 | {{- include "keda.labels" . | indent 4 }} 60 | name: {{ .Values.operator.name }}-certs 61 | namespace: {{ .Release.Namespace }} 62 | roleRef: 63 | apiGroup: rbac.authorization.k8s.io 64 | kind: Role 65 | name: {{ .Values.operator.name }}-certs 66 | subjects: 67 | - kind: ServiceAccount 68 | name: {{ (.Values.serviceAccount.operator).name | default .Values.serviceAccount.name }} 69 | namespace: {{ .Release.Namespace }} 70 | --- 71 | apiVersion: rbac.authorization.k8s.io/v1 72 | kind: ClusterRole 73 | metadata: 74 | {{- with .Values.additionalAnnotations }} 75 | annotations: 76 | {{- toYaml . | nindent 4 }} 77 | {{- end }} 78 | labels: 79 | app.kubernetes.io/name: {{ .Values.operator.name }}-minimal-cluster-role 80 | {{- include "keda.labels" . | indent 4 }} 81 | name: {{ .Values.operator.name }}-minimal-cluster-role 82 | rules: 83 | - apiGroups: 84 | - keda.sh 85 | resources: 86 | - clustertriggerauthentications 87 | - clustertriggerauthentications/status 88 | verbs: 89 | - get 90 | - list 91 | - patch 92 | - update 93 | - watch 94 | {{- if and .Values.certificates.autoGenerated ( not .Values.certificates.certManager.enabled ) }} 95 | - apiGroups: 96 | - admissionregistration.k8s.io 97 | resources: 98 | - validatingwebhookconfigurations 99 | verbs: 100 | - get 101 | - list 102 | - patch 103 | - update 104 | - watch 105 | - apiGroups: 106 | - apiregistration.k8s.io 107 | resources: 108 | - apiservices 109 | verbs: 110 | - get 111 | - list 112 | - patch 113 | - update 114 | - watch 115 | {{- end }} 116 | - apiGroups: 117 | - eventing.keda.sh 118 | resources: 119 | - cloudeventsources 120 | - cloudeventsources/status 121 | - clustercloudeventsources 122 | - clustercloudeventsources/status 123 | verbs: 124 | - get 125 | - list 126 | - patch 127 | - update 128 | - watch 129 | --- 130 | apiVersion: rbac.authorization.k8s.io/v1 131 | kind: ClusterRoleBinding 132 | metadata: 133 | {{- with .Values.additionalAnnotations }} 134 | annotations: 135 | {{- toYaml . | nindent 4 }} 136 | {{- end }} 137 | labels: 138 | app.kubernetes.io/name: {{ .Values.operator.name }}-minimal 139 | {{- include "keda.labels" . | indent 4 }} 140 | name: {{ .Values.operator.name }}-minimal 141 | roleRef: 142 | apiGroup: rbac.authorization.k8s.io 143 | kind: ClusterRole 144 | name: {{ .Values.operator.name }}-minimal-cluster-role 145 | subjects: 146 | - kind: ServiceAccount 147 | name: {{ (.Values.serviceAccount.operator).name | default .Values.serviceAccount.name }} 148 | namespace: {{ .Release.Namespace }} 149 | {{- end }} 150 | -------------------------------------------------------------------------------- /keda/templates/manager/poddisruptionbudget.yaml: -------------------------------------------------------------------------------- 1 | {{- if or (or .Values.podDisruptionBudget.minAvailable .Values.podDisruptionBudget.maxUnavailable) .Values.podDisruptionBudget.operator }} 2 | apiVersion: policy/v1 3 | kind: PodDisruptionBudget 4 | metadata: 5 | namespace: {{ .Release.Namespace }} 6 | name: {{ .Values.operator.name }} 7 | {{- with .Values.additionalAnnotations }} 8 | annotations: 9 | {{- toYaml . | nindent 4 }} 10 | {{- end }} 11 | labels: 12 | app.kubernetes.io/name: {{ .Values.operator.name }} 13 | {{- include "keda.labels" . | indent 4 }} 14 | spec: 15 | {{- if .Values.podDisruptionBudget.minAvailable }} 16 | minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} 17 | {{- end }} 18 | {{- if .Values.podDisruptionBudget.maxUnavailable }} 19 | maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} 20 | {{- end }} 21 | {{- if .Values.podDisruptionBudget.operator }} 22 | {{- if .Values.podDisruptionBudget.operator.minAvailable }} 23 | minAvailable: {{ .Values.podDisruptionBudget.operator.minAvailable }} 24 | {{- end }} 25 | {{- if .Values.podDisruptionBudget.operator.maxUnavailable }} 26 | maxUnavailable: {{ .Values.podDisruptionBudget.operator.maxUnavailable }} 27 | {{- end }} 28 | {{- end }} 29 | selector: 30 | matchLabels: 31 | app: {{ .Values.operator.name }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /keda/templates/manager/podmonitor.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.prometheus.operator.enabled .Values.prometheus.operator.podMonitor.enabled }} 2 | apiVersion: monitoring.coreos.com/v1 3 | kind: PodMonitor 4 | metadata: 5 | name: {{ .Values.operator.name }} 6 | {{- with .Values.additionalAnnotations }} 7 | annotations: 8 | {{- toYaml . | nindent 4 }} 9 | {{- end }} 10 | labels: 11 | app.kubernetes.io/name: {{ .Values.operator.name }} 12 | {{- include "keda.labels" . | indent 4 }} 13 | {{- range $key, $value := .Values.prometheus.operator.podMonitor.additionalLabels }} 14 | {{ $key }}: {{ $value | quote }} 15 | {{- end }} 16 | {{- with .Values.prometheus.operator.podMonitor.namespace }} 17 | namespace: {{ . }} 18 | {{- end }} 19 | spec: 20 | podMetricsEndpoints: 21 | - port: metrics 22 | path: /metrics 23 | {{- with .Values.prometheus.operator.podMonitor.interval }} 24 | interval: {{ . }} 25 | {{- end }} 26 | {{- with .Values.prometheus.operator.podMonitor.scrapeTimeout }} 27 | scrapeTimeout: {{ . }} 28 | {{- end }} 29 | {{- with .Values.prometheus.operator.podMonitor.relabelings }} 30 | relabelings: 31 | {{ toYaml . | indent 4 }} 32 | {{- end }} 33 | {{- with .Values.prometheus.operator.podMonitor.metricRelabelings }} 34 | metricRelabelings: 35 | {{- toYaml . | nindent 4 }} 36 | {{- end }} 37 | namespaceSelector: 38 | matchNames: 39 | - {{ .Release.Namespace }} 40 | selector: 41 | matchLabels: 42 | app: {{ .Values.operator.name }} 43 | {{- end }} 44 | -------------------------------------------------------------------------------- /keda/templates/manager/prometheusrules.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.prometheus.operator.enabled .Values.prometheus.operator.prometheusRules.enabled }} 2 | apiVersion: monitoring.coreos.com/v1 3 | kind: PrometheusRule 4 | metadata: 5 | name: {{ .Values.operator.name }} 6 | {{- with .Values.additionalAnnotations }} 7 | annotations: 8 | {{- toYaml . | nindent 4 }} 9 | {{- end }} 10 | labels: 11 | app.kubernetes.io/name: {{ .Values.operator.name }} 12 | {{- include "keda.labels" . | indent 4 }} 13 | {{- range $key, $value := .Values.prometheus.operator.prometheusRules.additionalLabels }} 14 | {{ $key }}: {{ $value | quote }} 15 | {{- end }} 16 | {{- with .Values.prometheus.operator.prometheusRules.namespace }} 17 | namespace: {{ . }} 18 | {{- end }} 19 | spec: 20 | groups: 21 | - name: {{ .Values.operator.name }} 22 | rules: 23 | {{ toYaml .Values.prometheus.operator.prometheusRules.alerts | indent 6 }} 24 | {{- end }} 25 | -------------------------------------------------------------------------------- /keda/templates/manager/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | {{- if or .Values.additionalAnnotations .Values.service.annotations (and .Values.prometheus.operator.enabled ( not (or .Values.prometheus.operator.podMonitor.enabled .Values.prometheus.operator.serviceMonitor.enabled ))) }} 5 | annotations: 6 | {{- if and .Values.prometheus.operator.enabled ( not (or .Values.prometheus.operator.podMonitor.enabled .Values.prometheus.operator.serviceMonitor.enabled )) }} 7 | prometheus.io/scrape: "true" 8 | prometheus.io/port: {{ .Values.prometheus.operator.port | quote }} 9 | prometheus.io/path: "/metrics" 10 | {{- end }} 11 | {{- with .Values.additionalAnnotations }} 12 | {{- range $key, $value := . }} 13 | {{ $key }}: {{ $value | quote }} 14 | {{- end }} 15 | {{- end }} 16 | {{- with .Values.service.annotations }} 17 | {{- range $key, $value := . }} 18 | {{ $key }}: {{ $value | quote }} 19 | {{- end }} 20 | {{- end }} 21 | {{- end }} 22 | labels: 23 | app.kubernetes.io/name: {{ .Values.operator.name }} 24 | {{- include "keda.labels" . | indent 4 }} 25 | name: {{ .Values.operator.name }} 26 | namespace: {{ .Release.Namespace }} 27 | spec: 28 | ports: 29 | - name: metricsservice 30 | port: 9666 31 | targetPort: 9666 32 | {{- if .Values.prometheus.operator.enabled }} 33 | - name: metrics 34 | port: {{ .Values.prometheus.operator.port }} 35 | targetPort: {{ .Values.prometheus.operator.port }} 36 | {{- with .Values.prometheus.operator.appProtocol }} 37 | appProtocol: {{ . }} 38 | {{- end }} 39 | {{- end }} 40 | {{- if .Values.profiling.operator.enabled }} 41 | - name: profiling 42 | port: {{ .Values.profiling.operator.port }} 43 | targetPort: {{ .Values.profiling.operator.port }} 44 | {{- end }} 45 | selector: 46 | app: {{ .Values.operator.name }} 47 | -------------------------------------------------------------------------------- /keda/templates/manager/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if (.Values.serviceAccount.operator).create | default .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | labels: 6 | app.kubernetes.io/name: {{ (.Values.serviceAccount.operator).name | default .Values.serviceAccount.name }} 7 | {{- if .Values.podIdentity.azureWorkload.enabled }} 8 | azure.workload.identity/use: "true" 9 | {{- end }} 10 | {{- include "keda.labels" . | nindent 4 }} 11 | {{- if or .Values.podIdentity.azureWorkload.enabled .Values.podIdentity.aws.irsa.enabled ((.Values.serviceAccount.operator).annotations | default .Values.serviceAccount.annotations) .Values.podIdentity.gcp.enabled }} 12 | annotations: 13 | {{- if .Values.additionalAnnotations }} 14 | {{- toYaml .Values.additionalAnnotations | nindent 4 }} 15 | {{- end }} 16 | {{- if .Values.podIdentity.azureWorkload.enabled }} 17 | {{- if .Values.podIdentity.azureWorkload.clientId }} 18 | azure.workload.identity/client-id: {{ .Values.podIdentity.azureWorkload.clientId | quote }} 19 | {{- end }} 20 | {{- if .Values.podIdentity.azureWorkload.tenantId }} 21 | azure.workload.identity/tenant-id: {{ .Values.podIdentity.azureWorkload.tenantId | quote }} 22 | {{- end }} 23 | azure.workload.identity/service-account-token-expiration: {{ .Values.podIdentity.azureWorkload.tokenExpiration | quote }} 24 | {{- end }} 25 | {{- if .Values.podIdentity.aws.irsa.enabled }} 26 | {{- if .Values.podIdentity.aws.irsa.audience }} 27 | eks.amazonaws.com/audience: {{ .Values.podIdentity.aws.irsa.audience | quote }} 28 | {{- end }} 29 | {{- if .Values.podIdentity.aws.irsa.roleArn }} 30 | eks.amazonaws.com/role-arn: {{ .Values.podIdentity.aws.irsa.roleArn | quote }} 31 | {{- end }} 32 | {{- if .Values.podIdentity.aws.irsa.stsRegionalEndpoints }} 33 | eks.amazonaws.com/sts-regional-endpoints: {{ .Values.podIdentity.aws.irsa.stsRegionalEndpoints | quote }} 34 | {{- end }} 35 | eks.amazonaws.com/token-expiration: {{ .Values.podIdentity.aws.irsa.tokenExpiration | quote }} 36 | {{- end }} 37 | {{- if .Values.podIdentity.gcp.enabled }} 38 | {{- if .Values.podIdentity.gcp.gcpIAMServiceAccount }} 39 | iam.gke.io/gcp-service-account: {{ .Values.podIdentity.gcp.gcpIAMServiceAccount }} 40 | {{- end }} 41 | {{- end }} 42 | {{- if (.Values.serviceAccount.operator).annotations | default .Values.serviceAccount.annotations }} 43 | {{- toYaml ((.Values.serviceAccount.operator).annotations | default .Values.serviceAccount.annotations) | nindent 4}} 44 | {{- end }} 45 | {{- end }} 46 | name: {{ (.Values.serviceAccount.operator).name | default .Values.serviceAccount.name }} 47 | namespace: {{ .Release.Namespace }} 48 | automountServiceAccountToken: {{ kindIs "invalid" (.Values.serviceAccount.operator).automountServiceAccountToken | ternary .Values.serviceAccount.automountServiceAccountToken (.Values.serviceAccount.operator).automountServiceAccountToken }} 49 | {{- end -}} 50 | -------------------------------------------------------------------------------- /keda/templates/manager/servicemonitor.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.prometheus.operator.enabled .Values.prometheus.operator.serviceMonitor.enabled }} 2 | apiVersion: monitoring.coreos.com/v1 3 | kind: ServiceMonitor 4 | metadata: 5 | name: {{ .Values.operator.name }} 6 | {{- with .Values.additionalAnnotations }} 7 | annotations: 8 | {{- toYaml . | nindent 4 }} 9 | {{- end }} 10 | labels: 11 | app.kubernetes.io/name: {{ .Values.operator.name }} 12 | {{- include "keda.labels" . | indent 4 }} 13 | {{- range $key, $value := .Values.prometheus.operator.serviceMonitor.additionalLabels }} 14 | {{ $key }}: {{ $value | quote }} 15 | {{- end }} 16 | {{- with .Values.prometheus.operator.serviceMonitor.namespace }} 17 | namespace: {{ . }} 18 | {{- end }} 19 | spec: 20 | {{- with .Values.prometheus.operator.serviceMonitor.jobLabel }} 21 | jobLabel: {{ . }} 22 | {{- end }} 23 | {{- with .Values.prometheus.operator.serviceMonitor.targetLabels }} 24 | targetLabels: 25 | {{- toYaml . | nindent 4 }} 26 | {{- end }} 27 | {{- with .Values.prometheus.operator.serviceMonitor.podTargetLabels }} 28 | podTargetLabels: 29 | {{- toYaml . | nindent 4 }} 30 | {{- end }} 31 | endpoints: 32 | - port: {{ .Values.prometheus.operator.serviceMonitor.port }} 33 | {{- with .Values.prometheus.operator.serviceMonitor.targetPort }} 34 | targetPort: {{ . }} 35 | {{- end }} 36 | path: /metrics 37 | {{- with .Values.prometheus.operator.serviceMonitor.interval }} 38 | interval: {{ . }} 39 | {{- end }} 40 | {{- with .Values.prometheus.operator.serviceMonitor.scrapeTimeout }} 41 | scrapeTimeout: {{ . }} 42 | {{- end }} 43 | {{- if .Values.prometheus.operator.serviceMonitor.relabelings}} 44 | {{- with .Values.prometheus.operator.serviceMonitor.relabelings }} 45 | relabelings: 46 | {{- toYaml . | nindent 6 }} 47 | {{- end }} 48 | {{- else }} 49 | {{- with .Values.prometheus.operator.serviceMonitor.relabellings }} 50 | relabelings: 51 | {{- toYaml . | nindent 6 }} 52 | {{- end }} 53 | {{- end}} 54 | {{- with .Values.prometheus.operator.serviceMonitor.metricRelabelings }} 55 | metricRelabelings: 56 | {{- toYaml . | nindent 6 }} 57 | {{- end }} 58 | scheme: {{ .Values.prometheus.operator.serviceMonitor.scheme }} 59 | {{- with .Values.prometheus.operator.serviceMonitor.tlsConfig }} 60 | tlsConfig: 61 | {{ toYaml . | nindent 6}} 62 | {{- end }} 63 | namespaceSelector: 64 | matchNames: 65 | - {{ .Release.Namespace }} 66 | selector: 67 | matchLabels: 68 | app.kubernetes.io/name: {{ .Values.operator.name }} 69 | {{- end }} 70 | -------------------------------------------------------------------------------- /keda/templates/metrics-server/apiservice.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apiregistration.k8s.io/v1 2 | kind: APIService 3 | metadata: 4 | {{- if or .Values.certificates.certManager.enabled .Values.additionalAnnotations }} 5 | annotations: 6 | {{- if .Values.certificates.certManager.enabled }} 7 | {{- if and (not .Values.certificates.certManager.generateCA) .Values.certificates.certManager.issuer.generate }} 8 | cert-manager.io/inject-ca-from-secret: {{ .Release.Namespace }}/{{ .Values.certificates.certManager.caSecretName }} 9 | {{- else }} 10 | cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ .Values.operator.name }}-tls-certificates 11 | {{- end }} 12 | {{- end }} 13 | {{- if .Values.additionalAnnotations }} 14 | {{- toYaml .Values.additionalAnnotations | nindent 4 }} 15 | {{- end }} 16 | {{- end }} 17 | labels: 18 | app.kubernetes.io/name: v1beta1.external.metrics.k8s.io 19 | {{- include "keda.labels" . | indent 4 }} 20 | name: v1beta1.external.metrics.k8s.io 21 | spec: 22 | service: 23 | name: {{ .Values.operator.name }}-metrics-apiserver 24 | namespace: {{ .Release.Namespace }} 25 | port: {{ .Values.service.portHttps }} 26 | group: external.metrics.k8s.io 27 | version: v1beta1 28 | groupPriorityMinimum: 100 29 | versionPriority: 100 30 | -------------------------------------------------------------------------------- /keda/templates/metrics-server/ciliumnetworkpolicy.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.networkPolicy.enabled (eq .Values.networkPolicy.flavor "cilium") }} 2 | apiVersion: "cilium.io/v2" 3 | kind: CiliumNetworkPolicy 4 | metadata: 5 | name: {{ .Values.operator.name }}-metrics-apiserver 6 | namespace: {{ .Release.Namespace }} 7 | {{- with .Values.additionalAnnotations }} 8 | annotations: 9 | {{- toYaml . | nindent 4 }} 10 | {{- end }} 11 | labels: 12 | app: {{ .Values.operator.name }}-metrics-apiserver 13 | app.kubernetes.io/name: {{ .Values.operator.name }}-metrics-apiserver 14 | {{- include "keda.labels" . | indent 4 }} 15 | spec: 16 | endpointSelector: 17 | matchLabels: 18 | app: {{ .Values.operator.name }}-metrics-apiserver 19 | egress: 20 | - toEntities: 21 | - kube-apiserver 22 | - cluster 23 | ingress: 24 | - fromEntities: 25 | - cluster 26 | {{ end }} 27 | -------------------------------------------------------------------------------- /keda/templates/metrics-server/clusterrole.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.rbac.create }} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRole 4 | metadata: 5 | {{- with .Values.additionalAnnotations }} 6 | annotations: 7 | {{- toYaml . | nindent 4 }} 8 | {{- end }} 9 | labels: 10 | app.kubernetes.io/name: {{ .Values.operator.name }}-external-metrics-reader 11 | {{- include "keda.labels" . | indent 4 }} 12 | name: {{ .Values.operator.name }}-external-metrics-reader 13 | rules: 14 | - apiGroups: 15 | - external.metrics.k8s.io 16 | resources: 17 | - 'externalmetrics' 18 | verbs: 19 | - 'get' 20 | {{- end -}} 21 | -------------------------------------------------------------------------------- /keda/templates/metrics-server/clusterrolebinding.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.rbac.create }} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRoleBinding 4 | metadata: 5 | {{- with .Values.additionalAnnotations }} 6 | annotations: 7 | {{- toYaml . | nindent 4 }} 8 | {{- end }} 9 | labels: 10 | app.kubernetes.io/name: {{ .Values.operator.name }}-system-auth-delegator 11 | {{- include "keda.labels" . | indent 4 }} 12 | name: {{ .Values.operator.name }}-system-auth-delegator 13 | roleRef: 14 | apiGroup: rbac.authorization.k8s.io 15 | kind: ClusterRole 16 | name: system:auth-delegator 17 | subjects: 18 | - kind: ServiceAccount 19 | name: {{ (.Values.serviceAccount.metricServer).name | default .Values.serviceAccount.name }} 20 | namespace: {{ .Release.Namespace }} 21 | --- 22 | # https://kubernetes.io/docs/tasks/extend-kubernetes/configure-aggregation-layer/#extension-apiserver-authenticates-the-request 23 | apiVersion: rbac.authorization.k8s.io/v1 24 | kind: RoleBinding 25 | metadata: 26 | {{- with .Values.additionalAnnotations }} 27 | annotations: 28 | {{- toYaml . | nindent 4 }} 29 | {{- end }} 30 | labels: 31 | app.kubernetes.io/name: {{ .Values.operator.name }}-auth-reader 32 | {{- include "keda.labels" . | indent 4 }} 33 | name: {{ .Values.operator.name }}-auth-reader 34 | namespace: {{ .Values.rbac.controlPlaneServiceAccountsNamespace }} 35 | roleRef: 36 | apiGroup: rbac.authorization.k8s.io 37 | kind: Role 38 | name: extension-apiserver-authentication-reader 39 | subjects: 40 | - kind: ServiceAccount 41 | name: {{ (.Values.serviceAccount.metricServer).name | default .Values.serviceAccount.name }} 42 | namespace: {{ .Release.Namespace }} 43 | --- 44 | apiVersion: rbac.authorization.k8s.io/v1 45 | kind: ClusterRoleBinding 46 | metadata: 47 | {{- with .Values.additionalAnnotations }} 48 | annotations: 49 | {{- toYaml . | nindent 4 }} 50 | {{- end }} 51 | labels: 52 | app.kubernetes.io/name: {{ .Values.operator.name }}-hpa-controller-external-metrics 53 | {{- include "keda.labels" . | indent 4 }} 54 | name: {{ .Values.operator.name }}-hpa-controller-external-metrics 55 | roleRef: 56 | apiGroup: rbac.authorization.k8s.io 57 | kind: ClusterRole 58 | name: {{ .Values.operator.name }}-external-metrics-reader 59 | subjects: 60 | - kind: ServiceAccount 61 | name: horizontal-pod-autoscaler 62 | namespace: kube-system 63 | {{- end -}} 64 | -------------------------------------------------------------------------------- /keda/templates/metrics-server/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Values.operator.name }}-metrics-apiserver 5 | namespace: {{ .Release.Namespace }} 6 | {{- with .Values.additionalAnnotations }} 7 | annotations: 8 | {{- toYaml . | nindent 4 }} 9 | {{- end }} 10 | labels: 11 | app: {{ .Values.operator.name }}-metrics-apiserver 12 | app.kubernetes.io/name: {{ .Values.operator.name }}-metrics-apiserver 13 | {{- include "keda.labels" . | indent 4 }} 14 | spec: 15 | revisionHistoryLimit: {{ .Values.metricsServer.revisionHistoryLimit}} 16 | replicas: {{ .Values.metricsServer.replicaCount }} 17 | {{- with .Values.upgradeStrategy.metricsApiServer }} 18 | strategy: 19 | {{- toYaml . | nindent 4 }} 20 | {{- end }} 21 | selector: 22 | matchLabels: 23 | app: {{ .Values.operator.name }}-metrics-apiserver 24 | template: 25 | metadata: 26 | labels: 27 | app: {{ .Values.operator.name }}-metrics-apiserver 28 | app.kubernetes.io/name: {{ .Values.operator.name }}-metrics-apiserver 29 | {{- include "keda.labels" . | indent 8 }} 30 | {{- if .Values.podLabels.metricsAdapter }} 31 | {{- toYaml .Values.podLabels.metricsAdapter | nindent 8}} 32 | {{- end }} 33 | {{- if or .Values.additionalAnnotations .Values.podAnnotations.metricsAdapter (and .Values.prometheus.metricServer.enabled ( not (or .Values.prometheus.metricServer.podMonitor.enabled .Values.prometheus.metricServer.serviceMonitor.enabled )) )}} 34 | annotations: 35 | {{- if .Values.additionalAnnotations }} 36 | {{- toYaml .Values.additionalAnnotations | nindent 8 }} 37 | {{- end }} 38 | {{- if and .Values.prometheus.metricServer.enabled ( not (or .Values.prometheus.metricServer.podMonitor.enabled .Values.prometheus.metricServer.serviceMonitor.enabled )) }} 39 | prometheus.io/scrape: "true" 40 | prometheus.io/port: {{ .Values.prometheus.metricServer.port | quote }} 41 | {{- end }} 42 | {{- if .Values.podAnnotations.metricsAdapter }} 43 | {{- toYaml .Values.podAnnotations.metricsAdapter | nindent 8}} 44 | {{- end }} 45 | {{- end }} 46 | spec: 47 | enableServiceLinks: {{ .Values.enableServiceLinks }} 48 | {{- if .Values.priorityClassName }} 49 | priorityClassName: {{ .Values.priorityClassName | quote }} 50 | {{- end }} 51 | {{- with .Values.imagePullSecrets }} 52 | imagePullSecrets: 53 | {{- toYaml . | nindent 8 }} 54 | {{- end }} 55 | serviceAccountName: {{ (.Values.serviceAccount.metricServer).name | default .Values.serviceAccount.name }} 56 | automountServiceAccountToken: {{ kindIs "invalid" (.Values.serviceAccount.metricServer).automountServiceAccountToken | ternary .Values.serviceAccount.automountServiceAccountToken (.Values.serviceAccount.metricServer).automountServiceAccountToken }} 57 | securityContext: 58 | {{- if .Values.podSecurityContext.metricServer }} 59 | {{- toYaml .Values.podSecurityContext.metricServer | nindent 8 }} 60 | {{- else }} 61 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 62 | {{- end }} 63 | containers: 64 | - name: {{ .Values.operator.name }}-metrics-apiserver 65 | securityContext: 66 | {{- if .Values.securityContext.metricServer }} 67 | {{- toYaml .Values.securityContext.metricServer | nindent 12 }} 68 | {{- else }} 69 | {{- toYaml .Values.securityContext | nindent 12 }} 70 | {{- end }} 71 | {{- $registry := .Values.global.image.registry | default .Values.image.metricsApiServer.registry | default "" }} 72 | {{- if $registry }} 73 | image: "{{ $registry }}/{{ .Values.image.metricsApiServer.repository }}:{{ .Values.image.metricsApiServer.tag | default .Chart.AppVersion }}" 74 | {{- else }} 75 | image: "{{ .Values.image.metricsApiServer.repository }}:{{ .Values.image.metricsApiServer.tag | default .Chart.AppVersion }}" 76 | {{- end }} 77 | imagePullPolicy: {{ .Values.image.pullPolicy }} 78 | livenessProbe: 79 | httpGet: 80 | path: /healthz 81 | port: {{ .Values.service.portHttpsTarget }} 82 | scheme: HTTPS 83 | initialDelaySeconds: {{ .Values.metricsServer.livenessProbe.initialDelaySeconds }} 84 | periodSeconds: {{ .Values.metricsServer.livenessProbe.periodSeconds }} 85 | timeoutSeconds: {{ .Values.metricsServer.livenessProbe.timeoutSeconds }} 86 | failureThreshold: {{ .Values.metricsServer.livenessProbe.failureThreshold }} 87 | successThreshold: {{ .Values.metricsServer.livenessProbe.successThreshold }} 88 | readinessProbe: 89 | httpGet: 90 | path: /readyz 91 | port: {{ .Values.service.portHttpsTarget }} 92 | scheme: HTTPS 93 | initialDelaySeconds: {{ .Values.metricsServer.readinessProbe.initialDelaySeconds }} 94 | periodSeconds: {{ .Values.metricsServer.readinessProbe.periodSeconds }} 95 | timeoutSeconds: {{ .Values.metricsServer.readinessProbe.timeoutSeconds }} 96 | failureThreshold: {{ .Values.metricsServer.readinessProbe.failureThreshold }} 97 | successThreshold: {{ .Values.metricsServer.readinessProbe.successThreshold }} 98 | env: 99 | - name: WATCH_NAMESPACE 100 | value: {{ .Values.watchNamespace | quote }} 101 | - name: POD_NAMESPACE 102 | valueFrom: 103 | fieldRef: 104 | fieldPath: metadata.namespace 105 | - name: KEDA_HTTP_DEFAULT_TIMEOUT 106 | value: {{ .Values.http.timeout | quote }} 107 | - name: KEDA_HTTP_MIN_TLS_VERSION 108 | value: {{ .Values.http.minTlsVersion }} 109 | {{- if ( not .Values.http.keepAlive.enabled ) }} 110 | - name: KEDA_HTTP_DISABLE_KEEP_ALIVE 111 | value: "true" 112 | {{- end }} 113 | {{- if .Values.permissions.metricServer.restrict.secret }} 114 | - name: KEDA_RESTRICT_SECRET_ACCESS 115 | value: {{ .Values.permissions.metricServer.restrict.secret | quote }} 116 | {{- end }} 117 | {{- if .Values.env }} 118 | {{- toYaml .Values.env | nindent 12 -}} 119 | {{- end }} 120 | command: 121 | - /keda-adapter 122 | args: 123 | - --port={{ .Values.prometheus.metricServer.port }} 124 | - --secure-port={{ .Values.service.portHttpsTarget }} 125 | - --logtostderr=true 126 | - --stderrthreshold={{ .Values.logging.metricServer.stderrthreshold }} 127 | - --disable-compression={{ .Values.metricsServer.disableCompression}} 128 | - --metrics-service-address={{ .Values.operator.name }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:9666 129 | - --client-ca-file={{ .Values.certificates.mountPath }}/ca.crt 130 | - --tls-cert-file={{ .Values.certificates.mountPath }}/tls.crt 131 | - --tls-private-key-file={{ .Values.certificates.mountPath }}/tls.key 132 | - --cert-dir={{ .Values.certificates.mountPath }} 133 | - --v={{ .Values.logging.metricServer.level }} 134 | {{- if .Values.profiling.metricsServer.enabled }} 135 | - "--profiling-bind-address=:{{ .Values.profiling.metricsServer.port }}" 136 | {{- end }} 137 | {{- range $key, $value := .Values.extraArgs.metricsAdapter }} 138 | - --{{ $key }}={{ $value }} 139 | {{- end }} 140 | ports: 141 | - containerPort: {{ .Values.service.portHttpsTarget }} 142 | name: https 143 | protocol: TCP 144 | - containerPort: {{ .Values.prometheus.metricServer.port }} 145 | name: {{ .Values.prometheus.metricServer.portName }} 146 | protocol: TCP 147 | volumeMounts: 148 | - mountPath: {{ .Values.certificates.mountPath }} 149 | name: certificates 150 | readOnly: true 151 | {{- if .Values.grpcTLSCertsSecret }} 152 | - name: grpc-certs 153 | mountPath: /grpccerts 154 | {{- end }} 155 | {{- if .Values.hashiCorpVaultTLS }} 156 | - name: hashicorp-vault-certs 157 | mountPath: /hashicorp-vaultcerts 158 | {{- end }} 159 | {{- if .Values.volumes.metricsApiServer.extraVolumeMounts }} 160 | {{- toYaml .Values.volumes.metricsApiServer.extraVolumeMounts | nindent 10 }} 161 | {{- end }} 162 | resources: 163 | {{- if .Values.resources.metricServer }} 164 | {{- toYaml .Values.resources.metricServer | nindent 12 }} 165 | {{- else }} 166 | {{- toYaml .Values.resources | nindent 12 }} 167 | {{- end }} 168 | volumes: 169 | - name: certificates 170 | secret: 171 | defaultMode: 420 172 | secretName: {{ .Values.certificates.secretName }} 173 | {{- if .Values.grpcTLSCertsSecret }} 174 | - name: grpc-certs 175 | secret: 176 | secretName: {{ .Values.grpcTLSCertsSecret }} 177 | {{- end }} 178 | {{- if .Values.hashiCorpVaultTLS }} 179 | - name: hashicorp-vault-certs 180 | secret: 181 | secretName: {{ .Values.hashiCorpVaultTLS }} 182 | {{- end }} 183 | {{- if .Values.volumes.metricsApiServer.extraVolumes }} 184 | {{- toYaml .Values.volumes.metricsApiServer.extraVolumes | nindent 6 }} 185 | {{- end }} 186 | dnsPolicy: {{ .Values.metricsServer.dnsPolicy }} 187 | hostNetwork: {{ .Values.metricsServer.useHostNetwork }} 188 | nodeSelector: 189 | kubernetes.io/os: linux 190 | {{- with .Values.nodeSelector }} 191 | {{- toYaml . | nindent 8 }} 192 | {{- end }} 193 | {{- if .Values.metricsServer.affinity }} 194 | affinity: 195 | {{- toYaml .Values.metricsServer.affinity | nindent 8 }} 196 | {{- else if .Values.affinity }} 197 | affinity: 198 | {{- toYaml .Values.affinity | nindent 8 }} 199 | {{- end }} 200 | {{- with .Values.topologySpreadConstraints.metricsServer}} 201 | topologySpreadConstraints: 202 | {{- toYaml . | nindent 8 }} 203 | {{- end }} 204 | {{- with .Values.tolerations }} 205 | tolerations: 206 | {{- toYaml . | nindent 8 }} 207 | {{- end }} 208 | -------------------------------------------------------------------------------- /keda/templates/metrics-server/poddisruptionbudget.yaml: -------------------------------------------------------------------------------- 1 | {{- if or (or .Values.podDisruptionBudget.minAvailable .Values.podDisruptionBudget.maxUnavailable) .Values.podDisruptionBudget.metricServer }} 2 | apiVersion: policy/v1 3 | kind: PodDisruptionBudget 4 | metadata: 5 | namespace: {{ .Release.Namespace }} 6 | name: {{ .Values.operator.name }}-metrics-apiserver 7 | {{- with .Values.additionalAnnotations }} 8 | annotations: 9 | {{- toYaml . | nindent 4 }} 10 | {{- end }} 11 | labels: 12 | app.kubernetes.io/name: {{ .Values.operator.name }}-metrics-apiserver 13 | {{- include "keda.labels" . | indent 4 }} 14 | spec: 15 | {{- if .Values.podDisruptionBudget.minAvailable }} 16 | minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} 17 | {{- end }} 18 | {{- if .Values.podDisruptionBudget.maxUnavailable }} 19 | maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} 20 | {{- end }} 21 | {{- if .Values.podDisruptionBudget.metricServer }} 22 | {{- if .Values.podDisruptionBudget.metricServer.minAvailable }} 23 | minAvailable: {{ .Values.podDisruptionBudget.metricServer.minAvailable }} 24 | {{- end }} 25 | {{- if .Values.podDisruptionBudget.metricServer.maxUnavailable }} 26 | maxUnavailable: {{ .Values.podDisruptionBudget.metricServer.maxUnavailable }} 27 | {{- end }} 28 | {{- end }} 29 | selector: 30 | matchLabels: 31 | app: {{ .Values.operator.name }}-metrics-apiserver 32 | {{- end }} 33 | 34 | -------------------------------------------------------------------------------- /keda/templates/metrics-server/podmonitor.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.prometheus.metricServer.enabled .Values.prometheus.metricServer.podMonitor.enabled }} 2 | apiVersion: monitoring.coreos.com/v1 3 | kind: PodMonitor 4 | metadata: 5 | name: {{ .Values.operator.name }}-metrics-apiserver 6 | {{- with .Values.additionalAnnotations }} 7 | annotations: 8 | {{- toYaml . | nindent 4 }} 9 | {{- end }} 10 | labels: 11 | app.kubernetes.io/name: {{ .Values.operator.name }} 12 | {{- include "keda.labels" . | indent 4 }} 13 | {{- range $key, $value := .Values.prometheus.metricServer.podMonitor.additionalLabels }} 14 | {{ $key }}: {{ $value | quote }} 15 | {{- end }} 16 | {{- with .Values.prometheus.metricServer.podMonitor.namespace }} 17 | namespace: {{ . }} 18 | {{- end }} 19 | spec: 20 | podMetricsEndpoints: 21 | - port: {{ .Values.prometheus.metricServer.portName }} 22 | path: /metrics 23 | {{- with .Values.prometheus.metricServer.podMonitor.interval }} 24 | interval: {{ . }} 25 | {{- end }} 26 | {{- with .Values.prometheus.metricServer.podMonitor.scrapeTimeout }} 27 | scrapeTimeout: {{ . }} 28 | {{- end }} 29 | {{- with .Values.prometheus.metricServer.podMonitor.relabelings }} 30 | relabelings: 31 | {{ toYaml . | indent 4 }} 32 | {{- end }} 33 | {{- with .Values.prometheus.metricServer.podMonitor.metricRelabelings }} 34 | metricRelabelings: 35 | {{- toYaml . | nindent 4 }} 36 | {{- end }} 37 | namespaceSelector: 38 | matchNames: 39 | - {{ .Release.Namespace }} 40 | selector: 41 | matchLabels: 42 | app: {{ .Values.operator.name }}-metrics-apiserver 43 | {{- end }} 44 | -------------------------------------------------------------------------------- /keda/templates/metrics-server/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: {{ .Values.operator.name }}-metrics-apiserver 6 | app: {{ .Values.operator.name }}-metrics-apiserver 7 | {{- include "keda.labels" . | indent 4 }} 8 | name: {{ .Values.operator.name }}-metrics-apiserver 9 | namespace: {{ .Release.Namespace }} 10 | {{- if or .Values.additionalAnnotations .Values.service.annotations (and .Values.prometheus.metricServer.enabled ( not (or .Values.prometheus.metricServer.podMonitor.enabled .Values.prometheus.metricServer.serviceMonitor.enabled )))}} 11 | annotations: 12 | {{- if and .Values.prometheus.metricServer.enabled ( not (or .Values.prometheus.metricServer.podMonitor.enabled .Values.prometheus.metricServer.serviceMonitor.enabled )) }} 13 | prometheus.io/scrape: "true" 14 | prometheus.io/port: {{ .Values.prometheus.metricServer.port | quote }} 15 | prometheus.io/path: "/metrics" 16 | {{- end }} 17 | {{- with .Values.additionalAnnotations }} 18 | {{- range $key, $value := . }} 19 | {{ $key }}: {{ $value | quote }} 20 | {{- end }} 21 | {{- end }} 22 | {{- with .Values.service.annotations }} 23 | {{- range $key, $value := . }} 24 | {{ $key }}: {{ $value | quote }} 25 | {{- end }} 26 | {{- end }} 27 | {{- end }} 28 | spec: 29 | type: {{ .Values.service.type }} 30 | ports: 31 | - name: https 32 | port: {{ .Values.service.portHttps }} 33 | targetPort: {{ .Values.service.portHttpsTarget }} 34 | protocol: TCP 35 | appProtocol: https 36 | - name: {{ .Values.prometheus.metricServer.portName }} 37 | port: {{ .Values.prometheus.metricServer.port }} 38 | targetPort: {{ .Values.prometheus.metricServer.port }} 39 | protocol: TCP 40 | {{- with .Values.prometheus.metricServer.appProtocol }} 41 | appProtocol: {{ . }} 42 | {{- end }} 43 | {{- if .Values.profiling.metricsServer.enabled }} 44 | - name: profiling 45 | port: {{ .Values.profiling.metricsServer.port }} 46 | targetPort: {{ .Values.profiling.metricsServer.port }} 47 | protocol: TCP 48 | {{- end }} 49 | selector: 50 | app: {{ .Values.operator.name }}-metrics-apiserver 51 | -------------------------------------------------------------------------------- /keda/templates/metrics-server/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if (.Values.serviceAccount.metricServer).create | default .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | labels: 6 | app.kubernetes.io/name: {{ (.Values.serviceAccount.metricServer).name | default .Values.serviceAccount.name }} 7 | {{- include "keda.labels" . | nindent 4 }} 8 | annotations: 9 | {{- if .Values.additionalAnnotations }} 10 | {{- toYaml .Values.additionalAnnotations | nindent 4 }} 11 | {{- end }} 12 | {{- if (.Values.serviceAccount.metricServer).annotations | default .Values.serviceAccount.annotations }} 13 | {{- toYaml ((.Values.serviceAccount.metricServer).annotations | default .Values.serviceAccount.annotations) | nindent 4}} 14 | {{- end }} 15 | name: {{ (.Values.serviceAccount.metricServer).name | default .Values.serviceAccount.name }} 16 | namespace: {{ .Release.Namespace }} 17 | automountServiceAccountToken: {{ kindIs "invalid" (.Values.serviceAccount.metricServer).automountServiceAccountToken | ternary .Values.serviceAccount.automountServiceAccountToken (.Values.serviceAccount.metricServer).automountServiceAccountToken }} 18 | {{- end -}} 19 | -------------------------------------------------------------------------------- /keda/templates/metrics-server/servicemonitor.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.prometheus.metricServer.enabled .Values.prometheus.metricServer.serviceMonitor.enabled }} 2 | apiVersion: monitoring.coreos.com/v1 3 | kind: ServiceMonitor 4 | metadata: 5 | name: {{ .Values.operator.name }}-metrics-apiserver 6 | {{- with .Values.additionalAnnotations }} 7 | annotations: 8 | {{- toYaml . | nindent 4 }} 9 | {{- end }} 10 | labels: 11 | app.kubernetes.io/name: {{ .Values.operator.name }} 12 | {{- include "keda.labels" . | indent 4 }} 13 | {{- range $key, $value := .Values.prometheus.metricServer.serviceMonitor.additionalLabels }} 14 | {{ $key }}: {{ $value | quote }} 15 | {{- end }} 16 | {{- with .Values.prometheus.metricServer.serviceMonitor.namespace }} 17 | namespace: {{ . }} 18 | {{- end }} 19 | spec: 20 | {{- with .Values.prometheus.metricServer.serviceMonitor.jobLabel }} 21 | jobLabel: {{ . }} 22 | {{- end }} 23 | {{- with .Values.prometheus.metricServer.serviceMonitor.targetLabels }} 24 | targetLabels: 25 | {{- toYaml . | nindent 4 }} 26 | {{- end }} 27 | {{- with .Values.prometheus.metricServer.serviceMonitor.podTargetLabels }} 28 | podTargetLabels: 29 | {{- toYaml . | nindent 4 }} 30 | {{- end }} 31 | endpoints: 32 | - port: {{ .Values.prometheus.metricServer.portName }} 33 | {{- with .Values.prometheus.metricServer.serviceMonitor.targetPort }} 34 | targetPort: {{ . }} 35 | {{- end }} 36 | path: /metrics 37 | {{- with .Values.prometheus.metricServer.serviceMonitor.interval }} 38 | interval: {{ . }} 39 | {{- end }} 40 | {{- with .Values.prometheus.metricServer.serviceMonitor.scrapeTimeout }} 41 | scrapeTimeout: {{ . }} 42 | {{- end }} 43 | {{- if .Values.prometheus.metricServer.serviceMonitor.relabelings}} 44 | {{- with .Values.prometheus.metricServer.serviceMonitor.relabelings }} 45 | relabelings: 46 | {{- toYaml . | nindent 6 }} 47 | {{- end }} 48 | {{- else }} 49 | {{- with .Values.prometheus.metricServer.serviceMonitor.relabellings }} 50 | relabelings: 51 | {{- toYaml . | nindent 6 }} 52 | {{- end }} 53 | {{- end}} 54 | {{- with .Values.prometheus.metricServer.serviceMonitor.metricRelabelings }} 55 | metricRelabelings: 56 | {{- toYaml . | nindent 6 }} 57 | {{- end }} 58 | scheme: {{ .Values.prometheus.metricServer.serviceMonitor.scheme }} 59 | {{- with .Values.prometheus.metricServer.serviceMonitor.tlsConfig }} 60 | tlsConfig: 61 | {{ toYaml . | nindent 6}} 62 | {{- end }} 63 | namespaceSelector: 64 | matchNames: 65 | - {{ .Release.Namespace }} 66 | selector: 67 | matchLabels: 68 | app.kubernetes.io/name: {{ .Values.operator.name }}-metrics-apiserver 69 | {{- end }} 70 | -------------------------------------------------------------------------------- /keda/templates/webhooks/ciliumnetworkpolicy.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.webhooks.enabled .Values.networkPolicy.enabled (eq .Values.networkPolicy.flavor "cilium") }} 2 | apiVersion: "cilium.io/v2" 3 | kind: CiliumNetworkPolicy 4 | metadata: 5 | name: {{ .Values.webhooks.name }} 6 | namespace: {{ .Release.Namespace }} 7 | {{- with .Values.additionalAnnotations }} 8 | annotations: 9 | {{- toYaml . | nindent 4 }} 10 | {{- end }} 11 | labels: 12 | app: {{ .Values.webhooks.name }} 13 | name: {{ .Values.webhooks.name }} 14 | app.kubernetes.io/name: {{ .Values.webhooks.name }} 15 | {{- include "keda.labels" . | indent 4 }} 16 | spec: 17 | endpointSelector: 18 | matchLabels: 19 | app: {{ .Values.webhooks.name }} 20 | egress: 21 | - toEntities: 22 | - kube-apiserver 23 | - cluster 24 | ingress: 25 | - fromEntities: 26 | - cluster 27 | {{ end }} 28 | -------------------------------------------------------------------------------- /keda/templates/webhooks/clusterrole.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.rbac.create }} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRole 4 | metadata: 5 | {{- with .Values.additionalAnnotations }} 6 | annotations: 7 | {{- toYaml . | nindent 4 }} 8 | {{- end }} 9 | labels: 10 | app.kubernetes.io/name: {{ .Values.operator.name }}-webhook 11 | {{- include "keda.labels" . | indent 4 }} 12 | name: {{ .Values.operator.name }}-webhook 13 | rules: 14 | - apiGroups: 15 | - autoscaling 16 | resources: 17 | - horizontalpodautoscalers 18 | verbs: 19 | - list 20 | - watch 21 | - apiGroups: 22 | - keda.sh 23 | resources: 24 | - scaledobjects 25 | verbs: 26 | - list 27 | - watch 28 | - apiGroups: 29 | - apps 30 | resources: 31 | - deployments 32 | - statefulsets 33 | verbs: 34 | - get 35 | - list 36 | - watch 37 | - apiGroups: 38 | - "" 39 | resources: 40 | - limitranges 41 | verbs: 42 | - list 43 | {{- end -}} 44 | -------------------------------------------------------------------------------- /keda/templates/webhooks/clusterrolebindings.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.rbac.create }} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRoleBinding 4 | metadata: 5 | {{- with .Values.additionalAnnotations }} 6 | annotations: 7 | {{- toYaml . | nindent 4 }} 8 | {{- end }} 9 | labels: 10 | app.kubernetes.io/name: {{ .Values.operator.name }}-webhook 11 | {{- include "keda.labels" . | indent 4 }} 12 | name: {{ .Values.operator.name }}-webhook 13 | roleRef: 14 | apiGroup: rbac.authorization.k8s.io 15 | kind: ClusterRole 16 | name: {{ .Values.operator.name }}-webhook 17 | subjects: 18 | - kind: ServiceAccount 19 | name: {{ (.Values.serviceAccount.webhooks).name | default .Values.serviceAccount.name }} 20 | namespace: {{ .Release.Namespace }} 21 | {{- end }} 22 | -------------------------------------------------------------------------------- /keda/templates/webhooks/deployment.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.webhooks.enabled }} 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: {{ .Values.webhooks.name }} 6 | namespace: {{ .Release.Namespace }} 7 | {{- with .Values.additionalAnnotations }} 8 | annotations: 9 | {{- toYaml . | nindent 4 }} 10 | {{- end }} 11 | labels: 12 | app: {{ .Values.webhooks.name }} 13 | name: {{ .Values.webhooks.name }} 14 | app.kubernetes.io/name: {{ .Values.webhooks.name }} 15 | {{- include "keda.labels" . | indent 4 }} 16 | spec: 17 | revisionHistoryLimit: {{ .Values.webhooks.revisionHistoryLimit}} 18 | replicas: {{ .Values.webhooks.replicaCount}} 19 | {{- with .Values.upgradeStrategy.webhooks }} 20 | strategy: 21 | {{- toYaml . | nindent 4 }} 22 | {{- end }} 23 | selector: 24 | matchLabels: 25 | app: {{ .Values.webhooks.name }} 26 | template: 27 | metadata: 28 | labels: 29 | app: {{ .Values.webhooks.name }} 30 | name: {{ .Values.webhooks.name }} 31 | app.kubernetes.io/name: {{ .Values.webhooks.name }} 32 | {{- include "keda.labels" . | indent 8 }} 33 | {{- if .Values.podLabels.webhooks }} 34 | {{- toYaml .Values.podLabels.webhooks | nindent 8 }} 35 | {{- end }} 36 | {{- if or .Values.podAnnotations.webhooks .Values.additionalAnnotations }} 37 | annotations: 38 | {{- if .Values.podAnnotations.webhooks }} 39 | {{- toYaml .Values.podAnnotations.webhooks | nindent 8 }} 40 | {{- end }} 41 | {{- if .Values.additionalAnnotations }} 42 | {{- toYaml .Values.additionalAnnotations | nindent 8 }} 43 | {{- end }} 44 | {{- end }} 45 | spec: 46 | enableServiceLinks: {{ .Values.enableServiceLinks }} 47 | {{- if .Values.priorityClassName }} 48 | priorityClassName: {{ .Values.priorityClassName | quote }} 49 | {{- end }} 50 | {{- with .Values.imagePullSecrets }} 51 | imagePullSecrets: 52 | {{- toYaml . | nindent 8 }} 53 | {{- end }} 54 | serviceAccountName: {{ (.Values.serviceAccount.webhooks).name | default .Values.serviceAccount.name }} 55 | automountServiceAccountToken: {{ kindIs "invalid" (.Values.serviceAccount.webhooks).automountServiceAccountToken | ternary .Values.serviceAccount.automountServiceAccountToken (.Values.serviceAccount.webhooks).automountServiceAccountToken }} 56 | securityContext: 57 | {{- if .Values.podSecurityContext.webhooks }} 58 | {{- toYaml .Values.podSecurityContext.webhooks | nindent 8 }} 59 | {{- else }} 60 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 61 | {{- end }} 62 | containers: 63 | - name: {{ .Values.webhooks.name }} 64 | securityContext: 65 | {{- if .Values.securityContext.webhooks }} 66 | {{- toYaml .Values.securityContext.webhooks | nindent 12 }} 67 | {{- else }} 68 | {{- toYaml .Values.securityContext | nindent 12 }} 69 | {{- end }} 70 | {{- $registry := .Values.global.image.registry | default .Values.image.webhooks.registry | default "" }} 71 | {{- if $registry }} 72 | image: "{{ $registry }}/{{ .Values.image.webhooks.repository }}:{{ .Values.image.webhooks.tag | default .Chart.AppVersion }}" 73 | {{- else }} 74 | image: "{{ .Values.image.webhooks.repository }}:{{ .Values.image.webhooks.tag | default .Chart.AppVersion }}" 75 | {{- end }} 76 | command: 77 | - /keda-admission-webhooks 78 | args: 79 | - "--zap-log-level={{ .Values.logging.webhooks.level }}" 80 | - "--zap-encoder={{ .Values.logging.webhooks.format }}" 81 | - "--zap-time-encoding={{ .Values.logging.webhooks.timeEncoding }}" 82 | - "--cert-dir={{ .Values.certificates.mountPath }}" 83 | - "--health-probe-bind-address=:{{ .Values.webhooks.healthProbePort }}" 84 | {{- if .Values.webhooks.port }} 85 | - "--port={{ .Values.webhooks.port }}" 86 | {{- end }} 87 | - --metrics-bind-address=:{{ .Values.prometheus.webhooks.port }} 88 | {{- if .Values.profiling.webhooks.enabled }} 89 | - "--profiling-bind-address=:{{ .Values.profiling.webhooks.port }}" 90 | {{- end }} 91 | {{- range $key, $value := .Values.extraArgs.webhooks }} 92 | - --{{ $key }}={{ $value }} 93 | {{- end }} 94 | imagePullPolicy: {{ .Values.image.pullPolicy }} 95 | livenessProbe: 96 | httpGet: 97 | path: /healthz 98 | port: {{ .Values.webhooks.healthProbePort }} 99 | initialDelaySeconds: {{ .Values.webhooks.livenessProbe.initialDelaySeconds }} 100 | periodSeconds: {{ .Values.webhooks.livenessProbe.periodSeconds }} 101 | timeoutSeconds: {{ .Values.webhooks.livenessProbe.timeoutSeconds }} 102 | failureThreshold: {{ .Values.webhooks.livenessProbe.failureThreshold }} 103 | successThreshold: {{ .Values.webhooks.livenessProbe.successThreshold }} 104 | readinessProbe: 105 | httpGet: 106 | path: /readyz 107 | port: {{ .Values.webhooks.healthProbePort }} 108 | initialDelaySeconds: {{ .Values.webhooks.readinessProbe.initialDelaySeconds }} 109 | periodSeconds: {{ .Values.webhooks.readinessProbe.periodSeconds }} 110 | timeoutSeconds: {{ .Values.webhooks.readinessProbe.timeoutSeconds }} 111 | failureThreshold: {{ .Values.webhooks.readinessProbe.failureThreshold }} 112 | successThreshold: {{ .Values.webhooks.readinessProbe.successThreshold }} 113 | ports: 114 | - containerPort: {{ .Values.webhooks.port | default 9443 }} 115 | name: http 116 | protocol: TCP 117 | {{- if .Values.prometheus.webhooks.enabled }} 118 | - containerPort: {{ .Values.prometheus.webhooks.port }} 119 | name: metrics 120 | protocol: TCP 121 | {{- end }} 122 | env: 123 | - name: WATCH_NAMESPACE 124 | value: {{ .Values.watchNamespace | quote }} 125 | - name: POD_NAME 126 | valueFrom: 127 | fieldRef: 128 | fieldPath: metadata.name 129 | - name: POD_NAMESPACE 130 | valueFrom: 131 | fieldRef: 132 | fieldPath: metadata.namespace 133 | {{- if .Values.env }} 134 | {{- toYaml .Values.env | nindent 12 -}} 135 | {{- end }} 136 | volumeMounts: 137 | - mountPath: {{ .Values.certificates.mountPath }} 138 | name: certificates 139 | readOnly: true 140 | {{- if .Values.volumes.webhooks.extraVolumeMounts }} 141 | {{- toYaml .Values.volumes.webhooks.extraVolumeMounts | nindent 10 }} 142 | {{- end }} 143 | resources: 144 | {{- if .Values.resources.webhooks }} 145 | {{- toYaml .Values.resources.webhooks | nindent 12 }} 146 | {{- else }} 147 | {{- toYaml .Values.resources | nindent 12 }} 148 | {{- end }} 149 | volumes: 150 | - name: certificates 151 | secret: 152 | defaultMode: 420 153 | secretName: {{ .Values.certificates.secretName }} 154 | {{- if .Values.volumes.webhooks.extraVolumes }} 155 | {{- toYaml .Values.volumes.webhooks.extraVolumes | nindent 6 }} 156 | {{- end }} 157 | hostNetwork: {{ .Values.webhooks.useHostNetwork }} 158 | nodeSelector: 159 | kubernetes.io/os: linux 160 | {{- with .Values.nodeSelector }} 161 | {{- toYaml . | nindent 8 }} 162 | {{- end }} 163 | {{- if .Values.webhooks.affinity }} 164 | affinity: 165 | {{- toYaml .Values.webhooks.affinity | nindent 8 }} 166 | {{- else if .Values.affinity }} 167 | affinity: 168 | {{- toYaml .Values.affinity | nindent 8 }} 169 | {{- end }} 170 | {{- with .Values.topologySpreadConstraints.webhooks }} 171 | topologySpreadConstraints: 172 | {{- toYaml . | nindent 8 }} 173 | {{- end }} 174 | {{- with .Values.tolerations }} 175 | tolerations: 176 | {{- toYaml . | nindent 8 }} 177 | {{- end }} 178 | {{- end }} 179 | -------------------------------------------------------------------------------- /keda/templates/webhooks/poddisruptionbudget.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.webhooks.enabled }} 2 | {{- if or (or .Values.podDisruptionBudget.minAvailable .Values.podDisruptionBudget.maxUnavailable) .Values.podDisruptionBudget.webhooks }} 3 | apiVersion: policy/v1 4 | kind: PodDisruptionBudget 5 | metadata: 6 | namespace: {{ .Release.Namespace }} 7 | name: {{ .Values.webhooks.name }} 8 | {{- with .Values.additionalAnnotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | labels: 13 | app.kubernetes.io/name: {{ .Values.webhooks.name }} 14 | {{- include "keda.labels" . | indent 4 }} 15 | spec: 16 | {{- if .Values.podDisruptionBudget.minAvailable }} 17 | minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} 18 | {{- end }} 19 | {{- if .Values.podDisruptionBudget.maxUnavailable }} 20 | maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} 21 | {{- end }} 22 | {{- if .Values.podDisruptionBudget.webhooks }} 23 | {{- if .Values.podDisruptionBudget.webhooks.minAvailable }} 24 | minAvailable: {{ .Values.podDisruptionBudget.webhooks.minAvailable }} 25 | {{- end }} 26 | {{- if .Values.podDisruptionBudget.webhooks.maxUnavailable }} 27 | maxUnavailable: {{ .Values.podDisruptionBudget.webhooks.maxUnavailable }} 28 | {{- end }} 29 | {{- end }} 30 | selector: 31 | matchLabels: 32 | app: {{ .Values.webhooks.name }} 33 | {{- end }} 34 | {{- end }} -------------------------------------------------------------------------------- /keda/templates/webhooks/prometheusrules.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.webhooks.enabled }} 2 | {{- if and .Values.prometheus.webhooks.enabled .Values.prometheus.webhooks.prometheusRules.enabled }} 3 | apiVersion: monitoring.coreos.com/v1 4 | kind: PrometheusRule 5 | metadata: 6 | name: {{ .Values.webhooks.name }} 7 | {{- with .Values.additionalAnnotations }} 8 | annotations: 9 | {{- toYaml . | nindent 4 }} 10 | {{- end }} 11 | labels: 12 | app.kubernetes.io/name: {{ .Values.webhooks.name }} 13 | {{- include "keda.labels" . | indent 4 }} 14 | {{- range $key, $value := .Values.prometheus.webhooks.prometheusRules.additionalLabels }} 15 | {{ $key }}: {{ $value | quote }} 16 | {{- end }} 17 | {{- with .Values.prometheus.webhooks.prometheusRules.namespace }} 18 | namespace: {{ . }} 19 | {{- end }} 20 | spec: 21 | groups: 22 | - name: {{ .Values.webhooks.name }} 23 | rules: 24 | {{ toYaml .Values.prometheus.webhooks.prometheusRules.alerts | indent 6 }} 25 | {{- end }} 26 | {{- end }} -------------------------------------------------------------------------------- /keda/templates/webhooks/service.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.webhooks.enabled }} 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | {{- if or .Values.prometheus.webhooks.enabled .Values.additionalAnnotations .Values.service.annotations }} 6 | annotations: 7 | {{- if and .Values.prometheus.webhooks.enabled ( not .Values.prometheus.webhooks.serviceMonitor.enabled ) }} 8 | prometheus.io/scrape: "true" 9 | prometheus.io/port: {{ .Values.prometheus.webhooks.port | quote }} 10 | prometheus.io/path: "/metrics" 11 | {{- end }} 12 | {{- with .Values.additionalAnnotations }} 13 | {{- range $key, $value := . }} 14 | {{ $key }}: {{ $value | quote }} 15 | {{- end }} 16 | {{- end }} 17 | {{- with .Values.service.annotations }} 18 | {{- range $key, $value := . }} 19 | {{ $key }}: {{ $value | quote }} 20 | {{- end }} 21 | {{- end }} 22 | {{- end }} 23 | labels: 24 | app.kubernetes.io/name: {{ .Values.webhooks.name }} 25 | {{- include "keda.labels" . | indent 4 }} 26 | name: {{ .Values.webhooks.name }} 27 | namespace: {{ .Release.Namespace }} 28 | spec: 29 | ports: 30 | - name: https 31 | port: 443 32 | protocol: TCP 33 | targetPort: {{ .Values.webhooks.port | default 9443 }} 34 | appProtocol: https 35 | {{- if .Values.prometheus.webhooks.enabled }} 36 | - name: {{ .Values.prometheus.webhooks.serviceMonitor.port }} 37 | port: {{ .Values.prometheus.webhooks.port }} 38 | targetPort: {{ .Values.prometheus.webhooks.port }} 39 | {{- with .Values.prometheus.webhooks.appProtocol }} 40 | appProtocol: {{ . }} 41 | {{- end }} 42 | {{- end }} 43 | {{- if .Values.profiling.webhooks.enabled }} 44 | - name: profiling 45 | port: {{ .Values.profiling.webhooks.port }} 46 | targetPort: {{ .Values.profiling.webhooks.port }} 47 | {{- end }} 48 | selector: 49 | app: {{ .Values.webhooks.name }} 50 | {{- end }} 51 | -------------------------------------------------------------------------------- /keda/templates/webhooks/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if (.Values.serviceAccount.webhooks).create | default .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | labels: 6 | app.kubernetes.io/name: {{ (.Values.serviceAccount.webhooks).name | default .Values.serviceAccount.name }} 7 | {{- include "keda.labels" . | nindent 4 }} 8 | annotations: 9 | {{- if .Values.additionalAnnotations }} 10 | {{- toYaml .Values.additionalAnnotations | nindent 4 }} 11 | {{- end }} 12 | {{- if (.Values.serviceAccount.webhooks).annotations | default .Values.serviceAccount.annotations }} 13 | {{- toYaml ((.Values.serviceAccount.webhooks).annotations | default .Values.serviceAccount.annotations) | nindent 4}} 14 | {{- end }} 15 | name: {{ (.Values.serviceAccount.webhooks).name | default .Values.serviceAccount.name }} 16 | namespace: {{ .Release.Namespace }} 17 | automountServiceAccountToken: {{ kindIs "invalid" (.Values.serviceAccount.webhooks).automountServiceAccountToken | ternary .Values.serviceAccount.automountServiceAccountToken (.Values.serviceAccount.webhooks).automountServiceAccountToken }} 18 | {{- end -}} 19 | -------------------------------------------------------------------------------- /keda/templates/webhooks/servicemonitor.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.webhooks.enabled }} 2 | {{- if and .Values.prometheus.webhooks.enabled .Values.prometheus.webhooks.serviceMonitor.enabled }} 3 | apiVersion: monitoring.coreos.com/v1 4 | kind: ServiceMonitor 5 | metadata: 6 | name: {{ .Values.webhooks.name }} 7 | {{- with .Values.additionalAnnotations }} 8 | annotations: 9 | {{- toYaml . | nindent 4 }} 10 | {{- end }} 11 | labels: 12 | app.kubernetes.io/name: {{ .Values.webhooks.name }} 13 | {{- include "keda.labels" . | indent 4 }} 14 | {{- range $key, $value := .Values.prometheus.webhooks.serviceMonitor.additionalLabels }} 15 | {{ $key }}: {{ $value | quote }} 16 | {{- end }} 17 | {{- with .Values.prometheus.webhooks.serviceMonitor.namespace }} 18 | namespace: {{ . }} 19 | {{- end }} 20 | spec: 21 | {{- with .Values.prometheus.webhooks.serviceMonitor.jobLabel }} 22 | jobLabel: {{ . }} 23 | {{- end }} 24 | {{- with .Values.prometheus.webhooks.serviceMonitor.targetLabels }} 25 | targetLabels: 26 | {{- toYaml . | nindent 4 }} 27 | {{- end }} 28 | {{- with .Values.prometheus.webhooks.serviceMonitor.podTargetLabels }} 29 | podTargetLabels: 30 | {{- toYaml . | nindent 4 }} 31 | {{- end }} 32 | endpoints: 33 | - port: {{ .Values.prometheus.webhooks.serviceMonitor.port }} 34 | {{- with .Values.prometheus.webhooks.serviceMonitor.targetPort }} 35 | targetPort: {{ . }} 36 | {{- end }} 37 | path: /metrics 38 | {{- with .Values.prometheus.webhooks.serviceMonitor.interval }} 39 | interval: {{ . }} 40 | {{- end }} 41 | {{- with .Values.prometheus.webhooks.serviceMonitor.scrapeTimeout }} 42 | scrapeTimeout: {{ . }} 43 | {{- end }} 44 | {{- if .Values.prometheus.webhooks.serviceMonitor.relabelings}} 45 | {{- with .Values.prometheus.webhooks.serviceMonitor.relabelings }} 46 | relabelings: 47 | {{- toYaml . | nindent 6 }} 48 | {{- end }} 49 | {{- else }} 50 | {{- with .Values.prometheus.webhooks.serviceMonitor.relabellings }} 51 | relabelings: 52 | {{- toYaml . | nindent 6 }} 53 | {{- end }} 54 | {{- end}} 55 | {{- with .Values.prometheus.webhooks.serviceMonitor.metricRelabelings }} 56 | metricRelabelings: 57 | {{- toYaml . | nindent 6 }} 58 | {{- end }} 59 | scheme: {{ .Values.prometheus.webhooks.serviceMonitor.scheme }} 60 | {{- with .Values.prometheus.webhooks.serviceMonitor.tlsConfig }} 61 | tlsConfig: 62 | {{ toYaml . | nindent 6}} 63 | {{- end }} 64 | namespaceSelector: 65 | matchNames: 66 | - {{ .Release.Namespace }} 67 | selector: 68 | matchLabels: 69 | app.kubernetes.io/name: {{ .Values.webhooks.name }} 70 | {{- end }} 71 | {{- end }} 72 | -------------------------------------------------------------------------------- /keda/templates/webhooks/validatingconfiguration.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.webhooks.enabled }} 2 | apiVersion: admissionregistration.k8s.io/v1 3 | kind: ValidatingWebhookConfiguration 4 | metadata: 5 | {{- if or .Values.certificates.certManager.enabled .Values.additionalAnnotations }} 6 | annotations: 7 | {{- if .Values.certificates.certManager.enabled }} 8 | {{- if and (not .Values.certificates.certManager.generateCA) .Values.certificates.certManager.issuer.generate }} 9 | cert-manager.io/inject-ca-from-secret: {{ .Release.Namespace }}/{{ .Values.certificates.certManager.caSecretName }} 10 | {{- else }} 11 | cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ .Values.operator.name }}-tls-certificates 12 | {{- end }} 13 | {{- end }} 14 | {{- if .Values.additionalAnnotations }} 15 | {{- toYaml .Values.additionalAnnotations | nindent 4 }} 16 | {{- end }} 17 | {{- end }} 18 | labels: 19 | app.kubernetes.io/name: {{ .Values.webhooks.name }} 20 | {{- include "keda.labels" . | indent 4 }} 21 | name: keda-admission 22 | webhooks: 23 | - admissionReviewVersions: 24 | - v1 25 | clientConfig: 26 | service: 27 | name: {{ .Values.webhooks.name }} 28 | namespace: {{ .Release.Namespace }} 29 | path: /validate-keda-sh-v1alpha1-scaledobject 30 | failurePolicy: {{ .Values.webhooks.failurePolicy }} 31 | matchPolicy: Equivalent 32 | name: vscaledobject.kb.io 33 | namespaceSelector: {} 34 | objectSelector: {} 35 | rules: 36 | - apiGroups: 37 | - keda.sh 38 | apiVersions: 39 | - v1alpha1 40 | operations: 41 | - CREATE 42 | - UPDATE 43 | resources: 44 | - scaledobjects 45 | sideEffects: None 46 | timeoutSeconds: {{ .Values.webhooks.timeoutSeconds | default 10 }} 47 | - admissionReviewVersions: 48 | - v1 49 | clientConfig: 50 | service: 51 | name: {{ .Values.webhooks.name }} 52 | namespace: {{ .Release.Namespace }} 53 | path: /validate-keda-sh-v1alpha1-triggerauthentication 54 | failurePolicy: {{ .Values.webhooks.failurePolicy }} 55 | matchPolicy: Equivalent 56 | name: vstriggerauthentication.kb.io 57 | namespaceSelector: {} 58 | objectSelector: {} 59 | rules: 60 | - apiGroups: 61 | - keda.sh 62 | apiVersions: 63 | - v1alpha1 64 | operations: 65 | - CREATE 66 | - UPDATE 67 | resources: 68 | - triggerauthentications 69 | sideEffects: None 70 | timeoutSeconds: {{ .Values.webhooks.timeoutSeconds | default 10 }} 71 | - admissionReviewVersions: 72 | - v1 73 | clientConfig: 74 | service: 75 | name: {{ .Values.webhooks.name }} 76 | namespace: {{ .Release.Namespace }} 77 | path: /validate-keda-sh-v1alpha1-clustertriggerauthentication 78 | failurePolicy: {{ .Values.webhooks.failurePolicy }} 79 | matchPolicy: Equivalent 80 | name: vsclustertriggerauthentication.kb.io 81 | namespaceSelector: {} 82 | objectSelector: {} 83 | rules: 84 | - apiGroups: 85 | - keda.sh 86 | apiVersions: 87 | - v1alpha1 88 | operations: 89 | - CREATE 90 | - UPDATE 91 | resources: 92 | - clustertriggerauthentications 93 | sideEffects: None 94 | timeoutSeconds: {{ .Values.webhooks.timeoutSeconds | default 10 }} 95 | {{- end }} 96 | -------------------------------------------------------------------------------- /samples/nginx-scaledobject.yml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | labels: 5 | app: nginx 6 | name: nginx 7 | spec: 8 | replicas: 1 9 | selector: 10 | matchLabels: 11 | app: nginx 12 | strategy: {} 13 | template: 14 | metadata: 15 | labels: 16 | app: nginx 17 | spec: 18 | containers: 19 | - image: nginx 20 | name: nginx 21 | resources: 22 | requests: 23 | memory: "64Mi" 24 | cpu: "25m" 25 | limits: 26 | memory: "128Mi" 27 | cpu: "50m" 28 | --- 29 | apiVersion: keda.sh/v1alpha1 30 | kind: ScaledObject 31 | metadata: 32 | name: nginx-autoscaling 33 | spec: 34 | scaleTargetRef: 35 | name: nginx 36 | minReplicaCount: 1 37 | maxReplicaCount: 5 38 | triggers: 39 | - type: cpu 40 | metricType: Utilization 41 | metadata: 42 | value: "70" --------------------------------------------------------------------------------