-
Notifications
You must be signed in to change notification settings - Fork 91
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1049 +/- ##
==========================================
- Coverage 71.74% 69.73% -2.01%
==========================================
Files 47 47
Lines 5422 5522 +100
==========================================
- Hits 3890 3851 -39
- Misses 1350 1474 +124
- Partials 182 197 +15
Continue to review full report at Codecov.
|
@kyessenov: The following test failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
* update configs * update SHA
validated with istio/istio#571 |
ping. PR in istio broke all PRs in pilot until this gets merged. |
@@ -47,7 +46,8 @@ type cacheHandler struct { | |||
} | |||
|
|||
// NewController creates a new Kubernetes controller for CRDs | |||
func NewController(client *Client, resyncPeriod time.Duration) model.ConfigStoreCache { | |||
// Use "" for namespace to listen for all namespace changes |
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.
nit: maybe add platform neutral equivalent to v1.NamespaceAll
?
continue | ||
} | ||
|
||
if namespace != "" && namespace != item.GetObjectMeta().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.
nit: s/""/v1.NamespaceAll
Content: rule, | ||
}) | ||
} | ||
if namespace != "" && namespace != ingress.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.
nit: s/""/v1.NamespaceAll
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.
Ok
func encodeIngressRuleName(ingressName, ingressNamespace string, ruleNum, pathNum int) string { | ||
return fmt.Sprintf("%s.%s.%d.%d", ingressNamespace, ingressName, ruleNum, pathNum) | ||
func encodeIngressRuleName(ingressName string, ruleNum, pathNum int) string { | ||
return fmt.Sprintf("%s-%d-%d", ingressName, ruleNum, pathNum) |
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.
Why the switch from .
to -
as a separator?
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.
k8s allows only - in names.
// Type is a short configuration name that matches the content message type | ||
Type string | ||
// (e.g. "route-rule") |
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.
Are type names normalized to non-k8s specific names? e.g. route-rule instead of route-rule.config.istio.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.
Yes, type is route-rule
, API is route-rules.config.istio.io/v1alpha2
.
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.
can we move to v1beta1 ? claim beta release with alpha api version is odd.
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.
CRDs may only support one version at a time and mixer already started using v1alpha2
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.
I chatted with @geeknoid. Let's please change everywhere to v1beta1
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.
Changed to v1beta1 in config design doc: https://docs.google.com/document/d/1fGZpgFWJZhNRlQoBlCW815aOFR-ewfxKhla0CcPRsBM/edit#
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.
If we use v1beta1 then by k8s conventions, this API will provide future backwards compatibility, @geeknoid. As long as we're ok taking on the work to maintain it forever, i'm OK changing to v1beta1.
let me merge this to unblock the others. will address namespace.All in a subsequent PR. |
out = append(out, rule) | ||
} | ||
} | ||
return out | ||
} | ||
|
||
func (i *istioConfigStore) DestinationPolicy(destination string, tags Tags) *proxyconfig.DestinationVersionPolicy { | ||
value, exists, _ := i.Get(DestinationPolicy.Type, destination) | ||
names := strings.Split(destination, ".") | ||
name, 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.
what if I have foo.lyft.com as my destination and its in istio global 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.
we don't have a global namespace, CRDs are namespaces just like services themselves.
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.
This is provisioning the "name" and "namespace" use from CRD like we discussed. It was already happening before under the hoods, this is just making it explicit.
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.
overall looks good. dont understand the need to extract namespace from dest policy
Is this needed for 0.2? This changes all the code, I will not be able to merge my PR anymore. |
Why did you force merge this when e2e smoke test does not pass? |
It passed on istio/istio against the SHA of this PR. This PR required coordinating changes across two repositories which is iffy each time. |
* update configs * update SHA Former-commit-id: 96e9872
* update configs * update SHA Former-commit-id: 96e9872
* update configs * update SHA Former-commit-id: 96e9872
Step 2 of config update: define config metadata and config wrapper object.
Step 1 was switching to individual kinds for each config type.
Step 3 is to update config proto definitions to utilize the metadata.