Git Product home page Git Product logo

Comments (8)

timterle avatar timterle commented on July 23, 2024 1

What about something like this in solrcloud.yaml?

kind: SolrCloud
spec:
  solrServicePort: 8983
  solrFqdnTemplate: {{ .Name }}.{{ .Namespace }}.domain.com

or arguments to the operator:

--service-port=8983
--fqdn-template={{ .Name }}.{{ .Namespace }}.domain.com

from solr-operator.

HoustonPutman avatar HoustonPutman commented on July 23, 2024 1

Yeah, we should definitely add a spec entry for addressability.

I can probably work on that sometime next week. I'll support Ingress, ExternalDNS, and headless services at first.

from solr-operator.

HoustonPutman avatar HoustonPutman commented on July 23, 2024

So I think this would be an awesome addition. We should probably make this a broader addressability configuration feature that lets you select from:

  • LoadBalanced Services, services + ingress, or headless service (to possibly use with external DNS?)
  • Override the default ports
  • Service Annotations for ExternalDNS, and if so what the format of the URL should be? (option to include namespace or not)

A quick question about how you are using ExternalDNS, as I'm just learning about it now. There is a way to scrape kubernetes services using ExternalDNS without the services having annotations, correct? We can definitely add the annotations, but it looks like there is a way to scrape all services using a filter. At that point I think you should be able to do run ExternalDNS with the parameter --fqdn-template={{.Name}}.{{.Namespace}}.ourdomain.com, and I think it would probably work with the namespace in the domain... I still need to do some research into the ports though.

I worry about removing the namespace from the external DNS, as there could be conflicts with similarly named solrClouds in different namespaces. I may be overly cautious about that, so for now I've included it in the preliminary list of configuration options above.

from solr-operator.

timterle avatar timterle commented on July 23, 2024

Currently we annotate the headless solr and zookeeper services.
We are experimenting with not having an ingress-base-domain. If we use ingress-base-domain then that domain must somehow be added to Kubernetes DNS. Can that easily be configured? Prometheus exporter can't resolve example-solrcloud-0.ourdomain.com because ourdomain.com is not in Kubernetes DNS, only in our external DNS (route53). So now we don't use ingress-base-domain. Instead we have a dns zone for each solrcloud with the name solrcloudname-solrcloud-headless.

Yes, namespace in the domain probably works if it's a subdomain, but having it as a prefix to all generated hostnames makes the naming incompatible with the ExternalDNS naming where you can't customize the prefix.

from solr-operator.

timterle avatar timterle commented on July 23, 2024

@HoustonPutman That's great!

Right now we create a headless prometheus exporter service ourselves to get ExternalDNS integration for prometheus. Maybe it would be a good addition as well? Is that included in your work or should I create a new issue for that?

from solr-operator.

HoustonPutman avatar HoustonPutman commented on July 23, 2024

@timterle , sorry for the extremely late reply.

I've started to work on a big overhaul of customization. I've done a lot of reading on ExternalDNS, and I still have a few questions.

  • Do you use externalDNS with services that are not loadBalanced? If so I don't see how that works in their documentation, it looks like a Service must be either 1) LoadBalanced 2) ExternalName 3) Headless Node-Port. Our services for the solrcloud are none of those, so I was looking into giving both of following options, which would work together: 1) use LoadBalanced services or and Ingress and 2) Use externalDNS or not.
  • Would you be able to use ExternalDNS with ingresses? Because it looks like that is also supported. This is less important if your answer to the previous bullet point is yes.

I'm planning on pushing a PR with the CRD changes I'm proposing before actually implementing the logic. That way we can iterate on features and design without having to do a ton of rewrites. So I'd really appreciate your input, as we run our kube clusters very differently than y'all do.

from solr-operator.

timterle avatar timterle commented on July 23, 2024

@HoustonPutman it's ok, we are all busy :)

I don't think NodePort is necessary. It works with ClusterIP as well. This is what we do and it seems to work:

kubectl annotate svc example-solrcloud-zookeeper-headless external-dns.alpha.kubernetes.io/hostname=domain.com

from solr-operator.

HoustonPutman avatar HoustonPutman commented on July 23, 2024

Finally got it merged in @timterle ! Sorry it took this long, but I really think we got it right.

If you still use the Solr Operator and ExternalDNS mind testing it out at some point? (I'd love for someone to test it out before we do a release.)

from solr-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.