Skip to content
index.html 77.2 KiB
Newer Older
    <li class="md-nav__item md-nav__item--nested">
      
        
        
        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" >
        
          
          <label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">
            
  
  <span class="md-ellipsis">
    Service Ordering
  </span>
  

            <span class="md-nav__icon md-icon"></span>
          </label>
        
        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
          <label class="md-nav__title" for="__nav_5">
            <span class="md-nav__icon md-icon"></span>
            Service Ordering
          </label>
          <ul class="md-nav__list" data-md-scrollfix>
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../../service_ordering/ordering_services/" class="md-nav__link">
  <span class="md-ellipsis">
    Ordering Services from catalogs
    <li class="md-nav__item md-nav__item--nested">
      
        
        
        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6" >
        
          
          <label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="0">
            
  
  <span class="md-ellipsis">
    Addons
    
  </span>
  

            <span class="md-nav__icon md-icon"></span>
          </label>
        
        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="false">
          <label class="md-nav__title" for="__nav_6">
            <span class="md-nav__icon md-icon"></span>
            Addons
          </label>
          <ul class="md-nav__list" data-md-scrollfix>
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../../addons/intro/" class="md-nav__link">
        
  
    <li class="md-nav__item md-nav__item--nested">
      
        
        
        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6_2" >
        
          
          <label class="md-nav__link" for="__nav_6_2" id="__nav_6_2_label" tabindex="0">
            
  
  <span class="md-ellipsis">
    CAMARA
    
  </span>
  

            <span class="md-nav__icon md-icon"></span>
          </label>
        
        <nav class="md-nav" data-md-level="2" aria-labelledby="__nav_6_2_label" aria-expanded="false">
          <label class="md-nav__title" for="__nav_6_2">
            <span class="md-nav__icon md-icon"></span>
            CAMARA
          </label>
          <ul class="md-nav__list" data-md-scrollfix>
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../../addons/camara/intro/" class="md-nav__link">
        
  
  <span class="md-ellipsis">
    Offering CAMARAaaS
    
  </span>
  

      </a>
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../../addons/camara/qod/" class="md-nav__link">
        
  
    <li class="md-nav__item md-nav__item--active md-nav__item--nested">
      
        
        
        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_7" checked>
          <label class="md-nav__link" for="__nav_7" id="__nav_7_label" tabindex="0">
  <span class="md-ellipsis">
    Design & Architecture
  </span>
  

            <span class="md-nav__icon md-icon"></span>
          </label>
        
        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_7_label" aria-expanded="true">
          <label class="md-nav__title" for="__nav_7">
            <span class="md-nav__icon md-icon"></span>
            Design & Architecture
          </label>
          <ul class="md-nav__list" data-md-scrollfix>
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../architecture/" class="md-nav__link">
  <span class="md-ellipsis">
    Architecture
  
  
    <li class="md-nav__item">
      <a href="../messagebus/" class="md-nav__link">
        
  
    
  
  
  
    <li class="md-nav__item md-nav__item--active">
      
      <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
      
      
        
      
      
        <label class="md-nav__link md-nav__link--active" for="__toc">
          
  
  </span>
  

          <span class="md-nav__icon md-icon"></span>
        </label>
      
      <a href="./" class="md-nav__link md-nav__link--active">
        
  
  </span>
  

      </a>
      
        

<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  
  
  
    
  
  
    <label class="md-nav__title" for="__toc">
      <span class="md-nav__icon md-icon"></span>
      Table of contents
    </label>
    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
      
        <li class="md-nav__item">
  <a href="#introduction" class="md-nav__link">
    <span class="md-ellipsis">
      Introduction
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#approach" class="md-nav__link">
    <span class="md-ellipsis">
      Approach
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#mupliple-clusters-management" class="md-nav__link">
    <span class="md-ellipsis">
      Mupliple Clusters Management
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#awareness-for-crds-and-crs-in-a-cluster" class="md-nav__link">
    <span class="md-ellipsis">
      Awareness for CRDs and CRs in a Cluster
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#exposure-of-crds-as-service-specifications" class="md-nav__link">
    <span class="md-ellipsis">
      Exposure of CRDs as Service Specifications
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#service-orchestration-and-crdscrs" class="md-nav__link">
    <span class="md-ellipsis">
      Service Orchestration and CRDs/CRs
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#deployment-of-a-new-cr-based-on-a-crd" class="md-nav__link">
    <span class="md-ellipsis">
      Deployment of a new CR based on a CRD
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#probe-further" class="md-nav__link">
    <span class="md-ellipsis">
      Probe further
    </span>
  </a>
  
</li>
      
    </ul>
  
