Store svc labels in lb, match toservices by them#2332
Conversation
2ee2426 to
27248d7
Compare
joestringer
left a comment
There was a problem hiding this comment.
common/ changes LGTM. I didn't look closely at k8s pieces.
aanm
left a comment
There was a problem hiding this comment.
Discussed offline, needs to match services by namespace
243c061 to
c884e2c
Compare
There was a problem hiding this comment.
package comment should be of the form "Package api ..."
There was a problem hiding this comment.
package comment should be of the form "Package labels ..."
4e95a55 to
082b1d5
Compare
There was a problem hiding this comment.
Put the "matching" logic of the service in a single version to avoid code repetition here and on line 90-99.
There was a problem hiding this comment.
By removing k8sService json tag aren't you breaking backwards compatibility?
There was a problem hiding this comment.
I guess I am. Do you think it should be left there?
There was a problem hiding this comment.
Do you think it should be left there?
Yes
There was a problem hiding this comment.
Not sure if relevant, but do you want to add checks and tests with svcLabels == nil?
There was a problem hiding this comment.
Thanks for the catch, but I think that empty svcLabels case is tested in TestTranslatorDirect.
|
Hi @nebril could you create the Ginkgo test please or create a task to make it in the near future? Regards |
317eefc to
c880df5
Compare
|
test-me-please |
60d0590 to
c82fe53
Compare
|
test-me-please |
|
@eloycoto created issue |
No longer good enough ;-) All new code needs Ginkgo tests. |
c82fe53 to
68a0b05
Compare
|
test-me-please |
eloycoto
left a comment
There was a problem hiding this comment.
This is going to fail in kubbernetes 1.6. You need to add CNP V1 on manifest/1.6/ folder.
There was a problem hiding this comment.
You should add a defer function for the endpointPath and policyLabeledPath, if it fails, it'll be no deleted at all.
|
Depends on #2544 |
7fc9e77 to
729fb07
Compare
|
test-me-please |
|
test-all-ginkgo |
|
Are all review comments addressed? @nebril : Is this ready to be merged? |
729fb07 to
1a80d9e
Compare
k8s watcher stores added/updated services labels in LoadBalancer. Those labels are used by RuleTranslator to check whether the ToService rule should end up generating ToCIDR rules for service. Signed-off-by: Maciej Kwiek <maciej@covalent.io>
Signed-off-by: Maciej Kwiek <maciej@covalent.io>
Signed-off-by: Maciej Kwiek <maciej@covalent.io>
Signed-off-by: Maciej Kwiek <maciej@covalent.io>
Signed-off-by: Maciej Kwiek <maciej@covalent.io>
1a80d9e to
05e2613
Compare
|
test-me-please |
k8s watcher stores added/updated services labels in LoadBalancer.
Those labels are used by RuleTranslator to check whether the ToService
rule should end up generating ToCIDR rules for service.
fixes #1875