diff --git a/README.md b/README.md index f23e6d34..acfdd737 100644 --- a/README.md +++ b/README.md @@ -294,12 +294,14 @@ sessionAffinityConfig: ## Additional environment variables To tweak CCM based on needs, one can overwrite the default values set for caches and requests by setting appropriate environment variables when applying the manifest or helm chart. -| Environment Variable | Default | Description | -|-----------------------------------|---------|-------------------------------------------------------------| -| `LINODE_INSTANCE_CACHE_TTL` | `15` | Default timeout of instance cache in seconds | -| `LINODE_ROUTES_CACHE_TTL_SECONDS` | `60` | Default timeout of route cache in seconds | -| `LINODE_REQUEST_TIMEOUT_SECONDS` | `120` | Default timeout in seconds for http requests to linode API | -| `LINODE_EXTERNAL_SUBNET` | | Mark private network as external. Example - `172.24.0.0/16` | +| Environment Variable | Default | Description | +|-----------------------------------|-------------|-------------------------------------------------------------| +| `LINODE_INSTANCE_CACHE_TTL` | `15` | Default timeout of instance cache in seconds | +| `LINODE_ROUTES_CACHE_TTL_SECONDS` | `60` | Default timeout of route cache in seconds | +| `LINODE_REQUEST_TIMEOUT_SECONDS` | `120` | Default timeout in seconds for http requests to linode API | +| `LINODE_EXTERNAL_SUBNET` | | Mark private network as external. Example - `172.24.0.0/16` | +| `BGP_CUSTOM_ID_MAP` | | Use your own map instead of default region map for BGP | +| `BGP_PEER_PREFIX` | `2600:3c0f` | Use your own BGP peer prefix instead of default one | ## Generating a Manifest for Deployment Use the script located at `./deploy/generate-manifest.sh` to generate a self-contained deployment manifest for the Linode CCM. Two arguments are required. diff --git a/cloud/linode/cilium_loadbalancers.go b/cloud/linode/cilium_loadbalancers.go index bc54385d..f301c286 100644 --- a/cloud/linode/cilium_loadbalancers.go +++ b/cloud/linode/cilium_loadbalancers.go @@ -482,8 +482,8 @@ func (l *loadbalancers) getCiliumLBIPPool(ctx context.Context, service *v1.Servi // NOTE: Cilium CRDs must be installed for this to work func (l *loadbalancers) ensureCiliumBGPPeeringPolicy(ctx context.Context) error { - if raw, ok := os.LookupEnv("BGPCustomIDMap"); ok { - klog.Info("BGPCustomIDMap env variable specified, using it instead of the default region map") + if raw, ok := os.LookupEnv("BGP_CUSTOM_ID_MAP"); ok { + klog.Info("BGP_CUSTOM_ID_MAP env variable specified, using it instead of the default region map") if err := json.Unmarshal([]byte(raw), ®ionIDMap); err != nil { return err } @@ -551,8 +551,8 @@ func (l *loadbalancers) ensureCiliumBGPPeeringPolicy(ctx context.Context) error }, } bgpPeerPrefix := defaultBGPPeerPrefix - if raw, ok := os.LookupEnv("BGPPeerPrefix"); ok { - klog.Info("BGPPeerPrefix env variable specified, using it instead of the default bgpPeer prefix") + if raw, ok := os.LookupEnv("BGP_PEER_PREFIX"); ok { + klog.Info("BGP_PEER_PREFIX env variable specified, using it instead of the default bgpPeer prefix") bgpPeerPrefix = raw } // As in https://github.com/linode/lelastic, there are 4 peers per DC