</nav>
      
    </li>
  

              
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../metrico/" class="md-nav__link">
      <a href="../oauth/" class="md-nav__link">
  <span class="md-ellipsis">
    Authentication
        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_7_7" >
          <label class="md-nav__link" for="__nav_7_7" id="__nav_7_7_label" tabindex="0">
  </span>
  

            <span class="md-nav__icon md-icon"></span>
          </label>
        
        <nav class="md-nav" data-md-level="2" aria-labelledby="__nav_7_7_label" aria-expanded="false">
          <label class="md-nav__title" for="__nav_7_7">
            <span class="md-nav__icon md-icon"></span>
            APIs
          </label>
          <ul class="md-nav__list" data-md-scrollfix>
            
              
                
  
  
  
  
    <li class="md-nav__item">
      <a href="../tmfapi/" class="md-nav__link">
      <a href="../nfvapi/" class="md-nav__link">
      <a href="../issuemgt/" class="md-nav__link">
  <span class="md-ellipsis">
    Issue management
      <a href="../centrallog/" class="md-nav__link">
  <span class="md-ellipsis">
    Central logging
        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8" >
          <label class="md-nav__link" for="__nav_8" id="__nav_8_label" tabindex="0">
  </span>
  

            <span class="md-nav__icon md-icon"></span>
          </label>
        
        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_8_label" aria-expanded="false">
          <label class="md-nav__title" for="__nav_8">
            <span class="md-nav__icon md-icon"></span>
      <a href="../../contribute/developing/" class="md-nav__link">
      <a href="../../contribute/documenting/" class="md-nav__link">
      <a href="../../terminology/" class="md-nav__link">
  </span>
  

      </a>
    </li>
  

    
  </ul>
</nav>
                  </div>
                </div>
              </div>
            
            
              
              <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    

<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
  
  
  
    
  
  
    <label class="md-nav__title" for="__toc">
      <span class="md-nav__icon md-icon"></span>
      Table of contents
    </label>
    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
      
        <li class="md-nav__item">
  <a href="#introduction" class="md-nav__link">
    <span class="md-ellipsis">
      Introduction
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#approach" class="md-nav__link">
    <span class="md-ellipsis">
      Approach
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#mupliple-clusters-management" class="md-nav__link">
    <span class="md-ellipsis">
      Mupliple Clusters Management
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#awareness-for-crds-and-crs-in-a-cluster" class="md-nav__link">
    <span class="md-ellipsis">
      Awareness for CRDs and CRs in a Cluster
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#exposure-of-crds-as-service-specifications" class="md-nav__link">
    <span class="md-ellipsis">
      Exposure of CRDs as Service Specifications
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#service-orchestration-and-crdscrs" class="md-nav__link">
    <span class="md-ellipsis">
      Service Orchestration and CRDs/CRs
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#deployment-of-a-new-cr-based-on-a-crd" class="md-nav__link">
    <span class="md-ellipsis">
      Deployment of a new CR based on a CRD
    </span>
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#probe-further" class="md-nav__link">
    <span class="md-ellipsis">
      Probe further
    </span>
  </a>
  
</li>
      
    </ul>
  
</nav>
                  </div>
                </div>
              </div>
            
          
          
            <div class="md-content" data-md-component="content">
              <article class="md-content__inner md-typeset">
                
                  


<h1 id="cridge-a-service-to-manage-custom-resources-in-a-kubernetes-cluster">CRIDGE: A Service to manage Custom Resources in a Kubernetes Cluster</h1>
<!-- **Intended Audience: OpenSlice Developers** -->

