Added enable_nat bool for networks to allow nats Implemented docker network bridge, to allow nat with tenancy seperated as `enable_icc:false`
35 lines
1.2 KiB
Python
35 lines
1.2 KiB
Python
"""
|
|
Global configuration constants for xCloudify infrastructure components.
|
|
|
|
This module centralizes configuration constants to prevent duplication and
|
|
make configuration changes easier to manage and audit.
|
|
"""
|
|
|
|
import os
|
|
|
|
# NSController resource allocation
|
|
NSCONTROLLER_CPU_MCPU = 4
|
|
NSCONTROLLER_MEMORY_MIB = 128
|
|
# NSCONTROLLER_IMAGE = "busybox:latest"
|
|
# NSCONTROLLER_COMMAND = "sleep infinity"
|
|
NSCONTROLLER_IMAGE = "xcloudify-nscontroller:latest"
|
|
NSCONTROLLER_COMMAND = ""
|
|
|
|
# DNS configuration paths
|
|
GLOBAL_DNS_CONFIG_BASE_PATH = "/var/lib/xcloudify/dns-configs"
|
|
DNS_CONTAINER_MOUNT_PATH = "/etc/dnsmasq.d"
|
|
|
|
# Cloudflared sidecar resource allocation (for future use)
|
|
CLOUDFLARED_CPU_MCPU = 1
|
|
CLOUDFLARED_MEMORY_MIB = 64
|
|
CLOUDFLARED_IMAGE = "cloudflare/cloudflared:latest"
|
|
|
|
# Optional development default for OVS bridge resolution.
|
|
# Do not hard-code any fallback here; if not set, payload builders must omit
|
|
# the ovs_bridge key when a network does not define it.
|
|
DEFAULT_OVS_BRIDGE = os.getenv('XCF_DEFAULT_OVS_BRIDGE')
|
|
|
|
# Docker bridge network NSControllers attach to when a network has
|
|
# enable_host_nat set, for internet egress.
|
|
NSCONTROLLER_NAT_NETWORK = "xcloudify-wan"
|