sideshowbandana / k8s-sqs-autoscaler

Kubernetes pod autoscaler based on queue size in AWS SQS
71 stars 27 forks source link

add --kubernetes-deployment-selector option #5

Open danmaas opened 6 years ago

danmaas commented 6 years ago

The current code assumes that the Deployment you are controlling has an "app=..." label that exactly matches the Deployment resource name.

In my particular cluster, this is not the case, so we need another way for the list_namespaced_deployment() query to find the deployment.

This option allows you to override the "app=..." label query with an arbitrary label query. e.g. in my case I use --kubernetes-deployment-selector=app.kubernetes.io/component=my-deployment-to-control