knative-extensions / autoscaler-keda

Keda based Knative HPA Autoscaler
Apache License 2.0
2 stars 5 forks source link

Service and documentation for istio (mesh mode) #83

Open muscionig opened 6 days ago

muscionig commented 6 days ago

closes #56

Changes

This PR adds documentation to run the autoscaler-keda extension with Istio injection. @skonto I opened this on top of #81, that is why the set of changes is larger. Feel free to directly review only this PR.

Minor Changes

istio:

before scaling:

$ kubectl get po -A
NAMESPACE            NAME                                                     READY   STATUS    RESTARTS      AGE
cert-manager         cert-manager-67c98b89c8-gxvtb                            1/1     Running   0             35m
cert-manager         cert-manager-cainjector-5c5695d979-s6jbj                 1/1     Running   0             35m
cert-manager         cert-manager-webhook-7f9f8648b9-zd6jj                    1/1     Running   0             35m
istio-system         istio-ingressgateway-5f8bcfbff9-5cq27                    1/1     Running   0             34m
istio-system         istio-ingressgateway-5f8bcfbff9-lpcpv                    1/1     Running   0             34m
istio-system         istio-ingressgateway-5f8bcfbff9-wh486                    1/1     Running   0             34m
istio-system         istiod-85877f7d98-9gjr9                                  1/1     Running   0             34m
istio-system         istiod-85877f7d98-b87bg                                  1/1     Running   0             34m
istio-system         istiod-85877f7d98-cvchw                                  1/1     Running   0             34m
keda                 keda-admission-webhooks-685d94fcff-kjvlw                 1/1     Running   0             24m
keda                 keda-operator-65f5568c7b-9kbc8                           1/1     Running   1 (24m ago)   24m
keda                 keda-operator-metrics-apiserver-69c577c9cf-qxxhx         1/1     Running   0             24m
knative-serving      activator-5754bdb79d-9gpn5                               2/2     Running   0             34m
knative-serving      autoscaler-57d66f69d9-cmv6j                              2/2     Running   0             34m
knative-serving      autoscaler-keda-fc6b797b4-lvmss                          2/2     Running   0             21m
knative-serving      controller-f48959855-lhrwz                               2/2     Running   1 (34m ago)   34m
knative-serving      net-istio-controller-69858b66f7-qfnq8                    1/1     Running   0             34m
knative-serving      net-istio-webhook-5645569675-jvj2r                       2/2     Running   0             34m
knative-serving      webhook-778946f8-ftjps                                   2/2     Running   0             34m
kube-system          coredns-5dd5756b68-d92j4                                 1/1     Running   0             36m
kube-system          etcd-minikube                                            1/1     Running   0             36m
kube-system          kube-apiserver-minikube                                  1/1     Running   0             36m
kube-system          kube-controller-manager-minikube                         1/1     Running   0             36m
kube-system          kube-proxy-dczz8                                         1/1     Running   0             36m
kube-system          kube-scheduler-minikube                                  1/1     Running   0             36m
kube-system          storage-provisioner                                      1/1     Running   1 (36m ago)   36m
metrics-test-istio   metrics-test-istio-00001-deployment-7d57bbb8d8-86zsg     3/3     Running   0             14m
prometheus           alertmanager-prometheus-kube-prometheus-alertmanager-0   2/2     Running   0             24m
prometheus           prometheus-grafana-69f9ccfd8d-72xb8                      3/3     Running   0             25m
prometheus           prometheus-kube-prometheus-operator-6f4fc4dcbd-2hzqm     1/1     Running   0             25m
prometheus           prometheus-kube-state-metrics-57c8464f66-7h25x           1/1     Running   0             25m
prometheus           prometheus-prometheus-kube-prometheus-prometheus-0       2/2     Running   0             24m
prometheus           prometheus-prometheus-node-exporter-h7gp6                1/1     Running   0             25m

During scaling:

$ kubectl get hpa -n metrics-test-istio
NAME                       REFERENCE                                        TARGETS           MINPODS   MAXPODS   REPLICAS   AGE
metrics-test-istio-00001   Deployment/metrics-test-istio-00001-deployment   105370m/5 (avg)   1         10        1          15m
$ kubectl get po -n metrics-test-istio
NAME                                                   READY   STATUS    RESTARTS   AGE
metrics-test-istio-00001-deployment-7d57bbb8d8-2b7ss   3/3     Running   0          69s
metrics-test-istio-00001-deployment-7d57bbb8d8-2frvl   3/3     Running   0          54s
metrics-test-istio-00001-deployment-7d57bbb8d8-7wn9b   3/3     Running   0          54s
metrics-test-istio-00001-deployment-7d57bbb8d8-86zsg   3/3     Running   0          16m
metrics-test-istio-00001-deployment-7d57bbb8d8-bpbt4   3/3     Running   0          54s
metrics-test-istio-00001-deployment-7d57bbb8d8-fz7qs   3/3     Running   0          39s
metrics-test-istio-00001-deployment-7d57bbb8d8-gx5sb   3/3     Running   0          69s
metrics-test-istio-00001-deployment-7d57bbb8d8-l4ght   3/3     Running   0          54s
metrics-test-istio-00001-deployment-7d57bbb8d8-qdp5j   3/3     Running   0          69s
metrics-test-istio-00001-deployment-7d57bbb8d8-s848s   0/3     Pending   0          39s

/kind documentation /kind enhancement

knative-prow[bot] commented 6 days ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: muscionig Once this PR has been reviewed and has the lgtm label, please assign skonto for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/knative-extensions/autoscaler-keda/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
knative-prow[bot] commented 6 days ago

Hi @muscionig. Thanks for your PR.

I'm waiting for a knative-extensions member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
skonto commented 3 days ago

I will open another issue for documenting Openshift ServiceMesh.