Skip to content

Commit fe3f156

Browse files
author
Jianfei Hu
committed
2 parents a2a7744 + 010d5c2 commit fe3f156

File tree

303 files changed

+18232
-19217
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

303 files changed

+18232
-19217
lines changed

Gopkg.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ ignored = [
111111

112112
[[constraint]]
113113
name = "github.com/envoyproxy/go-control-plane"
114-
version = "^0.6.3"
114+
version = "^0.6.7"
115115

116116
[[constraint]]
117117
name = "github.com/fluent/fluent-logger-golang"
@@ -209,10 +209,6 @@ ignored = [
209209
name = "github.com/opentracing/opentracing-go"
210210
version = "1.0.2"
211211

212-
[[constraint]]
213-
name = "github.com/pborman/uuid"
214-
version = "1.1.0"
215-
216212
[[constraint]]
217213
name = "github.com/pmezard/go-difflib"
218214
version = "1.0.0"

bin/codecov_diff.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ if [[ -n "${CIRCLE_PR_NUMBER:-}" ]]; then
6565
go test -v istio.io/istio/tests/codecov/... \
6666
--report_file="${REPORT_PATH}/coverage.html" \
6767
--baseline_file="${BASELINE_PATH}/coverage.html" \
68-
--threshold_file="${THRESHOLD_FILE}" \
68+
--threshold_files="${THRESHOLD_FILE},${CODECOV_SKIP}" \
6969
| tee "${GOPATH}"/out/codecov/out.log \
7070
| tee >(go-junit-report > "${GOPATH}"/out/tests/junit.xml)
7171
else

codecov.skip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
istio.io/istio/galley/pkg/testing
12
istio.io/istio/mixer/pkg/adapter/test
23
istio.io/istio/mixer/pkg/config/storetest
34
istio.io/istio/mixer/pkg/mockapi

codecov.threshold

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# This overrides the default threshold used by the circle codecov job to prevent
2-
# unexpected drop of code coverage.
2+
# unexpected drop of code coverage. And this supplements the packages specified
3+
# in codecov.skip.
34
#
45
# This is useful to temporarily whitelist the packages that have either non
56
# deterministic code path. (E.g. test may retry on failure. Some paths may not
@@ -11,23 +12,26 @@
1112
# are made deteministic.
1213
#
1314
# Format:
14-
# <package or filename>=<threshold in float64>
15+
# <package or filename>{=<threshold in float64>}
1516
#
17+
# If threshold is not specified, codecov check will be skipped for the package
18+
# or go file.
19+
1620
# Istio wide default
1721
istio.io=5
22+
1823
# Overrides
1924
istio.io/istio/mixer/adapter/solarwinds/internal/papertrail/papertrail_logger.go=50
2025
istio.io/istio/pilot/pkg/config/memory/monitor.go=30
2126
istio.io/istio/pilot/pkg/proxy/envoy/v2=10
2227
istio.io/istio/pilot/pkg/serviceregistry/consul/monitor.go=20
2328
istio.io/istio/pkg/mcp/creds/watcher.go=100
29+
istio.io/istio/pkg/mcp/source/source.go=90
2430
istio.io/istio/security/pkg/nodeagent=15
2531

2632
# Disable codecov check for testing and proto packages
27-
istio.io/istio/galley/pkg/testing=100 istio.io/istio/galley/pkg/testing=100
28-
istio.io/istio/pkg/test=100
2933
istio.io/istio/security/proto=100
30-
istio.io/istio/tests=100
34+
istio.io/istio/tests
3135

3236
# Temporary until integ tests are restored
3337
istio.io/istio/pilot/pkg/networking/plugin=50

galley/pkg/metadata/kube/types.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -336,28 +336,6 @@ func init() {
336336
Converter: converter.Get("identity"),
337337
})
338338

339-
b.Add(schema.ResourceSpec{
340-
Kind: "servicecontrolreport",
341-
ListKind: "servicecontrolreportList",
342-
Singular: "servicecontrolreport",
343-
Plural: "servicecontrolreports",
344-
Version: "v1alpha2",
345-
Group: "config.istio.io",
346-
Target: metadata.Types.Get("istio/config/v1alpha2/legacy/servicecontrolreports"),
347-
Converter: converter.Get("identity"),
348-
})
349-
350-
b.Add(schema.ResourceSpec{
351-
Kind: "servicecontrol",
352-
ListKind: "servicecontrolList",
353-
Singular: "servicecontrol",
354-
Plural: "servicecontrols",
355-
Version: "v1alpha2",
356-
Group: "config.istio.io",
357-
Target: metadata.Types.Get("istio/config/v1alpha2/legacy/servicecontrols"),
358-
Converter: converter.Get("identity"),
359-
})
360-
361339
b.Add(schema.ResourceSpec{
362340
Kind: "signalfx",
363341
ListKind: "signalfxList",

galley/pkg/metadata/types.go

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,6 @@ var (
127127
// Reportnothing metadata
128128
Reportnothing resource.Info
129129

130-
// Servicecontrolreport metadata
131-
Servicecontrolreport resource.Info
132-
133-
// Servicecontrol metadata
134-
Servicecontrol resource.Info
135-
136130
// Signalfx metadata
137131
Signalfx resource.Info
138132

@@ -308,12 +302,6 @@ func init() {
308302
Reportnothing = b.Register(
309303
"istio/config/v1alpha2/legacy/reportnothings",
310304
"type.googleapis.com/type.googleapis.com/google.protobuf.Struct")
311-
Servicecontrolreport = b.Register(
312-
"istio/config/v1alpha2/legacy/servicecontrolreports",
313-
"type.googleapis.com/type.googleapis.com/google.protobuf.Struct")
314-
Servicecontrol = b.Register(
315-
"istio/config/v1alpha2/legacy/servicecontrols",
316-
"type.googleapis.com/type.googleapis.com/google.protobuf.Struct")
317305
Signalfx = b.Register(
318306
"istio/config/v1alpha2/legacy/signalfxs",
319307
"type.googleapis.com/type.googleapis.com/google.protobuf.Struct")
@@ -391,7 +379,7 @@ func init() {
391379
"type.googleapis.com/k8s.io.api.core.v1.NodeSpec")
392380
Pod = b.Register(
393381
"k8s/core/v1/pods",
394-
"type.googleapis.com/k8s.io.api.core.v1.PodSpec")
382+
"type.googleapis.com/k8s.io.api.core.v1.Pod")
395383
Service = b.Register(
396384
"k8s/core/v1/services",
397385
"type.googleapis.com/k8s.io.api.core.v1.ServiceSpec")

galley/pkg/server/server.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ type Server struct {
5454
grpcServer *grpc.Server
5555
processor *runtime.Processor
5656
mcp *server.Server
57+
mcpSource *source.Server
5758
reporter monitoring.Reporter
5859
listener net.Listener
5960
controlZ *ctrlz.Server
@@ -171,6 +172,9 @@ func newServer(a *Args, p patchTable) (*Server, error) {
171172

172173
s.mcp = server.New(options, checker)
173174

175+
serverOptions := &source.ServerOptions{AuthChecker: checker}
176+
s.mcpSource = source.NewServer(options, serverOptions)
177+
174178
// get the network stuff setup
175179
network := "tcp"
176180
var address string
@@ -187,6 +191,7 @@ func newServer(a *Args, p patchTable) (*Server, error) {
187191
}
188192

189193
mcp.RegisterAggregatedMeshConfigServiceServer(s.grpcServer, s.mcp)
194+
mcp.RegisterResourceSourceServer(s.grpcServer, s.mcpSource)
190195

191196
s.controlZ, _ = ctrlz.Run(a.IntrospectionOptions, nil)
192197

galley/pkg/source/kube/builtin/source_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ func TestPods(t *testing.T) {
251251
if pod, err = client.CoreV1().Pods(namespace).Create(pod); err != nil {
252252
t.Fatalf("failed creating pod: %v", err)
253253
}
254-
expected := toEvent(resource.Added, spec, pod, &pod.Spec)
254+
expected := toEvent(resource.Added, spec, pod, pod)
255255
actual := events.Expect(t, ch)
256256
g.Expect(actual).To(Equal(expected))
257257
})
@@ -264,7 +264,7 @@ func TestPods(t *testing.T) {
264264
if _, err := client.CoreV1().Pods(namespace).Update(pod); err != nil {
265265
t.Fatalf("failed updating pod: %v", err)
266266
}
267-
expected := toEvent(resource.Updated, spec, pod, &pod.Spec)
267+
expected := toEvent(resource.Updated, spec, pod, pod)
268268
actual := events.Expect(t, ch)
269269
g.Expect(actual).To(Equal(expected))
270270
})

galley/pkg/source/kube/builtin/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ var (
102102
},
103103
extractResource: func(o interface{}) proto.Message {
104104
if obj, ok := o.(*v1.Pod); ok {
105-
return &obj.Spec
105+
return obj
106106
}
107107
return nil
108108
},

0 commit comments

Comments
 (0)