use istio client-go library instead of knative (#1661)

use istio client-go library instead of knative
bump kubernetes dependency version
change code coverage to codecov
This commit is contained in:
zryfish
2019-12-13 11:26:18 +08:00
committed by GitHub
parent f249a6e081
commit ea88c8803d
2071 changed files with 354531 additions and 108336 deletions

View File

@@ -32,6 +32,7 @@ type extensionAttributes struct {
xName string
kind types.Kind
allowedValues sets.String
enforceArray bool
}
// Extension tag to openapi extension attributes
@@ -46,8 +47,9 @@ var tagToExtension = map[string]extensionAttributes{
allowedValues: sets.NewString("merge", "retainKeys"),
},
"listMapKey": {
xName: "x-kubernetes-list-map-keys",
kind: types.Slice,
xName: "x-kubernetes-list-map-keys",
kind: types.Slice,
enforceArray: true,
},
"listType": {
xName: "x-kubernetes-list-type",
@@ -113,6 +115,10 @@ func (e extension) hasMultipleValues() bool {
return len(e.values) > 1
}
func (e extension) isAlwaysArrayFormat() bool {
return tagToExtension[e.idlTag].enforceArray
}
// Returns sorted list of map keys. Needed for deterministic testing.
func sortedMapKeys(m map[string][]string) []string {
keys := make([]string, len(m))