-
Notifications
You must be signed in to change notification settings - Fork 176
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
How-to add nodeSelector restriction to components? #181
Comments
Okay looks like the current way to do this is: local s = t.store(commonConfig {
replicas: 1,
serviceMonitor: true,
}) + {
statefulSet+: {
spec+: {
template+: {
spec+: {
nodeSelector+: {
'k8s.scaleway.com/pool-name': 'kubernetes-infra',
},
},
},
},
},
}; but having a config field for that would be prettier. |
I do agree with you, it will make resource selection, and even resource claims DRY |
This is exactly the right way to do it. 👍 |
And about to add node selector in store shards. How do we do this?
This is not adding it. |
@betorvs By looking here, we can see that the store shards need an additional You can try: }) + {
shards+: {
statefulSet+: {
spec+: {
template+: {
spec+: {
nodeSelector+: {
'<label>': '<label-value>',
},
},
},
},
},
},
}; And maybe even one more as it's looping over the number of shards. |
@sdurrheimer thanks for replying it. But when I added it:
I found another way to add it. I add a new variable:
Then I changed shards for:
It works. I'm not sure if this is the best solution. I'm pretty new using jsonnet. |
no. it didn't work. It creates nodeSelector inside services too. |
Curious about this as well. I'm unable to get a nodeSelector working with sharded thanos store. I'm not super familiar with jsonnet either. Following the example here #181 (comment) gives me the error
|
I figured this out FYI
|
Hi there,
Before the recent refactor, I was able to add by nodeSelector restriction, like the following example:
With the new format, how can I achieve the same behavior?
I tried the following:
Thanks in advance,
The text was updated successfully, but these errors were encountered: