|
| 1 | +### Configuration Variables |
| 2 | +AWS Gateway API Controller for VPC Lattice supports a number of configuration options, which are set through environment variables. |
| 3 | +The following environment variables are available, and all of them are optional. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +#### `CLUSTER_VPC_ID` |
| 8 | + |
| 9 | +Type: string |
| 10 | + |
| 11 | +Default: "" |
| 12 | + |
| 13 | +When running AWS Gateway API Controller outside the Kubernetes Cluster, this specify the VPC of the cluster. |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +#### `AWS_ACCOUNT_ID` |
| 18 | + |
| 19 | +Type: string |
| 20 | + |
| 21 | +Default: "" |
| 22 | + |
| 23 | +When running AWS Gateway API Controller outside the Kubernetes Cluster, this specify the AWS account. |
| 24 | + |
| 25 | +--- |
| 26 | + |
| 27 | +#### `REGION` |
| 28 | + |
| 29 | +Type: string |
| 30 | + |
| 31 | +Default: "us-west-2" |
| 32 | + |
| 33 | +When running AWS Gateway API Controller outside the Kubernetes Cluster, this specify the region of VPC lattice service endpoint |
| 34 | + |
| 35 | +--- |
| 36 | + |
| 37 | +#### `GATEWAY_API_CONTROLLER_LOGLEVEL` |
| 38 | + |
| 39 | +Type: string |
| 40 | + |
| 41 | +Default: "info" |
| 42 | + |
| 43 | +When it is set as "debug", the AWS Gateway API Controller prints detailed debugging information. Otherwise, it is only prints the key information |
| 44 | + |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +#### `CLUSTER_LOCAL_GATEWAY` |
| 49 | + |
| 50 | +Type: string |
| 51 | + |
| 52 | +Default: "NO_DEFAULT_SERVICE_NETWORK" |
| 53 | + |
| 54 | +When it is set to something different than "NO_DEFAULT_SERVICE_NETWORK", the AWS Gateway API Controller will associate its correspoding Lattice Service Network to cluster's VPC. Also, all HTTPRoutes will automatically have an additional parentref to this `CLUSTER_LOCAL_GATEWAY` |
| 55 | + |
| 56 | +--- |
| 57 | + |
| 58 | +#### `TARGET_GROUP_NAME_LEN_MODE` |
| 59 | + |
| 60 | +Type: string |
| 61 | + |
| 62 | +Default: "short" |
| 63 | + |
| 64 | +***If it is set to "long"*** |
| 65 | + AWS Gateway API will create Lattice Target Group as follows |
| 66 | + |
| 67 | +for backendRef of a Kubernetes Service: |
| 68 | + |
| 69 | +k8s-(k8s service name)-(k8s service namespace)-(k8s httproute name)-(VPC ID) |
| 70 | + |
| 71 | +for serviceexport of a Kubernetes Servic: |
| 72 | + |
| 73 | +k8s-(k8s service name)-(k8s service namespace)-(VPC-ID) |
| 74 | + |
| 75 | +***By default*** |
| 76 | + AWS Gateway API will create Lattice Target Group as follows |
| 77 | + |
| 78 | +for backendRef of a Kubernetes Service: |
| 79 | + |
| 80 | +k8s-(k8s service name)-(k8s service namespace) |
| 81 | + |
| 82 | +for serviceexport of a Kubernetes Service: |
| 83 | + |
| 84 | +k8s-(k8s service name)-(k8s service namespace) |
| 85 | + |
| 86 | + |
| 87 | +``` |
| 88 | +# for examples/inventory-route.yaml |
| 89 | +apiVersion: gateway.networking.k8s.io/v1beta1 |
| 90 | +kind: HTTPRoute |
| 91 | +metadata: |
| 92 | + name: inventory |
| 93 | +spec: |
| 94 | + parentRefs: |
| 95 | + - name: my-hotel |
| 96 | + sectionName: http |
| 97 | + rules: |
| 98 | + - backendRefs: |
| 99 | + - name: inventory-ver1 |
| 100 | + kind: Service |
| 101 | + port: 8090 |
| 102 | + weight: 10 |
| 103 | +
|
| 104 | + # by default, lattice target group name |
| 105 | + k8s-inventory-ver1-default |
| 106 | +
|
| 107 | +
|
| 108 | + # when TARGET_GROUP_NAME_LEN_MODE = "long", lattice target group name, e.g. |
| 109 | +
|
| 110 | + k8s-inventory-ver1-default-inventory-vpc-05c7322a3df3f255a |
| 111 | +
|
| 112 | +``` |
| 113 | + |
| 114 | +``` |
| 115 | +# for examples/parking-ver2-export.yaml |
| 116 | +apiVersion: multicluster.x-k8s.io/v1alpha1 |
| 117 | +kind: ServiceExport |
| 118 | +metadata: |
| 119 | + name: parking-ver2 |
| 120 | + annotations: |
| 121 | + multicluster.x-k8s.io/federation: "amazon-vpc-lattice" |
| 122 | +
|
| 123 | +# by default, lattice target group name is |
| 124 | +k8s-parking-ver2-default |
| 125 | +
|
| 126 | +# when TARGET_GROUP_NAME_LEN_MODE = "long", lattice target group name, e.g. |
| 127 | +k8s-parking-ver2-default-vpc-05c7322a3df3f255a |
| 128 | +
|
| 129 | +``` |
0 commit comments