Class: Google::Cloud::NetworkServices::V1::EndpointMatcher

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/networkservices/v1/common.rb

Overview

A definition of a matcher that selects endpoints to which the policies should be applied.

Defined Under Namespace

Classes: MetadataLabelMatcher

Instance Attribute Summary collapse

Instance Attribute Details

#metadata_label_matcher::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher

Returns The matcher is based on node metadata presented by xDS clients.

Returns:



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'proto_docs/google/cloud/networkservices/v1/common.rb', line 72

class EndpointMatcher
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The matcher that is based on node metadata presented by xDS clients.
  # @!attribute [rw] metadata_label_match_criteria
  #   @return [::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabelMatchCriteria]
  #     Specifies how matching should be done.
  #
  #     Supported values are:
  #     MATCH_ANY: At least one of the Labels specified in the
  #       matcher should match the metadata presented by xDS client.
  #     MATCH_ALL: The metadata presented by the xDS client should
  #       contain all of the labels specified here.
  #
  #     The selection is determined based on the best match. For
  #     example, suppose there are three EndpointPolicy
  #     resources P1, P2 and P3 and if P1 has a the matcher as
  #     MATCH_ANY <A:1, B:1>, P2 has MATCH_ALL <A:1,B:1>, and P3 has
  #     MATCH_ALL <A:1,B:1,C:1>.
  #
  #     If a client with label <A:1> connects, the config from P1
  #     will be selected.
  #
  #     If a client with label <A:1,B:1> connects, the config from P2
  #     will be selected.
  #
  #     If a client with label <A:1,B:1,C:1> connects, the config
  #     from P3 will be selected.
  #
  #     If there is more than one best match, (for example, if a
  #     config P4 with selector <A:1,D:1> exists and if a client with
  #     label <A:1,B:1,D:1> connects), an error will be thrown.
  # @!attribute [rw] metadata_labels
  #   @return [::Array<::Google::Cloud::NetworkServices::V1::EndpointMatcher::MetadataLabelMatcher::MetadataLabels>]
  #     The list of label value pairs that must match labels in the
  #     provided metadata based on filterMatchCriteria This list can
  #     have at most 64 entries. The list can be empty if the match
  #     criteria is MATCH_ANY, to specify a wildcard match (i.e this
  #     matches any client).
  class MetadataLabelMatcher
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Defines a name-pair value for a single label.
    # @!attribute [rw] label_name
    #   @return [::String]
    #     Required. Label name presented as key in xDS Node Metadata.
    # @!attribute [rw] label_value
    #   @return [::String]
    #     Required. Label value presented as value corresponding to the above
    #     key, in xDS Node Metadata.
    class MetadataLabels
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Possible criteria values that define logic of how matching is made.
    module MetadataLabelMatchCriteria
      # Default value. Should not be used.
      METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED = 0

      # At least one of the Labels specified in the matcher should match the
      # metadata presented by xDS client.
      MATCH_ANY = 1

      # The metadata presented by the xDS client should contain all of the
      # labels specified here.
      MATCH_ALL = 2
    end
  end
end