Skip to content

Commit 6d4a8eb

Browse files
author
Nghia Tran
authored
Allow unknown fields. (#114) (#120)
1 parent 75cfdf2 commit 6d4a8eb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd/controller/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,18 @@ limitations under the License.
1717
package main
1818

1919
import (
20+
"istio.io/api/networking/v1alpha3"
2021
"knative.dev/net-istio/pkg/reconciler/ingress"
2122

2223
// This defines the shared main for injected controllers.
2324
"knative.dev/pkg/injection/sharedmain"
2425
)
2526

2627
func main() {
28+
// Allow unknown fields in Istio API client. This is so that we are more resilience
29+
// in cases user clusers have malformed resources.
30+
v1alpha3.VirtualServiceUnmarshaler.AllowUnknownFields = true
31+
v1alpha3.GatewayUnmarshaler.AllowUnknownFields = true
32+
2733
sharedmain.Main("istiocontroller", ingress.NewController)
2834
}

0 commit comments

Comments
 (0)