-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Support Ambassador Host resources as sources #1642
Support Ambassador Host resources as sources #1642
Conversation
Welcome @inercia! |
2183db8
to
e091ecc
Compare
f87651d
to
7af7f26
Compare
30b6513
to
dbdb1b2
Compare
dbdb1b2
to
2ddae2a
Compare
2ddae2a
to
abfdb3f
Compare
/assign @njuettner |
abfdb3f
to
a21e8fd
Compare
a21e8fd
to
78e0a5e
Compare
@njuettner, I think that all of your comments have been addressed. I've dealt with the merge conflicts, and I'd like to get this landed. |
@njuettner @Lemmons @hjacobs @Raffo So, what's the path forward here? It would be lovely to get this landed before yet another merge conflict blocks it. 🙂 |
Hey @njuettner just following up again as this unblocks some work for me, is there anything else needed or that I can help with to get this merged and released? |
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.
I added two comments and mostly waiting for @njuettner's stamp. Changes look good to me.
source/ambassador_host.go
Outdated
func parseAmbLoadBalancerService(service string) (namespace, name string, err error) { | ||
parts := strings.Split(service, "/") | ||
if len(parts) == 2 { | ||
namespace, name = parts[0], parts[1] | ||
} else { | ||
parts = strings.Split(service, ".") | ||
if len(parts) == 2 { | ||
name, namespace = parts[0], parts[1] | ||
} else { | ||
namespace, name = api.NamespaceDefault, service | ||
} | ||
} | ||
return | ||
} |
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.
I would prefer if we can avoid using named returns, we try to avoid them where possible.
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.
Done.
continue | ||
} | ||
|
||
targets, err := sc.targetsFromAmbassadorLoadBalancer(ctx, service) |
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.
I'm also not sure if there is anything that can be done to get this. Do you have other suggestions @njuettner ?
This is definitely of interest to my cohorts and I. Any way I can help get this shipped? |
@Raffo @njuettner This is the last thing we need before we can enable our new production pipeline. Is there anything I can do to help this get merged this week? cc: @kflynn |
@njuettner Our team would also love to see this land ASAP. |
@Raffo is there anyone other than @njuettner who can merge this? clearly there's a lot of interest and I can't help but notice that @njuettner really hasn't had any commits since June 2020. (This PR has been open almost 6 months now.) |
@Raffo Related, is there a hard requirement for no named parameters, or would it be OK to land this and then fix that in a followup PR? (I'd prefer to land this one, then do a second one, simply for my own ease of testing.) |
@Raffo Any movement on this? |
I can get this merged, but the fact that we can't address a minor comment is of course a bit of a concern in terms of how we can keep this code maintained. I'm going to re-review this this Wednesday when I go through the most urgent PRs. |
@Raffo That's actually why I was asking how strong your "I would prefer" was. 🙂 Let me see about addressing that... |
df29d37
to
2b5309b
Compare
@Raffo OK, no more named returns in |
Ambassador can be configured with `Host` resources (based on the `Host` CRD) for defining the external DNS host name. This code adds a new source, `ambassador-host`, that looks for the `ambassador/ambassador` Service and and uses the `hostname` from the `Host` resource. Signed-off-by: Alvaro Saurin <alvaro.saurin@gmail.com> Signed-off-by: Flynn <flynn@datawire.io>
2b5309b
to
6eeef96
Compare
Perfect, thanks for the update. Reviewing this first thing tomorrow morning. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: inercia, Raffo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@Raffo Thanks!! 🙂 |
@Raffo Any chance to have this released soon? |
Hi @Raffo @njuettner, I know you're busy but would you know when there might be a release bump that would include this? |
Thanks for getting this released. I found it doesn't work when you are using ALBs with Ambassador because the LB info is on the ingress controller vs the ambassador service. I will have to continue adding all the DNS records we need on the ALB annotations. |
Ambassador can be configured with
Host
resources (based on theHost
CRD) for defining the external DNS host name. This is an example of aHost
resource:This code adds a new source,
ambassador-host
, thatHosts
resources witha) a
hostname
, andb) a
external-dns.ambassador-service
annotation that refers to an existingService
srv
.ip
address fromsvc.Status.LoadBalancer.Ingress
hostname
andip
Closes #1552