<h2 id="introduction">Introduction</h2>
<p>Kubernetes is an orchestration system for automating software deployment, scaling, and management. One can interact though the Kubernetes API and it has a set of objects ready for use out of the box. Custom Resource Definitions (CRDs) is a way that allows to manage things other than Kubernetes itself and allows to create our own objects The use of CRDs makes the possibilities of Kubernetes management almost limitless. You can extend the base Kubernetes API with any object you like using CRDs.</p>
<p>CRIDGE is a service designed to create and manage Custom Resources (CRs) based on Custom Resource Definitions (CRDs) installed on a Kubernetes cluster. By leveraging OpenSlice (OSL), CRIDGE enables seamless integration and orchestration within Kubernetes environments, utilizing Kubernetes APIs via the TMF APIs and models. Thus, more or less, OSL exposes Kubernetes APIs as TMF APIs and models.</p>
<p>By allowing the design and lifecycle management of services/resources that expose CRDs/CRs in a Kubernetes cluster via the TMF APIs, OSL can be used in many complex scenarios now involing resources from multiple domains. </p>
<p>Pros, in a nutshell:</p>
<ol>
<li>
<p>CRIDGE service allows OSL to:</p>
<ul>
<li>Create and manage Custom Resources (CRs) using installed CRDs on a target Kubernetes cluster.</li>
<li>Facilitate complex orchestration scenarios by wrapping Kubernetes APIs as TMF APIs and models.</li>
<li>Handles connectivity to a Kubernetes cluster and manages the lifecycle of CRDs</li>
<li>Wraps the Kubernetes API, receives and provides resources towards other OSL services via the service bus</li>
</ul>
</li>
<li>
<p>Enabling Loose Coupling and Orchestration</p>
<ul>
<li>Language Flexibility: Developers can write CRDs in any language and expose them via the Kubernetes APIs. OSL will reuse these CRDs, enhancing flexibility and integration capabilities.</li>
<li>Familiar Deployment: Developers can create and deploy applications using familiar tools such as Helm charts, simplifying the process and reducing the learning curve.</li>
</ul>
</li>
<li>
<p>Ecosystem Reusability</p>
<ul>
<li>CRIDGE capitalizes on the extensive Kubernetes ecosystem, particularly focusing on operators (CRDs).</li>
<li>Key repositories and hubs such as artifacthub.io and Operatorhub.io can be utilized for finding and deploying operators.</li>
</ul>
</li>
<li>
<p>Service Catalog Exposure and Deployment</p>
<p>OSL can expose CRs in service catalogs, facilitating their deployment in complex scenarios.
These scenarios may include service bundles that involve multiple systems, such as RAN controllers or other Kubernetes clusters, providing a robust and versatile deployment framework.</p>
</li>
</ol>
<blockquote>
<p>Why the CRIDGE name? We wanted to build a service that maps TMF models to CRDs; a kind of a <strong>CR</strong>D to TMF br<strong>idge</strong>. Therefore CRIDGE was born.</p>
</blockquote>
<h2 id="approach">Approach</h2>
<blockquote>
<p>OSL in general is responsible for exposing Service Specifications which are ready to be ordered and orchestrated, through TMFORUM Open APIs as defined in the OSL Service Spec Catalog. Usually for a service specification a corresponding (one or more) Resource Specification (resourceSpecificationReference) is registered in the OSL Resource Spec Catalog.</p>
</blockquote>
<p>The following image illustrates the approach.</p>
<p><a class="glightbox" href="../images/cridge/img01.png" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="img01.png" src="../images/cridge/img01.png" /></a></p>
<ol>
<li>A CRD in a cluster will be mapped in TMF model as a Resource specification and therefore can be exposed as a service specification in a catalog</li>
<li>Service Orders can be created for this service specification. The OSL Orchestrator (OSOM) will manage the lifecycle of the Service Order.</li>
<li>OSOM creates a Resource in OSL Resource inventory and requests (via CRIDGE) a new Custom Resource (CR) in the target cluster<ul>
<li>The resource is created in a specific namespace (for example the UUID of the Service Order)</li>
<li>A CR in a cluster will be mapped in TMF model as a Resource in the resource Inventory</li>
<li>Other related resources created by the CRD Controller within the namespace are automatically created in OSL Resource Inventory under the same Service Order</li>
</ul>
</li>
</ol>
<p><a class="glightbox" href="../images/cridge/img02.png" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="img02.png" src="../images/cridge/img02.png" /></a></p>
<p>The provided image illustrates the architecture and workflow of the CRIDGE service, showing how it interacts with other components within a Kubernetes (K8s) cluster. </p>
<p>Following, there is an explanation of the key components and flow in the diagram:</p>
<ul>
<li>Other OSL Services: This box represents various OSL services such as Service Spec Catalogue, Resource Spec Catalogue, Service Inventory, Resource Inventory, and OSOM (OpenSlice Service Orchestration and Management).</li>
<li>Service Bus: This is the communication layer that facilitates interaction between the CRIDGE service and other OSL services.</li>
<li>CRIDGE: CRIDGE acts as a bridge that converts CRDs (Custom Resource Definitions) to TMF (TM Forum) APIs and models. It enables the creation and management of Custom Resources (CRs) in the Kubernetes cluster.</li>
<li>
<p>K8s API: The Kubernetes API server, which is the central control point for managing the Kubernetes cluster. CRIDGE interacts with the K8s API to manage CRDs and CRs.</p>
<blockquote>
<p>CRD (Custom Resource Definition): A CRD is a way to define custom resources in Kubernetes cluster-wise. It allows the extension of Kubernetes API to create and manage user-defined resources. Example :
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nt">apiVersion</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">apiextensions.k8s.io/v1</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">CustomResourceDefinition</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="nt">metadata</span><span class="p">:</span>
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a><span class="w">    </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">myresource.example.com</span>
</span></code></pre></div></p>
</blockquote>