From: Balint Varga Date: Thu, 5 Sep 2019 07:46:24 +0000 (+0200) Subject: oam_cidr caas parameter introduced X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F39%2F1539%2F3;hp=82b7d75b8609bec0f3086d93b2162375ba71e961;p=ta%2Fconfig-manager.git oam_cidr caas parameter introduced Signed-off-by: Balint Varga Change-Id: Iacd7c10bea2521986fb1998b7f4f66b855189140 --- diff --git a/cmdatahandlers/src/cmdatahandlers/caas/config.py b/cmdatahandlers/src/cmdatahandlers/caas/config.py index cbc21ea..7a2afb2 100644 --- a/cmdatahandlers/src/cmdatahandlers/caas/config.py +++ b/cmdatahandlers/src/cmdatahandlers/caas/config.py @@ -32,6 +32,8 @@ ADMIN_PWD_LENGTH = 20 DEFAULT_CAAS_INFRA_LOG_TYPE = 'elasticsearch' AUDIT_DISK_LIMIT = 0.87 CAAS_AUDIT_DISK_RATIO = 0.25 +DEFAULT_VALUES_MAP = { "docker0_cidr": "127.17.0.1/16", + "oam_cidr": "10.244.0.0/16" } class Config(config.Config): @@ -104,6 +106,11 @@ class Config(config.Config): password=self.generate_pwd(ADMIN_PWD_LENGTH) ) + def set_default_values_to_optional_params(self): + for parameter_name, default_value in DEFAULT_VALUES_MAP.iteritems(): + if self.config[self.ROOT].get(parameter_name, '') == '': + self.config[self.ROOT][parameter_name] = default_value + @staticmethod def _template_config(template, base_config, initial_data): config_data = initial_data.copy() @@ -122,6 +129,7 @@ class Config(config.Config): return self.set_dynamic_config() self.set_static_config() + self.set_default_values_to_optional_params() self.set_post_config() def is_vnf_embedded_deployment(self): diff --git a/userconfigtemplate/user_config.yaml b/userconfigtemplate/user_config.yaml index 2664b1f..2ea4a1e 100644 --- a/userconfigtemplate/user_config.yaml +++ b/userconfigtemplate/user_config.yaml @@ -235,6 +235,12 @@ caas: ### the Docker bridge CIDRs of all host via this parameter. #docker0_cidr: "172.17.0.1/16" + ### This parameter is used to set the overlay CIDR of the default network for containers, so pods can comminucate + ### over this subnet and Kubernetes services are available here also. + ### The parameter can be used to make sure the CIDR of this network does not overlap with any customer + ### specific provider network's + #oam_cidr: "10.244.0.0/16" + ### Mandatory parameter. All the infrastructure's HTTP servers are secured with TLS. ### The certificates of the servers are created in infrastructure deployment time, and are signed by an externally provided CA certificate. ### This CA certificate can be configured by setting its encrypted format into this configuration parameter.