Browse Source

Enable yaml linting. (#17096)

- Ran "go generate" which accounts for most of the changes.
Martin Taillefer 1 month ago
parent
commit
d334ade54c
No account linked to committer's email address
49 changed files with 2395 additions and 2437 deletions
  1. 1
    1
      Makefile.core.mk
  2. 740
    740
      galley/pkg/config/processor/metadata/metadata.gen.go
  3. 740
    740
      galley/pkg/config/processor/metadata/metadata.yaml
  4. 29
    29
      galley/pkg/config/testing/basicmeta/basicmeta.gen.go
  5. 9
    9
      galley/pkg/config/testing/basicmeta/basicmeta.yaml
  6. 20
    20
      galley/pkg/config/testing/basicmeta/basicmeta2.yaml
  7. 42
    42
      galley/pkg/config/testing/k8smeta/k8smeta.gen.go
  8. 37
    37
      galley/pkg/config/testing/k8smeta/k8smeta.yaml
  9. 0
    14
      galley/pkg/metadata/kube/types.gen.go
  10. 619
    619
      galley/tools/gen-meta/metadata.yaml
  11. 11
    11
      mixer/pkg/adapter/test/fixtures.gen.go
  12. BIN
      mixer/pkg/protobuf/yaml/testdata/all/types.proto_descriptor
  13. BIN
      mixer/tools/codegen/pkg/bootstrapgen/testdata/apa/template.descriptor
  14. BIN
      mixer/tools/codegen/pkg/bootstrapgen/testdata/check/template.descriptor
  15. BIN
      mixer/tools/codegen/pkg/bootstrapgen/testdata/quota/template.descriptor
  16. BIN
      mixer/tools/codegen/pkg/bootstrapgen/testdata/report1/template.descriptor
  17. BIN
      mixer/tools/codegen/pkg/bootstrapgen/testdata/report2/template.descriptor
  18. 4
    4
      mixer/tools/codegen/pkg/modelgen/model_test.go
  19. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/BadExplicitTemplateName.descriptor
  20. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/BasicTopLevelFields.descriptor
  21. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/ExplicitTemplateName.descriptor
  22. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/MissingBothRequiredExt.descriptor
  23. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/MissingPackageName.descriptor
  24. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/MissingTemplateMessage.descriptor
  25. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/MissingTemplateVarietyExt.descriptor
  26. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/Proto2BadSyntax.descriptor
  27. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/ReservedFieldInTemplate.descriptor
  28. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/SimpleApaTemplate.descriptor
  29. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/SimpleTemplate.descriptor
  30. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/UnsupportedFieldTypeEnum.descriptor
  31. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/UnsupportedFieldTypeMessage.descriptor
  32. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/UnsupportedFieldTypePrimitive.descriptor
  33. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/UnsupportedMapKey.descriptor
  34. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/UnsupportedMapVal.descriptor
  35. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/UnsupportedTypeInAPAOutTemplate.descriptor
  36. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/UnsupportedValueTypeInAPA.descriptor
  37. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/WrongPkgName.descriptor
  38. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/multiFile.descriptor
  39. BIN
      mixer/tools/codegen/pkg/modelgen/testdata/twoTemplatesError.descriptor
  40. BIN
      mixer/tools/mixgen/cmd/testdata/apa/template.descriptor
  41. BIN
      mixer/tools/mixgen/cmd/testdata/check/template.descriptor
  42. BIN
      mixer/tools/mixgen/cmd/testdata/error/template.descriptor
  43. BIN
      mixer/tools/mixgen/cmd/testdata/quota/template.descriptor
  44. BIN
      mixer/tools/mixgen/cmd/testdata/report/template.descriptor
  45. 1
    1
      pilot/pkg/model/config.go
  46. 1
    1
      pilot/pkg/model/service.go
  47. 0
    14
      pilot/pkg/networking/core/v1alpha3/fakes/fake_istio_config_store.gen.go
  48. 0
    14
      pilot/pkg/networking/core/v1alpha3/fakes/fake_service_discovery.gen.go
  49. 141
    141
      pkg/config/schemas/schemagen/schemas.yaml

+ 1
- 1
Makefile.core.mk View File

@@ -343,7 +343,7 @@ shellcheck:
343 343
 
344 344
 MARKDOWN_LINT_WHITELIST=localhost:8080,storage.googleapis.com/istio-artifacts/pilot/,http://ratings.default.svc.cluster.local:9080/ratings
345 345
 
346
-lint_modern: lint-python lint-copyright-banner lint-scripts lint-dockerfiles lint-markdown
346
+lint_modern: lint-python lint-copyright-banner lint-scripts lint-dockerfiles lint-markdown lint-yaml
347 347
 
348 348
 #-----------------------------------------------------------------------------
349 349
 # Target: go build

+ 740
- 740
galley/pkg/config/processor/metadata/metadata.gen.go
File diff suppressed because it is too large
View File


+ 740
- 740
galley/pkg/config/processor/metadata/metadata.yaml
File diff suppressed because it is too large
View File


+ 29
- 29
galley/pkg/config/testing/basicmeta/basicmeta.gen.go View File

@@ -61,12 +61,12 @@ var _basicmetaYaml = []byte(`# Copyright 2019 Istio Authors
61 61
 
62 62
 
63 63
 collections:
64
-  - name:         "collection1"
65
-    proto:        "google.protobuf.Struct"
64
+  - name: "collection1"
65
+    proto: "google.protobuf.Struct"
66 66
     protoPackage: "github.com/gogo/protobuf/types"
67 67
 
68
-  - name:         "collection2"
69
-    proto:        "google.protobuf.Struct"
68
+  - name: "collection2"
69
+    proto: "google.protobuf.Struct"
70 70
     protoPackage: "github.com/gogo/protobuf/types"
71 71
 
72 72
 # Configuration for input sources
@@ -75,11 +75,11 @@ sources:
75 75
   - type: kubernetes
76 76
     resources:
77 77
       # Test data sources
78
-      - collection:   "collection1"
79
-        kind:         "Kind1"
80
-        plural:       "Kind1s"
81
-        group:        "testdata.istio.io"
82
-        version:      "v1alpha1"
78
+      - collection: "collection1"
79
+        kind: "Kind1"
80
+        plural: "Kind1s"
81
+        group: "testdata.istio.io"
82
+        version: "v1alpha1"
83 83
 
84 84
 # Transform specific configurations
85 85
 transforms:
@@ -119,20 +119,20 @@ var _basicmeta2Yaml = []byte(`# Copyright 2019 Istio Authors
119 119
 
120 120
 
121 121
 collections:
122
-  - name:         "collection1"
123
-    proto:        "google.protobuf.Struct"
122
+  - name: "collection1"
123
+    proto: "google.protobuf.Struct"
124 124
     protoPackage: "github.com/gogo/protobuf/types"
125 125
 
126
-  - name:         "collection1out"
127
-    proto:        "google.protobuf.Struct"
126
+  - name: "collection1out"
127
+    proto: "google.protobuf.Struct"
128 128
     protoPackage: "github.com/gogo/protobuf/types"
129 129
 
130
-  - name:         "collection2"
131
-    proto:        "google.protobuf.Struct"
130
+  - name: "collection2"
131
+    proto: "google.protobuf.Struct"
132 132
     protoPackage: "github.com/gogo/protobuf/types"
133 133
 
134
-  - name:         "collection2out"
135
-    proto:        "google.protobuf.Struct"
134
+  - name: "collection2out"
135
+    proto: "google.protobuf.Struct"
136 136
     protoPackage: "github.com/gogo/protobuf/types"
137 137
 
138 138
 # Configuration for input sources
@@ -141,18 +141,18 @@ sources:
141 141
   - type: kubernetes
142 142
     resources:
143 143
       # Test data sources
144
-      - collection:   "collection1"
145
-        kind:         "Kind1"
146
-        plural:       "Kind1s"
147
-        group:        "testdata.istio.io"
148
-        version:      "v1alpha1"
149
-
150
-      - collection:   "collection2"
151
-        kind:         "Kind2"
152
-        plural:       "Kind2s"
153
-        group:        "testdata.istio.io"
154
-        version:      "v1alpha1"
155
-        optional:     true
144
+      - collection: "collection1"
145
+        kind: "Kind1"
146
+        plural: "Kind1s"
147
+        group: "testdata.istio.io"
148
+        version: "v1alpha1"
149
+
150
+      - collection: "collection2"
151
+        kind: "Kind2"
152
+        plural: "Kind2s"
153
+        group: "testdata.istio.io"
154
+        version: "v1alpha1"
155
+        optional: true
156 156
 
157 157
 
158 158
 # Transform specific configurations

+ 9
- 9
galley/pkg/config/testing/basicmeta/basicmeta.yaml View File

@@ -14,12 +14,12 @@
14 14
 
15 15
 
16 16
 collections:
17
-  - name:         "collection1"
18
-    proto:        "google.protobuf.Struct"
17
+  - name: "collection1"
18
+    proto: "google.protobuf.Struct"
19 19
     protoPackage: "github.com/gogo/protobuf/types"
20 20
 
21
-  - name:         "collection2"
22
-    proto:        "google.protobuf.Struct"
21
+  - name: "collection2"
22
+    proto: "google.protobuf.Struct"
23 23
     protoPackage: "github.com/gogo/protobuf/types"
24 24
 
25 25
 # Configuration for input sources
@@ -28,11 +28,11 @@ sources:
28 28
   - type: kubernetes
29 29
     resources:
30 30
       # Test data sources
31
-      - collection:   "collection1"
32
-        kind:         "Kind1"
33
-        plural:       "Kind1s"
34
-        group:        "testdata.istio.io"
35
-        version:      "v1alpha1"
31
+      - collection: "collection1"
32
+        kind: "Kind1"
33
+        plural: "Kind1s"
34
+        group: "testdata.istio.io"
35
+        version: "v1alpha1"
36 36
 
37 37
 # Transform specific configurations
38 38
 transforms:

+ 20
- 20
galley/pkg/config/testing/basicmeta/basicmeta2.yaml View File

@@ -14,20 +14,20 @@
14 14
 
15 15
 
16 16
 collections:
17
-  - name:         "collection1"
18
-    proto:        "google.protobuf.Struct"
17
+  - name: "collection1"
18
+    proto: "google.protobuf.Struct"
19 19
     protoPackage: "github.com/gogo/protobuf/types"
20 20
 
21
-  - name:         "collection1out"
22
-    proto:        "google.protobuf.Struct"
21
+  - name: "collection1out"
22
+    proto: "google.protobuf.Struct"
23 23
     protoPackage: "github.com/gogo/protobuf/types"
24 24
 
25
-  - name:         "collection2"
26
-    proto:        "google.protobuf.Struct"
25
+  - name: "collection2"
26
+    proto: "google.protobuf.Struct"
27 27
     protoPackage: "github.com/gogo/protobuf/types"
28 28
 
29
-  - name:         "collection2out"
30
-    proto:        "google.protobuf.Struct"
29
+  - name: "collection2out"
30
+    proto: "google.protobuf.Struct"
31 31
     protoPackage: "github.com/gogo/protobuf/types"
32 32
 
33 33
 # Configuration for input sources
@@ -36,18 +36,18 @@ sources:
36 36
   - type: kubernetes
37 37
     resources:
38 38
       # Test data sources
39
-      - collection:   "collection1"
40
-        kind:         "Kind1"
41
-        plural:       "Kind1s"
42
-        group:        "testdata.istio.io"
43
-        version:      "v1alpha1"
44
-
45
-      - collection:   "collection2"
46
-        kind:         "Kind2"
47
-        plural:       "Kind2s"
48
-        group:        "testdata.istio.io"
49
-        version:      "v1alpha1"
50
-        optional:     true
39
+      - collection: "collection1"
40
+        kind: "Kind1"
41
+        plural: "Kind1s"
42
+        group: "testdata.istio.io"
43
+        version: "v1alpha1"
44
+
45
+      - collection: "collection2"
46
+        kind: "Kind2"
47
+        plural: "Kind2s"
48
+        group: "testdata.istio.io"
49
+        version: "v1alpha1"
50
+        optional: true
51 51
 
52 52
 
53 53
 # Transform specific configurations

+ 42
- 42
galley/pkg/config/testing/k8smeta/k8smeta.gen.go View File

@@ -61,28 +61,28 @@ var _k8smetaYaml = []byte(`# Copyright 2019 Istio Authors
61 61
 
62 62
 collections:
63 63
   # Built-in K8s collections
64
-  - name:         "k8s/core/v1/endpoints"
65
-    proto:        "k8s.io.api.core.v1.Endpoints"
64
+  - name: "k8s/core/v1/endpoints"
65
+    proto: "k8s.io.api.core.v1.Endpoints"
66 66
     protoPackage: "k8s.io/api/core/v1"
67 67
 
68
-  - name:         "k8s/core/v1/namespaces"
69
-    proto:        "k8s.io.api.core.v1.NamespaceSpec"
68
+  - name: "k8s/core/v1/namespaces"
69
+    proto: "k8s.io.api.core.v1.NamespaceSpec"
70 70
     protoPackage: "k8s.io/api/core/v1"
71 71
 
72
-  - name:         "k8s/core/v1/nodes"
73
-    proto:        "k8s.io.api.core.v1.NodeSpec"
72
+  - name: "k8s/core/v1/nodes"
73
+    proto: "k8s.io.api.core.v1.NodeSpec"
74 74
     protoPackage: "k8s.io/api/core/v1"
75 75
 
76
-  - name:         "k8s/core/v1/pods"
77
-    proto:        "k8s.io.api.core.v1.Pod"
76
+  - name: "k8s/core/v1/pods"
77
+    proto: "k8s.io.api.core.v1.Pod"
78 78
     protoPackage: "k8s.io/api/core/v1"
79 79
 
80
-  - name:         "k8s/core/v1/services"
81
-    proto:        "k8s.io.api.core.v1.ServiceSpec"
80
+  - name: "k8s/core/v1/services"
81
+    proto: "k8s.io.api.core.v1.ServiceSpec"
82 82
     protoPackage: "k8s.io/api/core/v1"
83 83
 
84
-  - name:         "k8s/extensions/v1beta1/ingresses"
85
-    proto:        "k8s.io.api.extensions.v1beta1.IngressSpec"
84
+  - name: "k8s/extensions/v1beta1/ingresses"
85
+    proto: "k8s.io.api.extensions.v1beta1.IngressSpec"
86 86
     protoPackage: "k8s.io/api/extensions/v1beta1"
87 87
 
88 88
 # Configuration for input sources
@@ -90,36 +90,36 @@ sources:
90 90
   # Kubernetes specific configuration.
91 91
   - type: kubernetes
92 92
     resources:
93
-      - collection:   "k8s/extensions/v1beta1/ingresses"
94
-        kind:         "Ingress"
95
-        plural:       "ingresses"
96
-        group:        "extensions"
97
-        version:      "v1beta1"
98
-
99
-      - collection:   "k8s/core/v1/services"
100
-        kind:         "Service"
101
-        plural:       "services"
102
-        version:      "v1"
103
-
104
-      - collection:   "k8s/core/v1/namespaces"
105
-        kind:         "Namespace"
106
-        plural:       "namespaces"
107
-        version:      "v1"
108
-
109
-      - collection:   "k8s/core/v1/nodes"
110
-        kind:         "Node"
111
-        plural:       "nodes"
112
-        version:      "v1"
113
-
114
-      - collection:   "k8s/core/v1/pods"
115
-        kind:         "Pod"
116
-        plural:       "pods"
117
-        version:      "v1"
118
-
119
-      - collection:   "k8s/core/v1/endpoints"
120
-        kind:         "Endpoints"
121
-        plural:       "endpoints"
122
-        version:      "v1"
93
+      - collection: "k8s/extensions/v1beta1/ingresses"
94
+        kind: "Ingress"
95
+        plural: "ingresses"
96
+        group: "extensions"
97
+        version: "v1beta1"
98
+
99
+      - collection: "k8s/core/v1/services"
100
+        kind: "Service"
101
+        plural: "services"
102
+        version: "v1"
103
+
104
+      - collection: "k8s/core/v1/namespaces"
105
+        kind: "Namespace"
106
+        plural: "namespaces"
107
+        version: "v1"
108
+
109
+      - collection: "k8s/core/v1/nodes"
110
+        kind: "Node"
111
+        plural: "nodes"
112
+        version: "v1"
113
+
114
+      - collection: "k8s/core/v1/pods"
115
+        kind: "Pod"
116
+        plural: "pods"
117
+        version: "v1"
118
+
119
+      - collection: "k8s/core/v1/endpoints"
120
+        kind: "Endpoints"
121
+        plural: "endpoints"
122
+        version: "v1"
123 123
 
124 124
 
125 125
 # Transform specific configurations

+ 37
- 37
galley/pkg/config/testing/k8smeta/k8smeta.yaml View File

@@ -15,28 +15,28 @@
15 15
 
16 16
 collections:
17 17
   # Built-in K8s collections
18
-  - name:         "k8s/core/v1/endpoints"
19
-    proto:        "k8s.io.api.core.v1.Endpoints"
18
+  - name: "k8s/core/v1/endpoints"
19
+    proto: "k8s.io.api.core.v1.Endpoints"
20 20
     protoPackage: "k8s.io/api/core/v1"
21 21
 
22
-  - name:         "k8s/core/v1/namespaces"
23
-    proto:        "k8s.io.api.core.v1.NamespaceSpec"
22
+  - name: "k8s/core/v1/namespaces"
23
+    proto: "k8s.io.api.core.v1.NamespaceSpec"
24 24
     protoPackage: "k8s.io/api/core/v1"
25 25
 
26
-  - name:         "k8s/core/v1/nodes"
27
-    proto:        "k8s.io.api.core.v1.NodeSpec"
26
+  - name: "k8s/core/v1/nodes"
27
+    proto: "k8s.io.api.core.v1.NodeSpec"
28 28
     protoPackage: "k8s.io/api/core/v1"
29 29
 
30
-  - name:         "k8s/core/v1/pods"
31
-    proto:        "k8s.io.api.core.v1.Pod"
30
+  - name: "k8s/core/v1/pods"
31
+    proto: "k8s.io.api.core.v1.Pod"
32 32
     protoPackage: "k8s.io/api/core/v1"
33 33
 
34
-  - name:         "k8s/core/v1/services"
35
-    proto:        "k8s.io.api.core.v1.ServiceSpec"
34
+  - name: "k8s/core/v1/services"
35
+    proto: "k8s.io.api.core.v1.ServiceSpec"
36 36
     protoPackage: "k8s.io/api/core/v1"
37 37
 
38
-  - name:         "k8s/extensions/v1beta1/ingresses"
39
-    proto:        "k8s.io.api.extensions.v1beta1.IngressSpec"
38
+  - name: "k8s/extensions/v1beta1/ingresses"
39
+    proto: "k8s.io.api.extensions.v1beta1.IngressSpec"
40 40
     protoPackage: "k8s.io/api/extensions/v1beta1"
41 41
 
42 42
 # Configuration for input sources
@@ -44,36 +44,36 @@ sources:
44 44
   # Kubernetes specific configuration.
45 45
   - type: kubernetes
46 46
     resources:
47
-      - collection:   "k8s/extensions/v1beta1/ingresses"
48
-        kind:         "Ingress"
49
-        plural:       "ingresses"
50
-        group:        "extensions"
51
-        version:      "v1beta1"
47
+      - collection: "k8s/extensions/v1beta1/ingresses"
48
+        kind: "Ingress"
49
+        plural: "ingresses"
50
+        group: "extensions"
51
+        version: "v1beta1"
52 52
 
53
-      - collection:   "k8s/core/v1/services"
54
-        kind:         "Service"
55
-        plural:       "services"
56
-        version:      "v1"
53
+      - collection: "k8s/core/v1/services"
54
+        kind: "Service"
55
+        plural: "services"
56
+        version: "v1"
57 57
 
58
-      - collection:   "k8s/core/v1/namespaces"
59
-        kind:         "Namespace"
60
-        plural:       "namespaces"
61
-        version:      "v1"
58
+      - collection: "k8s/core/v1/namespaces"
59
+        kind: "Namespace"
60
+        plural: "namespaces"
61
+        version: "v1"
62 62
 
63
-      - collection:   "k8s/core/v1/nodes"
64
-        kind:         "Node"
65
-        plural:       "nodes"
66
-        version:      "v1"
63
+      - collection: "k8s/core/v1/nodes"
64
+        kind: "Node"
65
+        plural: "nodes"
66
+        version: "v1"
67 67
 
68
-      - collection:   "k8s/core/v1/pods"
69
-        kind:         "Pod"
70
-        plural:       "pods"
71
-        version:      "v1"
68
+      - collection: "k8s/core/v1/pods"
69
+        kind: "Pod"
70
+        plural: "pods"
71
+        version: "v1"
72 72
 
73
-      - collection:   "k8s/core/v1/endpoints"
74
-        kind:         "Endpoints"
75
-        plural:       "endpoints"
76
-        version:      "v1"
73
+      - collection: "k8s/core/v1/endpoints"
74
+        kind: "Endpoints"
75
+        plural: "endpoints"
76
+        version: "v1"
77 77
 
78 78
 
79 79
 # Transform specific configurations

galley/pkg/metadata/kube/types.go → galley/pkg/metadata/kube/types.gen.go View File

@@ -1,17 +1,3 @@
1
-// Copyright Istio Authors. All Rights Reserved.
2
-//
3
-// Licensed under the Apache License, Version 2.0 (the "License");
4
-// you may not use this file except in compliance with the License.
5
-// You may obtain a copy of the License at
6
-//
7
-//     http://www.apache.org/licenses/LICENSE-2.0
8
-//
9
-// Unless required by applicable law or agreed to in writing, software
10
-// distributed under the License is distributed on an "AS IS" BASIS,
11
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
-// See the License for the specific language governing permissions and
13
-// limitations under the License.
14
-
15 1
 // GENERATED FILE -- DO NOT EDIT
16 2
 //
17 3
 //go:generate $GOPATH/src/istio.io/istio/galley/tools/gen-meta/gen-meta.sh kube pkg/metadata/kube/types.go

+ 619
- 619
galley/tools/gen-meta/metadata.yaml
File diff suppressed because it is too large
View File


+ 11
- 11
mixer/pkg/adapter/test/fixtures.gen.go
File diff suppressed because it is too large
View File


BIN
mixer/pkg/protobuf/yaml/testdata/all/types.proto_descriptor View File


BIN
mixer/tools/codegen/pkg/bootstrapgen/testdata/apa/template.descriptor View File


BIN
mixer/tools/codegen/pkg/bootstrapgen/testdata/check/template.descriptor View File


BIN
mixer/tools/codegen/pkg/bootstrapgen/testdata/quota/template.descriptor View File


BIN
mixer/tools/codegen/pkg/bootstrapgen/testdata/report1/template.descriptor View File


BIN
mixer/tools/codegen/pkg/bootstrapgen/testdata/report2/template.descriptor View File


+ 4
- 4
mixer/tools/codegen/pkg/modelgen/model_test.go View File

@@ -60,18 +60,18 @@ func TestErrorInTemplate(t *testing.T) {
60 60
 		{"testdata/MissingBothRequiredExt.descriptor", []string{"There has to be one proto file that has the " +
61 61
 			"extension istio.mixer.adapter.model.v1beta1.template_variety"}},
62 62
 		{"testdata/MissingTemplateMessage.descriptor", []string{"message 'Template' not defined"}},
63
-		{"testdata/ReservedFieldInTemplate.descriptor", []string{"proto:14: Template message " +
63
+		{"testdata/ReservedFieldInTemplate.descriptor", []string{"testdata/ReservedFieldInTemplate.proto:28: Template message " +
64 64
 			"must not contain the reserved field name 'Name'"}},
65
-		{"testdata/Proto2BadSyntax.descriptor", []string{"Proto2BadSyntax.proto:3: Only proto3 template files are allowed."}},
65
+		{"testdata/Proto2BadSyntax.descriptor", []string{"testdata/Proto2BadSyntax.proto:15: Only proto3 template files are allowed."}},
66 66
 		{"testdata/UnsupportedFieldTypePrimitive.descriptor", []string{"unsupported type for field 'o'. " +
67 67
 			"Supported types are 'istio.policy.v1beta1.Value, string, int64, double, bool, other messages " +
68 68
 			"defined within the same package, map<string, any of the listed supported types>"}},
69 69
 		{"testdata/UnsupportedMapKey.descriptor", []string{"unsupported type for field 'o'."}},
70 70
 		{"testdata/UnsupportedMapVal.descriptor", []string{"unsupported type for field 'o'."}},
71 71
 		{"testdata/UnsupportedFieldTypeEnum.descriptor", []string{"unsupported type for field 'o'."}},
72
-		{"testdata/WrongPkgName.descriptor", []string{"WrongPkgName.proto:2: the last segment of package " +
72
+		{"testdata/WrongPkgName.descriptor", []string{"testdata/WrongPkgName.proto:16: the last segment of package " +
73 73
 			"name 'foo.badStrNumbersNotAllowed123' must match the regex '^[a-zA-Z]+$'"}},
74
-		{"testdata/UnsupportedValueTypeInAPA.descriptor", []string{"testdata/UnsupportedValueTypeInAPA.proto:12: " +
74
+		{"testdata/UnsupportedValueTypeInAPA.descriptor", []string{"testdata/UnsupportedValueTypeInAPA.proto:26: " +
75 75
 			"unsupported type for field 'o'. Supported types are 'string, int64, double, bool, other messages defined " +
76 76
 			"within the same package, map<string, any of the listed supported types>'.",
77 77
 			"testdata/UnsupportedValueTypeInAPA.proto: message 'OutputTemplate' not defined."}},

BIN
mixer/tools/codegen/pkg/modelgen/testdata/BadExplicitTemplateName.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/BasicTopLevelFields.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/ExplicitTemplateName.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/MissingBothRequiredExt.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/MissingPackageName.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/MissingTemplateMessage.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/MissingTemplateVarietyExt.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/Proto2BadSyntax.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/ReservedFieldInTemplate.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/SimpleApaTemplate.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/SimpleTemplate.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/UnsupportedFieldTypeEnum.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/UnsupportedFieldTypeMessage.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/UnsupportedFieldTypePrimitive.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/UnsupportedMapKey.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/UnsupportedMapVal.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/UnsupportedTypeInAPAOutTemplate.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/UnsupportedValueTypeInAPA.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/WrongPkgName.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/multiFile.descriptor View File


BIN
mixer/tools/codegen/pkg/modelgen/testdata/twoTemplatesError.descriptor View File


BIN
mixer/tools/mixgen/cmd/testdata/apa/template.descriptor View File


BIN
mixer/tools/mixgen/cmd/testdata/check/template.descriptor View File


BIN
mixer/tools/mixgen/cmd/testdata/error/template.descriptor View File


BIN
mixer/tools/mixgen/cmd/testdata/quota/template.descriptor View File


BIN
mixer/tools/mixgen/cmd/testdata/report/template.descriptor View File


+ 1
- 1
pilot/pkg/model/config.go View File

@@ -192,7 +192,7 @@ type ConfigStoreCache interface {
192 192
 // IstioConfigStore is a specialized interface to access config store using
193 193
 // Istio configuration types
194 194
 // nolint
195
-//go:generate $GOPATH/src/istio.io/istio/bin/counterfeiter.sh -o $GOPATH/src/istio.io/istio/pilot/pkg/networking/core/v1alpha3/fakes/fake_istio_config_store.go --fake-name IstioConfigStore . IstioConfigStore
195
+//go:generate $GOPATH/src/istio.io/istio/bin/counterfeiter.sh -o $GOPATH/src/istio.io/istio/pilot/pkg/networking/core/v1alpha3/fakes/fake_istio_config_store.gen.go --fake-name IstioConfigStore . IstioConfigStore
196 196
 type IstioConfigStore interface {
197 197
 	ConfigStore
198 198
 

+ 1
- 1
pilot/pkg/model/service.go View File

@@ -374,7 +374,7 @@ type ServiceAttributes struct {
374 374
 
375 375
 // ServiceDiscovery enumerates Istio service instances.
376 376
 // nolint: lll
377
-//go:generate $GOPATH/src/istio.io/istio/bin/counterfeiter.sh -o $GOPATH/src/istio.io/istio/pilot/pkg/networking/core/v1alpha3/fakes/fake_service_discovery.go --fake-name ServiceDiscovery . ServiceDiscovery
377
+//go:generate $GOPATH/src/istio.io/istio/bin/counterfeiter.sh -o $GOPATH/src/istio.io/istio/pilot/pkg/networking/core/v1alpha3/fakes/fake_service_discovery.gen.go --fake-name ServiceDiscovery . ServiceDiscovery
378 378
 type ServiceDiscovery interface {
379 379
 	// Services list declarations of all services in the system
380 380
 	Services() ([]*Service, error)

pilot/pkg/networking/core/v1alpha3/fakes/fake_istio_config_store.go → pilot/pkg/networking/core/v1alpha3/fakes/fake_istio_config_store.gen.go View File

@@ -1,17 +1,3 @@
1
-// Copyright Istio Authors. All Rights Reserved.
2
-//
3
-// Licensed under the Apache License, Version 2.0 (the "License");
4
-// you may not use this file except in compliance with the License.
5
-// You may obtain a copy of the License at
6
-//
7
-//     http://www.apache.org/licenses/LICENSE-2.0
8
-//
9
-// Unless required by applicable law or agreed to in writing, software
10
-// distributed under the License is distributed on an "AS IS" BASIS,
11
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
-// See the License for the specific language governing permissions and
13
-// limitations under the License.
14
-
15 1
 // Code generated by counterfeiter. DO NOT EDIT.
16 2
 package fakes
17 3
 

pilot/pkg/networking/core/v1alpha3/fakes/fake_service_discovery.go → pilot/pkg/networking/core/v1alpha3/fakes/fake_service_discovery.gen.go View File

@@ -1,17 +1,3 @@
1
-// Copyright Istio Authors. All Rights Reserved.
2
-//
3
-// Licensed under the Apache License, Version 2.0 (the "License");
4
-// you may not use this file except in compliance with the License.
5
-// You may obtain a copy of the License at
6
-//
7
-//     http://www.apache.org/licenses/LICENSE-2.0
8
-//
9
-// Unless required by applicable law or agreed to in writing, software
10
-// distributed under the License is distributed on an "AS IS" BASIS,
11
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
-// See the License for the specific language governing permissions and
13
-// limitations under the License.
14
-
15 1
 // Code generated by counterfeiter. DO NOT EDIT.
16 2
 package fakes
17 3
 

+ 141
- 141
pkg/config/schemas/schemagen/schemas.yaml View File

@@ -1,149 +1,149 @@
1 1
 # TODO: We should be obtaining this metadata directly from the api repository.
2 2
 schemas:
3 3
 
4
-  - type:          "virtual-service"
5
-    plural:        "virtual-services"
6
-    group:         "networking"
7
-    version:       "v1alpha3"
8
-    messageName:   "istio.networking.v1alpha3.VirtualService"
9
-    collection:    "istio/networking/v1alpha3/virtualservices"
10
-    description:   "describes v1alpha3 route rules"
11
-
12
-  - type:          "gateway"
13
-    plural:        "gateways"
14
-    group:         "networking"
15
-    version:       "v1alpha3"
16
-    messageName:   "istio.networking.v1alpha3.Gateway"
17
-    collection:    "istio/networking/v1alpha3/gateways"
18
-    description:   "describes a gateway (how a proxy is exposed on the network)"
19
-
20
-  - type:          "service-entry"
21
-    plural:        "service-entries"
22
-    group:         "networking"
23
-    version:       "v1alpha3"
24
-    messageName:   "istio.networking.v1alpha3.ServiceEntry"
25
-    collection:    "istio/networking/v1alpha3/serviceentries"
26
-    description:   "describes service entries"
27
-
28
-  - type:          "destination-rule"
29
-    plural:        "destination-rules"
30
-    group:         "networking"
31
-    version:       "v1alpha3"
32
-    messageName:   "istio.networking.v1alpha3.DestinationRule"
33
-    collection:    "istio/networking/v1alpha3/destinationrules"
34
-    description:   "describes destination rules"
35
-
36
-  - type:          "envoy-filter"
37
-    plural:        "envoy-filters"
38
-    group:         "networking"
39
-    version:       "v1alpha3"
40
-    messageName:   "istio.networking.v1alpha3.EnvoyFilter"
41
-    collection:    "istio/networking/v1alpha3/envoyfilters"
42
-    description:   "describes additional envoy filters to be inserted by Pilot"
43
-
44
-  - type:          "sidecar"
45
-    plural:        "sidecars"
46
-    group:         "networking"
47
-    version:       "v1alpha3"
48
-    messageName:   "istio.networking.v1alpha3.Sidecar"
49
-    collection:    "istio/networking/v1alpha3/sidecars"
50
-    description:   "describes the listeners associated with sidecars in a namespace"
51
-
52
-  - type:          "http-api-spec"
53
-    plural:        "http-api-specs"
54
-    group:         "config"
55
-    version:       "v1alpha2"
56
-    messageName:   "istio.mixer.v1.config.client.HTTPAPISpec"
57
-    collection:    "istio/config/v1alpha2/httpapispecs"
58
-    variableName:  "HTTPAPISpec"
59
-    description:   "describes an HTTP API specification."
60
-
61
-  - type:          "http-api-spec-binding"
62
-    plural:        "http-api-spec-bindings"
63
-    group:         "config"
64
-    version:       "v1alpha2"
65
-    messageName:   "istio.mixer.v1.config.client.HTTPAPISpecBinding"
66
-    collection:    "istio/config/v1alpha2/httpapispecbindings"
67
-    variableName:  "HTTPAPISpecBinding"
68
-    description:   "describes an HTTP API specification binding."
69
-
70
-  - type:          "quota-spec"
71
-    plural:        "quota-specs"
72
-    group:         "config"
73
-    version:       "v1alpha2"
74
-    messageName:   "istio.mixer.v1.config.client.QuotaSpec"
75
-    collection:    "istio/mixer/v1/config/client/quotaspecs"
76
-    description:   "describes an Quota specification."
77
-
78
-  - type:          "quota-spec-binding"
79
-    plural:        "quota-spec-bindings"
80
-    group:         "config"
81
-    version:       "v1alpha2"
82
-    messageName:   "istio.mixer.v1.config.client.QuotaSpecBinding"
83
-    collection:    "istio/mixer/v1/config/client/quotaspecbindings"
84
-    description:   "describes an Quota specification binding."
85
-
86
-  - type:          "policy"
87
-    plural:        "policies"
88
-    group:         "authentication"
89
-    version:       "v1alpha1"
90
-    messageName:   "istio.authentication.v1alpha1.Policy"
91
-    converter:     "auth-policy-resource"
92
-    collection:    "istio/authentication/v1alpha1/policies"
93
-    variableName:  "AuthenticationPolicy"
94
-    description:   "describes an authentication policy."
95
-
96
-  - type:          "mesh-policy"
97
-    plural:        "mesh-policies"
98
-    group:         "authentication"
99
-    version:       "v1alpha1"
100
-    messageName:   "istio.authentication.v1alpha1.Policy"
101
-    converter:     "auth-policy-resource"
102
-    collection:    "istio/authentication/v1alpha1/meshpolicies"
4
+  - type: "virtual-service"
5
+    plural: "virtual-services"
6
+    group: "networking"
7
+    version: "v1alpha3"
8
+    messageName: "istio.networking.v1alpha3.VirtualService"
9
+    collection: "istio/networking/v1alpha3/virtualservices"
10
+    description: "describes v1alpha3 route rules"
11
+
12
+  - type: "gateway"
13
+    plural: "gateways"
14
+    group: "networking"
15
+    version: "v1alpha3"
16
+    messageName: "istio.networking.v1alpha3.Gateway"
17
+    collection: "istio/networking/v1alpha3/gateways"
18
+    description: "describes a gateway (how a proxy is exposed on the network)"
19
+
20
+  - type: "service-entry"
21
+    plural: "service-entries"
22
+    group: "networking"
23
+    version: "v1alpha3"
24
+    messageName: "istio.networking.v1alpha3.ServiceEntry"
25
+    collection: "istio/networking/v1alpha3/serviceentries"
26
+    description: "describes service entries"
27
+
28
+  - type: "destination-rule"
29
+    plural: "destination-rules"
30
+    group: "networking"
31
+    version: "v1alpha3"
32
+    messageName: "istio.networking.v1alpha3.DestinationRule"
33
+    collection: "istio/networking/v1alpha3/destinationrules"
34
+    description: "describes destination rules"
35
+
36
+  - type: "envoy-filter"
37
+    plural: "envoy-filters"
38
+    group: "networking"
39
+    version: "v1alpha3"
40
+    messageName: "istio.networking.v1alpha3.EnvoyFilter"
41
+    collection: "istio/networking/v1alpha3/envoyfilters"
42
+    description: "describes additional envoy filters to be inserted by Pilot"
43
+
44
+  - type: "sidecar"
45
+    plural: "sidecars"
46
+    group: "networking"
47
+    version: "v1alpha3"
48
+    messageName: "istio.networking.v1alpha3.Sidecar"
49
+    collection: "istio/networking/v1alpha3/sidecars"
50
+    description: "describes the listeners associated with sidecars in a namespace"
51
+
52
+  - type: "http-api-spec"
53
+    plural: "http-api-specs"
54
+    group: "config"
55
+    version: "v1alpha2"
56
+    messageName: "istio.mixer.v1.config.client.HTTPAPISpec"
57
+    collection: "istio/config/v1alpha2/httpapispecs"
58
+    variableName: "HTTPAPISpec"
59
+    description: "describes an HTTP API specification."
60
+
61
+  - type: "http-api-spec-binding"
62
+    plural: "http-api-spec-bindings"
63
+    group: "config"
64
+    version: "v1alpha2"
65
+    messageName: "istio.mixer.v1.config.client.HTTPAPISpecBinding"
66
+    collection: "istio/config/v1alpha2/httpapispecbindings"
67
+    variableName: "HTTPAPISpecBinding"
68
+    description: "describes an HTTP API specification binding."
69
+
70
+  - type: "quota-spec"
71
+    plural: "quota-specs"
72
+    group: "config"
73
+    version: "v1alpha2"
74
+    messageName: "istio.mixer.v1.config.client.QuotaSpec"
75
+    collection: "istio/mixer/v1/config/client/quotaspecs"
76
+    description: "describes an Quota specification."
77
+
78
+  - type: "quota-spec-binding"
79
+    plural: "quota-spec-bindings"
80
+    group: "config"
81
+    version: "v1alpha2"
82
+    messageName: "istio.mixer.v1.config.client.QuotaSpecBinding"
83
+    collection: "istio/mixer/v1/config/client/quotaspecbindings"
84
+    description: "describes an Quota specification binding."
85
+
86
+  - type: "policy"
87
+    plural: "policies"
88
+    group: "authentication"
89
+    version: "v1alpha1"
90
+    messageName: "istio.authentication.v1alpha1.Policy"
91
+    converter: "auth-policy-resource"
92
+    collection: "istio/authentication/v1alpha1/policies"
93
+    variableName: "AuthenticationPolicy"
94
+    description: "describes an authentication policy."
95
+
96
+  - type: "mesh-policy"
97
+    plural: "mesh-policies"
98
+    group: "authentication"
99
+    version: "v1alpha1"
100
+    messageName: "istio.authentication.v1alpha1.Policy"
101
+    converter: "auth-policy-resource"
102
+    collection: "istio/authentication/v1alpha1/meshpolicies"
103 103
     clusterScoped: true
104
-    variableName:  "AuthenticationMeshPolicy"
105
-    validate:      "ValidateAuthenticationPolicy"
106
-    description:   "describes an authentication policy at mesh level."
107
-
108
-  - type:          "service-role"
109
-    plural:        "service-roles"
110
-    group:         "rbac"
111
-    version:       "v1alpha1"
112
-    messageName:   "istio.rbac.v1alpha1.ServiceRole"
113
-    collection:    "istio/rbac/v1alpha1/serviceroles"
114
-    description:   "describes an RBAC service role."
115
-
116
-  - type:          "service-role-binding"
117
-    plural:        "service-role-bindings"
118
-    group:         "rbac"
119
-    version:       "v1alpha1"
120
-    messageName:   "istio.rbac.v1alpha1.ServiceRoleBinding"
121
-    collection:    "istio/rbac/v1alpha1/servicerolebindings"
122
-    description:   "describes an RBAC service role."
123
-
124
-  - type:          "rbac-config"
125
-    plural:        "rbac-configs"
126
-    group:         "rbac"
127
-    version:       "v1alpha1"
128
-    messageName:   "istio.rbac.v1alpha1.RbacConfig"
129
-    collection:    "istio/rbac/v1alpha1/rbacconfigs"
130
-    description:   "describes the mesh level RBAC config.\n
104
+    variableName: "AuthenticationMeshPolicy"
105
+    validate: "ValidateAuthenticationPolicy"
106
+    description: "describes an authentication policy at mesh level."
107
+
108
+  - type: "service-role"
109
+    plural: "service-roles"
110
+    group: "rbac"
111
+    version: "v1alpha1"
112
+    messageName: "istio.rbac.v1alpha1.ServiceRole"
113
+    collection: "istio/rbac/v1alpha1/serviceroles"
114
+    description: "describes an RBAC service role."
115
+
116
+  - type: "service-role-binding"
117
+    plural: "service-role-bindings"
118
+    group: "rbac"
119
+    version: "v1alpha1"
120
+    messageName: "istio.rbac.v1alpha1.ServiceRoleBinding"
121
+    collection: "istio/rbac/v1alpha1/servicerolebindings"
122
+    description: "describes an RBAC service role."
123
+
124
+  - type: "rbac-config"
125
+    plural: "rbac-configs"
126
+    group: "rbac"
127
+    version: "v1alpha1"
128
+    messageName: "istio.rbac.v1alpha1.RbacConfig"
129
+    collection: "istio/rbac/v1alpha1/rbacconfigs"
130
+    description: "describes the mesh level RBAC config.\n
131 131
                    Deprecated: use ClusterRbacConfig instead.\n
132 132
                    See https://github.com/istio/istio/issues/8825 for more details."
133 133
 
134
-  - type:          "cluster-rbac-config"
135
-    plural:        "clusterrbacconfigs"
136
-    group:         "rbac"
137
-    version:       "v1alpha1"
138
-    messageName:   "istio.rbac.v1alpha1.RbacConfig"
139
-    collection:    "istio/rbac/v1alpha1/clusterrbacconfigs"
134
+  - type: "cluster-rbac-config"
135
+    plural: "clusterrbacconfigs"
136
+    group: "rbac"
137
+    version: "v1alpha1"
138
+    messageName: "istio.rbac.v1alpha1.RbacConfig"
139
+    collection: "istio/rbac/v1alpha1/clusterrbacconfigs"
140 140
     clusterScoped: true
141
-    description:   "describes the cluster level RBAC config."
142
-
143
-  - type:          "authorization-policy"
144
-    plural:        "authorizationpolicies"
145
-    group:         "security"
146
-    version:       "v1beta1"
147
-    messageName:   "istio.security.v1beta1.AuthorizationPolicy"
148
-    collection:    "istio/security/v1beta1/authorizationpolicies"
149
-    description:   "describes the authorization policy."
141
+    description: "describes the cluster level RBAC config."
142
+
143
+  - type: "authorization-policy"
144
+    plural: "authorizationpolicies"
145
+    group: "security"
146
+    version: "v1beta1"
147
+    messageName: "istio.security.v1beta1.AuthorizationPolicy"
148
+    collection: "istio/security/v1beta1/authorizationpolicies"
149
+    description: "describes the authorization policy."

Loading…
Cancel
Save