-
Notifications
You must be signed in to change notification settings - Fork 157
K8SPSMDB-1003: Kubernetes node zone/region tag #1360
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
Conversation
@sergelogvinov are you willing to work on this further? Looking at the test results, I don't think it works right now but I think it's a useful feature. If you don't want to work on this further, we can take over. |
@sergelogvinov ping |
Hello, sorry for delay. I did some tests on my application side with changes. And all works as expected. I know some clouds which does not allow you to use clusterRole permission (only one namespace permission). The option proposal: # Try to set higher priority for nodes which zone = us-east-1a
topologyPrimaryPrefer: us-east-1a
# Can be kubernetes.io/hostname or topology.kubernetes.io/region or topology.kubernetes.io/zone
topologyPrimaryKey: kubernetes.io/zone And it can be done with https://jira.percona.com/browse/K8SPSMDB-1002 What do you think? |
@sergelogvinov yes, namespace permission can be a problem since by default we don't use ClusterRole. So unless operator is deployed cluster-wide, this won't work. It'd be great if we can offer something for namespace scoped deployments too, what do you think @hors @spron-in ? @sergelogvinov I think K8SPSMDB-1002 should be implemented in another PR, wdyt? |
@egegunes I think we can start from CW and then we will see. |
@sergelogvinov we'll start working on v1.16.0 in this month and if you want to have this we can assist you |
@sergelogvinov ping |
3f5daf1
to
689d1f8
Compare
@egegunes Sorry for delay. I've rebase the PR, check the cluster wide and namespaces deployment. It willn't fail if it does not have cluster role permission. |
I've checked the failed logs. Is it CI issue? Thanks. |
@sergelogvinov I think we have problems with backups and restores because of this changes. I don't think it's just a CI issue |
689d1f8
to
af722aa
Compare
I've checked the logs/shell scripts and other PRs. Last PRs have the same error:
I notice, that we run operator in cluster wide mode, so probably operator in another namespace affects our e2e tests. Thanks. |
ebf17cc
to
cb17d44
Compare
cb17d44
to
fc01895
Compare
@nmarukovich could you please check this |
Add kubernetes node tags zone/region to the monogo nodes.
…er-mongodb-operator into mongo-geo-tag
e2e-tests/cross-site-sharded/run
Outdated
| egrep -v 'I NETWORK|W NETWORK|Error saving history file|Percona Server for MongoDB|connecting to:|Unable to reach primary for set|Implicit session:|versions do not match|Error saving history file:|bye' \ | ||
| $sed -re 's/ObjectId\("[0-9a-f]+"\)//; s/-[0-9]+.svc/-xxx.svc/') | ||
|
||
echo "$nodes_amount" |
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.
it would be better to have more descriptive log like: "${nodes_amount} members is in replset ${rsName} configuration"
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.
and it'd be good to print waiting for all members to be configured in ${replsetName}
before until
commit: 95c1888 |
@sergelogvinov thank you for your contribution |
https://jira.percona.com/browse/K8SPSMDB-1003
Problem:
To use read/write concern based on kubernetes zone/region.
Cause:
For example, reading from a single zone can reduce latency, while writing to multiple zones enhances redundancy
Solution:
Simple changes.
We will read node property (if we have a right for it) and add tags to the node.
Plus, we need to add RBAC policy in helm chart too.
Thanks.
CHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
compare/*-oc.yml
)?Config/Logging/Testability