github.com/rakanixu/helm@v2.8.2+incompatible/docs/chart_best_practices/third_party_resources.md (about)

     1  # Third Party Resources
     2  
     3  This section of the Best Practices Guide deals with creating and using Third Party Resource
     4  objects.
     5  
     6  When working with Third Party Resources (TPRs), it is important to distinguish
     7  two different pieces:
     8  
     9  - There is a declaration of a TPR. This is the YAML file that has the kind `ThirdPartyResource`
    10  - Then there are resources that _use_ the TPR. Say a TPR defines `foo.example.com/v1`. Any resource
    11    that has `apiVersion: example.com/v1` and kind `Foo` is a resource that uses the
    12    TPR.
    13  
    14  ## Install a TPR Declaration Before Using the Resource
    15  
    16  Helm is optimized to load as many resources into Kubernetes as fast as possible.
    17  By design, Kubernetes can take an entire set of manifests and bring them all
    18  online (this is called the reconciliation loop).
    19  
    20  But there's a difference with TPRs.
    21  
    22  For a TPR, the declaration must be registered before any resources of that TPRs
    23  kind(s) can be used. And the registration process sometimes takes a few seconds.
    24  
    25  ### Method 1: Separate Charts
    26  
    27  One way to do this is to put the TPR definition in one chart, and then put any
    28  resources that use that TPR in _another_ chart.
    29  
    30  In this method, each chart must be installed separately.
    31  
    32  ### Method 2: Pre-install Hooks
    33  
    34  To package the two together, add a `pre-install` hook to the TPR definition so
    35  that it is fully installed before the rest of the chart is executed.
    36  
    37  Note that if you create the TPR with a `pre-install` hook, that TPR definition
    38  will not be deleted when `helm delete` is run.