knative / operator

Combined operator for Knative.
Apache License 2.0
185 stars 98 forks source link

Allow static replicas of knative-serving workloads to be created #1574

Closed husnialhamdani closed 5 months ago

husnialhamdani commented 11 months ago

Problem Based on https://knative.dev/docs/install/operator/configuring-serving-cr/#override-replicas-labels-and-annotations, there's no way to define a static replicas, in certain case, specifiying static number would be needed.

Exit Criteria Allow user to have a static number of replicas.

houshengbo commented 9 months ago

If you want specify the number of replicas, this is how you can do it

...
  workloads:
  - name: webhook
    replicas: 3

The workloads, you can specify the name of the deployment/daemonset/statefulset, etc. In this example, webhook is the name.

husnialhamdani commented 9 months ago

Still doesn't works, I tried like this. The HPA still there.

apiVersion: operator.knative.dev/v1beta1
kind: KnativeServing
metadata:
  name: knative-serving
  namespace: knative-serving
spec:
  workloads:
   - name: activator
     replicas: 5
   - name: webhook
     replicas: 3
  podDisruptionBudgets:
    - name: activator-pdb
      minAvailable: 1
    - name: webhook-pdb
      minAvailable: 1
github-actions[bot] commented 6 months ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.