XMLWordPrintable

    • Generic mechanism to attach K8S ConfigMaps to DCAE apps.

      Generic mechanism to attach K8S ConfigMaps to DCAE apps.

      Background:

      We have in DCAE two know use-cases, which would benefit from attaching an existing K8S ConfigMap to the application container:

      • DFC SFTP known hosts ssh keys (in a ConfigMap)
      • ExternalRepo to be generated as a ConfigMap and attached to VES collector.

       

      Solution:

      Add support for ConfigMap base on new structure config_volume under volumes definition

      component-spec {    "self": {"name": "docker.some.app",...}

      ,
         "streams": {   }
      ,
         "services": {...},
         "parameters": [...],
         "auxilary":":

      {       "healthcheck": \{...}

      ,
            "volumes": [
              

      {             "container": \{ "bind": "/etc/localtime" }

      ,
                  "host":

      { "path": "/etc/localtime" }

      ,
               },
              

      {             "container": \{ "bind": "/etc/configuration.yaml" }

      ,
                  "config_volume": { "name": "myConfigMap" }
               }
            ],
         },
         "artifacts": [...]
      }
       

      blueprint:
      tosca_definitions_version: cloudify_dsl_1_3
        
      node_templates:
        some_app:
          type: dcae.nodes.ContainerizedServiceComponent
          interfaces:
            cloudify.interfaces.lifecycle:
              start:
                inputs:
                 volumes:
                    - config_volume:
                        name: 'myConfigMap'
                      container:
                        bind: /etc/configuration.yaml
                        mode: ro
          properties: <keys>

       

      Must:

      • add support in k8s_client.py for new type of volume
      • add support in component spec schema for new data structure
      • add support in blueprint generator for new data structure
      • test blueprint generation and application deployment base on dummy/simple app

      Optional:

      • Add possibility to override DFC know hosts file by ConfigMap
      • Add possibility to attach externaRepo to VES collector

            mkukulski mkukulski
            mkukulski mkukulski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: