-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[installer] Add serviceAnnotations
config to proxy
#9773
Conversation
Allow the annotations on the service to be added to by specifying them in the experimental config.
Ensure that any annotations specified in the experimental config are present on the rendered Service.
@Pothulapati, just out of curiosity: Would these be the annotations we would need for the AWS/EKS load balancer as well? |
service.Annotations["external-dns.alpha.kubernetes.io/hostname"] = fmt.Sprintf("%s,*.%s,*.ws.%s", ctx.Config.Domain, ctx.Config.Domain, ctx.Config.Domain) | ||
service.Annotations["cloud.google.com/neg"] = `{"exposed_ports": {"80":{},"443": {}}}` | ||
|
||
for k, v := range annotations { | ||
service.Annotations[k] = v |
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.
💯
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.
💯 Thx for tests!
require.Len(t, objects, 1, "must render only one object") | ||
|
||
svc := objects[0].(*corev1.Service) | ||
for k, v := range annotations { |
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.
Should be possible to use require.EqualValues(t, annotations, svc.Annotations)
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.
What we are checking here is slightly different; we need to check that the extra annotations are a subset of those on the rendered service. The installer hard-codes a couple of annotations too.
Description
One of the Webapp team's epics for Q2 is to use the Gitpod installer to deploy to Gitpod SaaS. In order to do that we will need to add additional configuration to the installer to make the output suitable for a SaaS deployment as opposed to a self-hosted deployment.
This PR allows for extra annotations to configured on the
proxy
component so that we can configure GCP annotations for Gitpod SaaS.Related Issue(s)
Part of #9097
How to test
Create an installer config file containing this
experimental
section:Get a
versions.yaml
for use with the installer:Then invoke the installer as:
The
Service
resource forproxy
will contain the extra annotation.Release Notes
Documentation
None.