Skip to content

Commit fd4f189

Browse files
authored
Create a new class XdsAttributes in xds to house XDS related attributes and define ATTR_SDS_CONFIG there (grpc#6154)
Need to define a new attribute so we can plumb SdsSecretConfig from the xDS LB to SSL code so the value can be passed on to the SDS module.
1 parent df4da6b commit fd4f189

File tree

3 files changed

+444
-0
lines changed

3 files changed

+444
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright 2019 The gRPC Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package io.grpc.xds;
18+
19+
import io.envoyproxy.envoy.api.v2.auth.SdsSecretConfig;
20+
import io.grpc.Attributes;
21+
import io.grpc.Grpc;
22+
23+
/**
24+
* Special attributes that are only useful to gRPC in the XDS context
25+
*/
26+
final class XdsAttributes {
27+
/**
28+
* Attribute key for SdsSecretConfig of a subchannel.
29+
*
30+
*/
31+
@Grpc.TransportAttr
32+
public static final Attributes.Key<SdsSecretConfig> ATTR_SDS_CONFIG =
33+
Attributes.Key.create("io.grpc.xds.XdsAttributes.sdsSecretConfig");
34+
35+
private XdsAttributes() {}
36+
}

xds/third_party/envoy/import.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ GIT_BASE_DIR=envoy
2424
SOURCE_PROTO_BASE_DIR=envoy/api
2525
TARGET_PROTO_BASE_DIR=src/main/proto
2626
FILES=(
27+
envoy/api/v2/auth/cert.proto
2728
envoy/api/v2/core/address.proto
2829
envoy/api/v2/core/base.proto
2930
envoy/api/v2/core/config_source.proto

0 commit comments

Comments
 (0)