...

Text file src/github.com/GoogleCloudPlatform/k8s-config-connector/config/cloudcodesnippets/networkservices_v1beta1_networkserviceshttproute.yaml

Documentation: github.com/GoogleCloudPlatform/k8s-config-connector/config/cloudcodesnippets

     1label: Config Connector NetworkServicesHTTPRoute
     2markdownDescription: Creates yaml for a NetworkServicesHTTPRoute resource
     3insertText: |
     4  apiVersion: networkservices.cnrm.cloud.google.com/v1beta1
     5  kind: NetworkServicesHTTPRoute
     6  metadata:
     7    labels:
     8      \${1:foo}: \${2:bar}
     9    name: \${3:networkserviceshttproute-name}
    10  spec:
    11    description: \${4:A test HttpRoute}
    12    meshes:
    13    - name: \${5:networkserviceshttproute-dep}
    14    gateways:
    15    - name: \${6:networkserviceshttproute-dep}
    16    location: \${7:global}
    17    hostnames:
    18    - \${8:test1}
    19    - \${9:test2}
    20    rules:
    21    - matches:
    22      - fullPathMatch: \${10:/foo/bar}
    23        headers:
    24        - header: \${11:foo-header}
    25          prefixMatch: \${12:bar-value}
    26      - prefixMatch: \${13:/foo/}
    27        ignoreCase: \${14:true}
    28      - regexMatch: \${15:/foo/.*/bar/.*}
    29      - prefixMatch: \${16:/}
    30        headers:
    31        - header: \${17:foo}
    32          exactMatch: \${18:bar}
    33        - header: \${19:foo}
    34          regexMatch: \${20:b.*ar}
    35        - header: \${21:foo}
    36          prefixMatch: \${22:ba}
    37        - header: \${23:foo}
    38          presentMatch: \${24:true}
    39        - header: \${25:foo}
    40          suffixMatch: \${26:ar}
    41        - header: \${27:foo}
    42          rangeMatch:
    43            start: \${28:0}
    44            end: \${29:5}
    45          invertMatch: \${30:true}
    46      - prefixMatch: \${31:/}
    47        queryParameters:
    48        - queryParameter: \${32:foo}
    49          exactMatch: \${33:bar}
    50        - queryParameter: \${34:foo}
    51          regexMatch: \${35:.*bar.*}
    52        - queryParameter: \${36:foo}
    53          presentMatch: \${37:true}
    54      action:
    55        destinations:
    56        - serviceRef:
    57            name: \${38:networkserviceshttproute-dep}
    58          weight: \${39:1}
    59        - serviceRef:
    60            name: \${40:networkserviceshttproute-dep}
    61          weight: \${41:1}
    62        urlRewrite:
    63          pathPrefixRewrite: \${42:foo}
    64          hostRewrite: \${43:foo}
    65        corsPolicy:
    66          allowOrigins:
    67          - \${44:foo.com}
    68          - \${45:bar.com}
    69          allowOriginRegexes:
    70          - \${46:.*.foo.com}
    71          - \${47:.*.bar.com}
    72          allowMethods:
    73          - \${48:GET}
    74          - \${49:POST}
    75          allowHeaders:
    76          - \${50:foo}
    77          - \${51:bar}
    78          exposeHeaders:
    79          - \${52:foo}
    80          - \${53:bar}
    81          maxAge: \${54:35}
    82          allowCredentials: \${55:true}
    83          disabled: \${56:false}
    84        faultInjectionPolicy:
    85          abort:
    86            httpStatus: \${57:501}
    87            percentage: \${58:1}
    88          delay:
    89            fixedDelay: \${59:10s}
    90            percentage: \${60:2}
    91        requestHeaderModifier:
    92          add:
    93            foo1: \${61:bar1}
    94            baz1: \${62:qux1}
    95          set:
    96            foo2: \${63:bar2}
    97            baz2: \${64:qux2}
    98          remove:
    99          - \${65:foo3}
   100          - \${66:bar3}
   101        requestMirrorPolicy:
   102          destination:
   103            serviceRef:
   104              name: \${67:networkserviceshttproute-dep}
   105        responseHeaderModifier:
   106          add:
   107            foo1: \${68:bar1}
   108            baz1: \${69:qux1}
   109          set:
   110            foo2: \${70:bar2}
   111            baz2: \${71:qux2}
   112          remove:
   113          - \${72:foo3}
   114          - \${73:bar3}
   115        retryPolicy:
   116          numRetries: \${74:3}
   117          perTryTimeout: \${75:5s}
   118          retryConditions:
   119          - \${76:refused-stream}
   120          - \${77:cancelled}
   121        timeout: \${78:30s}
   122    - action:
   123        redirect:
   124          hostRedirect: \${79:foo}
   125          responseCode: \${80:MOVED_PERMANENTLY_DEFAULT}
   126          httpsRedirect: \${81:true}
   127          stripQuery: \${82:true}
   128          portRedirect: \${83:7777}
   129    - action:
   130        redirect:
   131          hostRedirect: \${84:test}
   132          prefixRewrite: \${85:foo}
   133          responseCode: \${86:FOUND}
   134    - action:
   135        redirect:
   136          hostRedirect: \${87:test}
   137          pathRedirect: \${88:/foo}
   138          responseCode: \${89:FOUND}
   139    projectRef:
   140      external: \${90:projects/[PROJECT_ID?]}

View as plain text