Hash ir/infra resources#559
Hash ir/infra resources#559danehans merged 8 commits intoenvoyproxy:mainfrom Alice-Lilith:alicewasko/dev/ir-hashing
Conversation
Signed-off-by: AliceProxy <alicewasko@datawire.io>
Signed-off-by: AliceProxy <alicewasko@datawire.io>
Signed-off-by: AliceProxy <alicewasko@datawire.io>
Codecov Report
@@ Coverage Diff @@
## main #559 +/- ##
==========================================
+ Coverage 60.19% 60.71% +0.52%
==========================================
Files 45 45
Lines 5564 5567 +3
==========================================
+ Hits 3349 3380 +31
+ Misses 2008 1984 -24
+ Partials 207 203 -4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: AliceProxy <alicewasko@datawire.io>
Signed-off-by: AliceProxy <alicewasko@datawire.io>
Signed-off-by: AliceProxy <alicewasko@datawire.io>
internal/provider/utils/utils.go
Outdated
There was a problem hiding this comment.
Would it be more efficient if the func first checks the provided name is less or equal to 32 chars and then return early with the provided name?
There was a problem hiding this comment.
Initially it was only going to hash names that were longer than 60 characters. Per this comment I changed it to now hash every name regardless of length. Reverting the last couple commits would return it to only hashing if the provided name is longer than 60 characters and returning early with the provided name if not.
#559 (comment)
There was a problem hiding this comment.
This bit has been updated to use up to 48 characters so that with the "envoy- and the 8 character hash we can go all the way up to 63 characters max. Hashing still occurs on all resources regardless of initial name length at @arkodg's suggestion but I'm good with doing it either way.
Signed-off-by: AliceProxy <alicewasko@datawire.io>
Signed-off-by: AliceProxy <alicewasko@datawire.io>
Changes some infra names so that everything is hashed now (service/deployment/configmap/serviceaccount). It preserves up to 48 characters of the original resource's name and then adds an 8 character hash (48 chosen because when appending the 8 character hash and the envoy prefix("envoy") it adds up to 63 characters) .
The labels for the owning gateway name and namespace have not been altered.
Should resolve #441