-
Notifications
You must be signed in to change notification settings - Fork 34
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
Feature/random hash #107
Feature/random hash #107
Conversation
Two functions are defined:- - CreateHash: Takes of the hash that needs to be genreated - CreateHashWithCharSet: takes length(length of hash) and charset(characters to be used)
Two functions are defined:- - CreateHash: Takes of the hash that needs to be genreated - CreateHashWithCharSet: takes length(length of hash) and charset(characters to be used)
…o feacture/random-hash
* update Make file * update imports in protofiles * update server files to implement new GRPC gen code * add Hash to config.proto
In general Anyways, thanks for the implementation Jas! |
Thanks for pointing it out @bernardhalas, but will low entropy be a problem because we just want a unique hash for a config?.... as far as I know, low entropy results in predictable hashes that why low entropy is not recommended for secrets and keys, but in our case, we can afford our hash to be predictable and unique. If necessary, we can use the crypto/rand instead of math/rand |
For the resource hashes, I think we can keep |
* update Make file * update imports in protofiles * update server files to implement new GRPC gen code * add Hash to config.proto
… feature/random-hash
Two functions are defined:- - CreateHash: Takes of the hash that needs to be genreated - CreateHashWithCharSet: takes length(length of hash) and charset(characters to be used)
* update Make file * update imports in protofiles * update server files to implement new GRPC gen code * add Hash to config.proto
… feature/random-hash
… feature/random-hash
The kubectl command in the deleteEtcd only supports lowercase character for pod names. To Fix this we deleted the uppercase from the characterset in randomHash generator.
… feature/random-hash
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.
The changes should be ok from what I can see. Thank You @jaskeerat789 for your work and also @samuelstolicny for the asisstance.
This PR focuses on adding random hashes to the nodes and firewalls names in task #85. The random hash generator takes in the length of the hash that needs to be appended to the name, for now, it's hardcoded to 7. The default character set for the hash is capital and small alphabet and digits.
The generator function is defined in /util/randomHash.go
The generator is called in services/scheduler/scheduler.go:221. We check if the cluster already has a hash generated for it , if found, we go on to use it else generate a new one.
Changes also include updating of proto files to support the Hash property under Config.Cluster and change of import statement to support the new protoc.