feat(snc): add serverless profiles for Knative Serving and Eventing#740
feat(snc): add serverless profiles for Knative Serving and Eventing#740jangel97 wants to merge 1 commit intoredhat-developer:mainfrom
Conversation
372fbfb to
a9d5e5b
Compare
TestingAll three profiles were tested on a fresh SNC cluster (OCP 4.21.0, spot instance).
|
a9d5e5b to
c2744a6
Compare
adrianriobo
left a comment
There was a problem hiding this comment.
Eventually I would suggest to create a profiles module inside of target/service/snc/profile and add all of them there...
pkg/provider/aws/action/snc/snc.go
Outdated
| } | ||
| ctx.Export(fmt.Sprintf("%s-%s", *r.prefix, apiSNC.OutputKubeconfig), | ||
| pulumi.ToSecret(kubeconfig)) | ||
| // Write kubeconfig to disk early so it is available even if profile deployment fails |
There was a problem hiding this comment.
This writes the kubeconfig to disk before profile deployment begins. If a profile fails (for example due to an operator timeout), the Pulumi stack returns an error and Results() is never called, so the kubeconfig would otherwise be lost. Writing it early ensures the user can still access the cluster to debug the failure.
There was a problem hiding this comment.
There is some logic when flag --disable-readiness is used, can not be reused?
There was a problem hiding this comment.
Good point, just removed the early write. Profile failure is now non-fatal (logged as a warning), so the stack completes and kubeconfig gets written through the existing Results() path, same as with --disable-readiness.
e0e099b to
79b3af7
Compare
Add three serverless profiles: - serverless-serving: installs OpenShift Serverless operator and KnativeServing - serverless-eventing: installs OpenShift Serverless operator and KnativeEventing - serverless: installs OpenShift Serverless operator with both KnativeServing and KnativeEventing Extract shared deployServerlessOperator helper so the operator is installed once and reused across profiles. Move all profile code into a dedicated profile subpackage (pkg/target/service/snc/profile/) for better modularity.
79b3af7 to
138d3c4
Compare
Add three serverless profiles: