Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions internal/testutils/xds/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ type Options struct {
NodeID string
// ServerURI is the address of the management server.
ServerURI string
// IgnoreResourceDeletion, if true, results in a bootstrap config with the
// `server_features` list containing `ignore_resource_deletion`. This results
// in gRPC ignoring resource deletions from the management server, as per A53.
IgnoreResourceDeletion bool
// ClientDefaultListenerResourceNameTemplate is the default listener
// resource name template to be used on the gRPC client.
ClientDefaultListenerResourceNameTemplate string
Expand Down Expand Up @@ -108,6 +112,9 @@ func Contents(opts Options) ([]byte, error) {
ServerListenerResourceNameTemplate: opts.ServerListenerResourceNameTemplate,
}
cfg.XdsServers[0].ServerFeatures = append(cfg.XdsServers[0].ServerFeatures, "xds_v3")
if opts.IgnoreResourceDeletion {
cfg.XdsServers[0].ServerFeatures = append(cfg.XdsServers[0].ServerFeatures, "ignore_resource_deletion")
}

auths := make(map[string]authority)
if envconfig.XDSFederation {
Expand Down
6 changes: 6 additions & 0 deletions internal/testutils/xds/e2e/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ type ManagementServerOptions struct {
// set to true only for tests which explicitly require the other behavior.
AllowResourceSubset bool

// ServerFeaturesIgnoreResourceDeletion, if set, results in a bootstrap config
// where the server features list contains `ignore_resource_deletion`. This
// results in gRPC ignoring resource deletions from the management server, as
// per A53.
ServerFeaturesIgnoreResourceDeletion bool

// The callbacks defined below correspond to the state of the world (sotw)
// version of the xDS API on the management server.

Expand Down
Loading