# Attempt to use all possible fields in DestinationRule
apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: destall
  namespace: testns
spec:
   hosts:
   - destall.default.svc.cluster.local
   ports:
   - number: 81
     name: http
     protocol: HTTP
   resolution: STATIC
   endpoints:
    - address: 127.0.0.2
      ports:
        http: 7072
---
apiVersion: networking.istio.io/v1
kind: DestinationRule
metadata:
  name: destall
  namespace: testns
spec:
  # DNS name, prefix wildcard, short name relative to context
  # IP or CIDR only for services in gateways
  host: destall.default.svc.cluster.local
  trafficPolicy:
    loadBalancer:
      simple: ROUND_ROBIN
    connectionPool:
      tcp:
        maxConnections: 99
        connectTimeout: 6s
      http:
        http2MaxRequests: 33
        maxRequestsPerConnection: 65
        maxRetries: 4
        http1MaxPendingRequests: 14
    outlierDetection:
        interval: 8ms
        baseEjectionTime: 1m
        maxEjectionPercent: 11
    tls:
      mode: DISABLE
  subsets:
    - name: v1
      labels:
        version: v1
    - name: v2
      labels:
        version: v2
      trafficPolicy:
        loadBalancer:
          consistentHash:
            httpCookie:
              name: Cookie
              ttl: 30s
            minimumRingSize: 42

---
