Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for atMostNJoin (0.15 sec)

  1. pilot/pkg/xds/util.go

    // See the License for the specific language governing permissions and
    // limitations under the License.
    
    package xds
    
    import (
    	"fmt"
    	"strings"
    )
    
    func atMostNJoin(data []string, limit int) string {
    	if limit == 0 || limit == 1 {
    		// Assume limit >1, but make sure we dpn't crash if someone does pass those
    		return strings.Join(data, ", ")
    	}
    	if len(data) == 0 {
    		return ""
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 12 18:20:36 UTC 2024
    - 1021 bytes
    - Viewed (0)
  2. pilot/pkg/xds/util_test.go

    			0,
    			"a, b, c",
    		},
    		{
    			[]string{},
    			3,
    			"",
    		},
    	}
    	for _, tt := range tests {
    		t.Run(fmt.Sprintf("%s-%d", strings.Join(tt.data, "-"), tt.limit), func(t *testing.T) {
    			if got := atMostNJoin(tt.data, tt.limit); got != tt.want {
    				t.Errorf("got %v, want %v", got, tt.want)
    			}
    		})
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 12 18:20:36 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  3. pilot/pkg/xds/sds.go

    		if errMessage == nil {
    			errMessage = fmt.Errorf("cross namespace secret reference requires ReferencePolicy")
    		}
    		log.Warnf("proxy %s attempted to access unauthorized certificates %s: %v", proxy.ID, atMostNJoin(deniedResources, 3), errMessage)
    		pilotSDSCertificateErrors.Increment()
    	}
    
    	return allowedResources
    }
    
    func toEnvoyCaSecret(name string, certInfo *credscontroller.CertInfo) *discovery.Resource {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 15 23:04:36 UTC 2024
    - 15.8K bytes
    - Viewed (0)
Back to top