knative-extensions / kn-plugin-quickstart

Kn plugin for installation of Knative cluster for developers to quickstart.
Apache License 2.0
24 stars 37 forks source link

Should we offer a flag to select to do serving or eventing #224

Closed csantanapr closed 2 years ago

csantanapr commented 2 years ago

I was giving a demo today, and I wanted to to setup an environment only fo serving, and use the smallest resources possible.

Something like

kn quickstart kind --serving
or
kn quickstart kind --eventing
psschwei commented 2 years ago

Would we want those flags to be exclusive (i.e. maybe --serving-only or --eventing-only)? Or would we want to allow someone to do kn quickstart kind --serving --eventing (which would be redundant but still do a full install)?

I think I like the former a tiny bit better because it looks a little cleaner / more explicit about what it's doing, but I don't really feel strongly either way.

mapleeit commented 2 years ago

Need this feature heavily since I want to run Knative in GitHub Actions default runners, which only offers 2 cpu.

And the whole thing already take 1.98 cpu. So I want to only install one of serving or eventing to save some resources.

Namespace                   Name                                       CPU Requests  CPU Limits  Memory Requests  Memory Limits  Age
  ---------                   ----                                       ------------  ----------  ---------------  -------------  ---
  knative-eventing            eventing-controller-59475d565c-r8l5v       100m (5%)     0 (0%)      100Mi (1%)       0 (0%)         3m8s
  knative-eventing            eventing-webhook-74cbb75cb-2c2tx           100m (5%)     200m (10%)  50Mi (0%)        200Mi (2%)     3m8s
  knative-eventing            imc-controller-84c7f75c67-s4fl7            0 (0%)        0 (0%)      0 (0%)           0 (0%)         3m2s
  knative-eventing            imc-dispatcher-[778](https://github.com/jina-ai/hubble/runs/5802901077?check_suite_focus=true#step:12:778)6967556-l6s45            0 (0%)        0 (0%)      0 (0%)           0 (0%)         3m2s
  knative-eventing            mt-broker-controller-65bb965bf9-x5fct      100m (5%)     0 (0%)      100Mi (1%)       0 (0%)         2m55s
  knative-eventing            mt-broker-filter-8496c9765-x6kh2           100m (5%)     0 (0%)      100Mi (1%)       0 (0%)         2m55s
  knative-eventing            mt-broker-ingress-6[795](https://github.com/jina-ai/hubble/runs/5802901077?check_suite_focus=true#step:12:795)9dc68f-bjh7n         100m (5%)     0 (0%)      100Mi (1%)       0 (0%)         2m55s
  knative-serving             activator-855fbdfd77-bbclp                 300m (15%)    1 (50%)     60Mi (0%)        600Mi (8%)     3m46s
  knative-serving             autoscaler-85748d9cf4-bgqhs                100m (5%)     1 (50%)     100Mi (1%)       1000Mi (14%)   3m45s
  knative-serving             controller-798994c5bd-2kwr5                100m (5%)     1 (50%)     100Mi (1%)       1000Mi (14%)   3m45s
  knative-serving             domain-mapping-59fdc67c94-p5rrd            30m (1%)      300m (15%)  40Mi (0%)        400Mi (5%)     3m45s
  knative-serving             domainmapping-webhook-6df595d448-rkmt7     100m (5%)     500m (25%)  100Mi (1%)       500Mi (7%)     3m45s
  knative-serving             net-kourier-controller-74dc74[797](https://github.com/jina-ai/hubble/runs/5802901077?check_suite_focus=true#step:12:797)-cgzdp     0 (0%)        0 (0%)      0 (0%)           0 (0%)         3m34s
  knative-serving             webhook-69fdbbf67d-qmz5z                   100m (5%)     500m (25%)  100Mi (1%)       500Mi (7%)     3m45s
  kourier-system              3scale-kourier-gateway-75c75885fd-qs8kd    0 (0%)        0 (0%)      0 (0%)           0 (0%)         3m34s
  kube-system                 coredns-64897985d-nc87v                    100m (5%)     0 (0%)      70Mi (1%)        170Mi (2%)     3m55s
  kube-system                 etcd-knative                               100m (5%)     0 (0%)      100Mi (1%)       0 (0%)         4m6s
  kube-system                 kube-apiserver-knative                     250m (12%)    0 (0%)      0 (0%)           0 (0%)         4m6s
  kube-system                 kube-controller-manager-knative            200m (10%)    0 (0%)      0 (0%)           0 (0%)         4m6s
  kube-system                 kube-proxy-w7bdz                           0 (0%)        0 (0%)      0 (0%)           0 (0%)         3m55s
  kube-system                 kube-scheduler-knative                     100m (5%)     0 (0%)      0 (0%)           0 (0%)         4m6s
  kube-system                 storage-provisioner                        0 (0%)        0 (0%)      0 (0%)           0 (0%)         3m53s
Allocated resources:
  (Total limits may be over 100 percent, i.e., overcommitted.)
  Resource           Requests      Limits
  --------           --------      ------
  cpu                1980m (99%)   4500m (225%)
  memory             1120Mi (16%)  4370Mi (62%)
  ephemeral-storage  0 (0%)        0 (0%)
  hugepages-1Gi      0 (0%)        0 (0%)
  hugepages-2Mi      0 (0%)        0 (0%)
mapleeit commented 2 years ago

I'm happy to raise a PR if you want. I suppose it's easy.

csantanapr commented 2 years ago

Good point @psschwei I was thinking

kn quickstart <kind | minikube> (installs both, today's behavior) kn quickstart --serving (serving only) kn quickstart --eventing (eventing only) kn quickstart --serving --eventing (both)

mapleeit commented 2 years ago

Can we have a new release which contains this feature?

psschwei commented 2 years ago

1.5 is scheduled to be cut tomorrow