Skip to content
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

Adding Kubernetes Node labels to Solr nodes. (WIP) #90

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HoustonPutman
Copy link
Contributor

Issue number of the reported bug or feature request: Resolves #53

Describe your changes
This PR adds Kubernetes Node labels as sysProps for Solr Nodes, thus allowing for them to be used within Solr autoscaling policies.

Kubernetes Node labels are added in the following steps:

  1. In an initContainer, the Kubernetes API is queried to get the information for the node the pod resides on.
  2. jq is used to parse this information and generate a sh script to update $SOLR_OPTS to contain -d<kube-node-label>=<value>.
  3. This bash file is shared via a volume between the initContainer and the solr container.
  4. Solr is provided this sh script via the $SOLR_INCLUDES envVar. This is an option that Solr reads when it starts up.
  5. When Solr starts, the SOLR_OPTS will contain the -D options that specify all of the Kubernetes node labels.

Testing performed
Tested locally.

This is a WIP and the feature has not been finalized yet.

@AceHack
Copy link

AceHack commented Apr 1, 2020

Any update?

@HoustonPutman
Copy link
Contributor Author

No update other than it worked in my tests. We probably want to add this as an optional feature, at least at first. I can probably do some work on it next week or the next one.

I wanted to get some feedback before moving forward with it

@HoustonPutman
Copy link
Contributor Author

I'm going to try and get #95 merged in, then cut the v0.2.4 release. After that I'll try to get this merged, as it's quite a large change to how Solr is "run".

@HoustonPutman HoustonPutman changed the base branch from master to main January 20, 2021 16:13
@HoustonPutman HoustonPutman marked this pull request as draft January 20, 2021 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Solr to be run across Availability Zones
2 participants