@@ -674,16 +674,22 @@ func init() {
674
674
Entry ("allow ingress+egress Types" , api.PolicySpec {Types : []api.PolicyType {api .PolicyTypeIngress , api .PolicyTypeEgress }}, true ),
675
675
Entry ("disallow repeated egress Types" , api.PolicySpec {Types : []api.PolicyType {api .PolicyTypeEgress , api .PolicyTypeEgress }}, false ),
676
676
Entry ("disallow unexpected value" , api.PolicySpec {Types : []api.PolicyType {"unexpected" }}, false ),
677
- Entry ("disallow Types without ingress when IngressRules present" ,
677
+
678
+ // In the initial implementation, we validated against the following two cases but we found
679
+ // that prevented us from doing a smooth upgrade from type-less to typed policy since we
680
+ // couldn't write a policy that would work for back-level Felix instances while also
681
+ // specifying the type for up-level Felix instances.
682
+ Entry ("allow Types without ingress when IngressRules present" ,
678
683
api.PolicySpec {
679
684
IngressRules : []api.Rule {{Action : "allow" }},
680
685
Types : []api.PolicyType {api .PolicyTypeEgress },
681
- }, false ),
682
- Entry ("disallow Types without egress when EgressRules present" ,
686
+ }, true ),
687
+ Entry ("allow Types without egress when EgressRules present" ,
683
688
api.PolicySpec {
684
689
EgressRules : []api.Rule {{Action : "allow" }},
685
690
Types : []api.PolicyType {api .PolicyTypeIngress },
686
- }, false ),
691
+ }, true ),
692
+
687
693
Entry ("allow Types with ingress when IngressRules present" ,
688
694
api.PolicySpec {
689
695
IngressRules : []api.Rule {{Action : "allow" }},
0 commit comments