-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[public-api] Ensure no objects are rendered by installer without experimental config #9324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -18,21 +16,6 @@ import ( | |||
) | |||
|
|||
func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { | |||
var experimentalCfg *experimental.Config | |||
|
|||
_ = ctx.WithExperimental(func(ucfg *experimental.Config) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check has been effectively hoisted higher to the Objects function (the main entry point for rendering anything for public-api
). This ensures that future objects are also protected with the same config.
Running the steps to test, I hit:
after step 5. Where is the |
Ah, I've forgotten a step. Set the domain to anything non-empty. The image instructions used to be in the old installer readme, and I got them from Simon over Slack. Will raise a PR to add it to a readme. |
With this config: ...
experimental:
webapp:
publicApi:
enabled: true I see resources (deployments etc) relating to the public API; setting |
Right. Enabled is poorly named, it's more-less so that there is something. For now, we don't parametrize the public API config. To not render it, the I'll raise a follow-up PR to parametrize it, but the existence of the config should in itself indicate it's enabled, so we shouldn't need an extra property down the line. |
/unhold Thanks for the review! |
Description
Ensures that all config related to
public-api
is only rendered when the experimental config is specified. Currently, only thedeployment
resource is conditionally rendered but the ServiceAccount and RoleBinding still get rendered.Before
With this change, this config above is not rendered.
Related Issue(s)
Part of #9229
How to test
cd install/installer
go run main.go init > installer.yaml
docker run -it --rm "eu.gcr.io/gitpod-core-dev/build/versions:main.2872" cat versions.yaml > versions.yaml
public-api
and see no occurencesRelease Notes
Documentation
NONE
/hold