An opinionated module to deploy Ambassador on GCP, specifically GKE. This might work on self-managed Kubernetes clusters, but it's not tested.
This module makes a set of assumptions:
- Ambassador is deployed behind either an Ingress or
LoadBalancer
- TLS is enabled
If the assumptions do not hold, you can look at the source code of the root module and make use of the individual modules.
- GKE Cluster
- Container-native load balancing
Name | Version |
---|---|
terraform | >= 0.15 |
>= 3.0 | |
kubernetes | >= 2.5 |
Name | Version |
---|---|
>= 3.0 |
Name | Source | Version |
---|---|---|
backend_config | ./modules/backend | n/a |
frontend | ./modules/frontend | n/a |
helm | basisai/ambassador/helm | 1.0.0-alpha1 |
Name | Type |
---|---|
google_compute_address.l4 | resource |
google_compute_address.l4 | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
admin_service_annotations | Annotations for the admin service | map(string) |
{ |
no |
affinity | Pod Affinity | any |
{} |
no |
allow_http | Allow plaintext HTTP traffic. Needs to be enabled for redirection. | bool |
true |
no |
ambassador_configurations | Configuration options for Ambassador. See https://www.getambassador.io/docs/edge-stack/latest/topics/running/ambassador/ | any |
{ |
no |
ambassador_id | Ambassador ID | string |
"default" |
no |
backend_config | Name for the BackendConfig CRD. Defaults to chart release name | string |
"" |
no |
cdn | Enable Cloud CDN | object({ |
{ |
no |
chart_namespace | Namespace to run the chart in | string |
"ambassador" |
no |
chart_version | Version of Chart to install. Set to empty to install the latest version | string |
"7.2.0" |
no |
cloud_armor_policy | Name of the Cloud Armor Policy to use | string |
"" |
no |
connection_draining_timeout_sec | connection draining timeout is the time, in seconds, to wait for connections to drain | number |
0 |
no |
container_security_context | Container securityContext | any |
{} |
no |
crd_manifest | Provide a custom CRD Manifest to be created. Otherwise, the version corresponding to var.image_tag will be used | string |
null |
no |
create_default_listeners | Whether Emissary should be created with default listeners: HTTP on port 8080, HTTPS on port 8443. See https://www.getambassador.io/docs/emissary/latest/howtos/configure-communications/ | bool |
false |
no |
custom_request_headers | Map of Custom Request Headers | map(string) |
{} |
no |
enable_l7_load_balancing | Use L7 for load balancing. Otherwise, L4 is used | bool |
true |
no |
env | Environment variables for container | map(string) |
{} |
no |
env_raw | Raw environment variables for container in YAML | string |
"" |
no |
external_traffic_policy | External traffic policy for L4 Load balancing | string |
"Local" |
no |
frontend_config | Frontend Config CRD name | string |
"" |
no |
health_check | Health Check Configuration | object({ |
||
= optional(string) port = optional(number) }) |
{ |
no | ||
hpa_enabled | Enable HPA | bool |
true |
no |
hpa_max_replica | Max Number of replica | number |
3 |
no |
hpa_metrics | Metrics for HPA Scaling | any |
[ |
no |
hpa_min_replica | Minimum Number of replica | number |
2 |
no |
http2_enable | Use HTTP/2. See https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-http2 | bool |
true |
no |
iap | Enable Identity-Aware Proxy by setting the secret name with the OAuth Client Credentials | string |
"" |
no |
image_repository | Image repository for Ambassador image | string |
"quay.io/datawire/ambassador" |
no |
image_tag | Image tag for Ambassador image | string |
"1.13.9" |
no |
ingress_annotations | Additional annotations for the ingress | map(string) |
{} |
no |
ingress_name | Name of the Kubernetes Ingress | string |
"" |
no |
internet_facing | Whether the Load Balancer, L7 or L4 is internet facing | bool |
true |
no |
kubernetes_annotations | Annotations for Kubernetes Resources | map(string) |
{ |
no |
kubernetes_labels | Labels for the Kubernetes Resources | map(string) |
{ |
no |
labels | Labels for resources | map(string) |
{ |
no |
load_balancer_source_ranges | Load balancer source range for L4 Load balancing | list(string) |
[ |
no |
logging | Logging configuration for the endpoint | object({ |
{ |
no |
manage_crd | Manage the CRD for Emissary Ingress | bool |
false |
no |
managed_certificates | List of managed certificates to use or create. Key is the name | map(object({ |
{} |
no |
pod_disruption_budget | PDB values | any |
{ |
no |
pod_security_context | Pod securityContext | any |
{} |
no |
pre_shared_certificates | List of pre-shared certificates to use. See https://cloud.google.com/load-balancing/docs/ssl-certificates/self-managed-certs | list(string) |
[] |
no |
priority_class_name | Priority class names | string |
"" |
no |
project_id | Project ID for resources. Defaults to provider configured project | string |
null |
no |
region | Region for resources. Defaults to provider configured region | string |
null |
no |
release_name | Chart release name | string |
"emissary-ingress" |
no |
replicas | Number of replicas | number |
3 |
no |
resources | Pod resources | any |
{ |
no |
service_annotations | Additional annotations for the service | map(string) |
{} |
no |
service_name | Name of Ambassador Service | string |
"ambassador" |
no |
service_port | Port of Ambaassador Service | any |
443 |
no |
session_affinity | Session affinity. Set type to empty to disable | object({ |
{ |
no |
ssl_policy | SSL Policy. Set to null to not use any. |
object({ |
{ |
no |
ssl_policy_settings | Settings for SSL policy to create | object({ |
{ |
no |
ssl_redirect | Redirect HTTP to HTTPS | object({ |
{ |
no |
static_ip | Static IP configuration | object({ |
{ |
no |
timeout_sec | Configures the backend service timeout. See https://cloud.google.com/load-balancing/docs/backend-service#timeout-setting | number |
30 |
no |
tls_secrets | List of secrets to include in the ingress | list(object({ |
[] |
no |
tolerations | Pod Tolerations | list(any) |
[] |
no |
volume_mounts | Volumes mounts for container | list(any) |
[] |
no |
volumes | Volumes for containers | list(any) |
[] |
no |
wait_for_load_balancer | Wait for Load Balancer to be created successfully before returning | bool |
true |
no |
Name | Description |
---|---|
ip_address | IP Address of the deployed endpoint |