-
Notifications
You must be signed in to change notification settings - Fork 6.4k
feat: Cluster name as part of sync #7394
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
feat: Cluster name as part of sync #7394
Conversation
Signed-off-by: pashavictorovich <pavel@codefresh.io>
Signed-off-by: pashavictorovich <pavel@codefresh.io>
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.
Added one comment in app_project_types.go.
Do we really need changes in util/argo/argo.go
, util/argo/cluster.go
, util/db/cluster.go
. Probably we can just revert them or I'm missing something?
@@ -354,7 +354,7 @@ func (proj AppProject) IsSourcePermitted(src ApplicationSource) bool { | |||
// IsDestinationPermitted validates if the provided application's destination is one of the allowed destinations for the project | |||
func (proj AppProject) IsDestinationPermitted(dst ApplicationDestination) bool { | |||
for _, item := range proj.Spec.Destinations { | |||
if globMatch(item.Server, dst.Server) && globMatch(item.Namespace, dst.Namespace) { | |||
if (globMatch(item.Server, dst.Server) || globMatch(item.Server, dst.Name)) && globMatch(item.Namespace, dst.Namespace) { |
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 cluster name should be compared with the name in the destination. I think this should work:
if (globMatch(item.Server, dst.Server) || globMatch(item.Server, dst.Name)) && globMatch(item.Namespace, dst.Namespace) { | |
if (globMatch(item.Server, dst.Server) || globMatch(item.Name, dst.Name)) && globMatch(item.Namespace, dst.Namespace) { |
Signed-off-by: pashavictorovich <pavel@codefresh.io>
…to cluster-name-as-part-of-sync
Signed-off-by: pashavictorovich <pavel@codefresh.io>
Codecov Report
@@ Coverage Diff @@
## master #7394 +/- ##
==========================================
+ Coverage 41.24% 41.33% +0.09%
==========================================
Files 161 161
Lines 21525 21583 +58
==========================================
+ Hits 8878 8922 +44
- Misses 11384 11400 +16
+ Partials 1263 1261 -2
Continue to review full report at Codecov.
|
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.
LGTM
Closes: #7198