func appendSdsSocketCluster()

in agent/envoy_bootstrap/envoy_bootstrap.go [984:1024]


func appendSdsSocketCluster(b *boot.Bootstrap, socketPath string) error {
	bt := &boot.Bootstrap{
		StaticResources: &boot.Bootstrap_StaticResources{
			Clusters: []*cluster.Cluster{
				&cluster.Cluster{
					Name: "static_cluster_sds_unix_socket",
					ConnectTimeout: &durationpb.Duration{
						Seconds: 1,
					},
					Http2ProtocolOptions: &core.Http2ProtocolOptions{},
					ClusterDiscoveryType: &cluster.Cluster_Type{
						Type: cluster.Cluster_STATIC,
					},
					LoadAssignment: &endpoint.ClusterLoadAssignment{
						ClusterName: "static_cluster_sds_unix_socket",
						Endpoints: []*endpoint.LocalityLbEndpoints{
							&endpoint.LocalityLbEndpoints{
								LbEndpoints: []*endpoint.LbEndpoint{
									&endpoint.LbEndpoint{
										HostIdentifier: &endpoint.LbEndpoint_Endpoint{
											Endpoint: &endpoint.Endpoint{
												Address: &core.Address{
													Address: &core.Address_Pipe{
														Pipe: &core.Pipe{
															Path: socketPath,
														},
													},
												},
											},
										},
									},
								},
							},
						},
					},
				},
			},
		},
	}
	return mergeBootstrap(b, bt)
}