oam_cidr caas parameter introduced 39/1539/3
authorBalint Varga <balint.varga@nokia.com>
Thu, 5 Sep 2019 07:46:24 +0000 (09:46 +0200)
committerBalint Varga <balint.varga@nokia.com>
Fri, 27 Sep 2019 06:26:09 +0000 (08:26 +0200)
Signed-off-by: Balint Varga <balint.varga@nokia.com>
Change-Id: Iacd7c10bea2521986fb1998b7f4f66b855189140

cmdatahandlers/src/cmdatahandlers/caas/config.py
userconfigtemplate/user_config.yaml

index cbc21ea..7a2afb2 100644 (file)
@@ -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):
index 2664b1f..2ea4a1e 100644 (file)
@@ -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.