Azure / aks-app-routing-operator

Kubernetes operator that implements AKS Application Routing
https://learn.microsoft.com/en-us/azure/aks/app-routing
MIT License
29 stars 20 forks source link

Is there a plan to add the ability to manually adjust the number of replicas on nginx controllers in app-routing-system? #177

Open sohwaje opened 3 months ago

sohwaje commented 3 months ago

I modified the "aks-app-routing-operator" deployment to adjust the number of replica, but it was impossible.

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "1"
  creationTimestamp: "2024-03-12T08:23:16Z"
  generation: 15
  labels:
    app.kubernetes.io/component: ingress-controller
    app.kubernetes.io/managed-by: aks-app-routing-operator
    app.kubernetes.io/name: nginx
  name: nginx
  namespace: app-routing-system
  ownerReferences:
  - apiVersion: approuting.kubernetes.azure.com/v1alpha1
    controller: true
    kind: NginxIngressController
    name: default
    uid: 6ea3e476-059e-44b3-9f8d-86655ee2a5dc
  resourceVersion: "113876214"
  uid: 37ea9332-baaf-47cf-aef4-f69d0ff2abef
spec:
  progressDeadlineSeconds: 600
  replicas: 2     <=============== I want to revise this

Currently, two nging controllers seem to be the default values.

kubectl get po -n app-routing-system
NAME                     READY   STATUS    RESTARTS   AGE
nginx-5d4cbcf56b-nrt46   1/1     Running   0          40h
nginx-5d4cbcf56b-swq58   1/1     Running   0          40h

Is there a plan to add the ability to manually adjust the number of replica on the nginx controller?

MXClyde commented 3 months ago

I have the seem need for a current project. In addition to being able to specify the resource requests on the pods (esp. CPU, which has a rather high default).

OliverMKing commented 3 months ago

Yes, you will be able to adjust the min/max replicas. You will also have a mechanism to adjust how aggressively the HPA scales. Expect this very soon.

I have the seem need for a current project. In addition to being able to specify the resource requests on the pods (esp. CPU, which has a rather high default).

Could you help us understand why you want to tweak the resource requests?

MXClyde commented 3 months ago

Yes, you will be able to adjust the min/max replicas. You will also have a mechanism to adjust how aggressively the HPA. Expect this very soon.

This is great!

Could you help us understand why you want to tweak the resource requests?

We are building an app platform on top of an autoscaling AKS cluster. In it's smallest -most cost-effective- incarnation we like to offer our customers the ability to run an app on a single-node 2-core cluster. Because the hardcoded nginx CPU request is 0.5 core, it is difficult to make our runtime fit in combination with 2 nginx replicas and the standard AKS containers. However on second thought, having the possibility of 1 nginx replica will likely suffice already. I can try that first when it is released.