Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
f52d0f4f
Unverified
Commit
f52d0f4f
authored
Apr 05, 2018
by
Matthew Fisher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename TPR to CRD
parent
55ec0709
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
custom_resource_definitions.md
docs/chart_best_practices/custom_resource_definitions.md
+13
-14
No files found.
docs/chart_best_practices/
third_party_resource
s.md
→
docs/chart_best_practices/
custom_resource_definition
s.md
View file @
f52d0f4f
#
Third Party Resource
s
#
Custom Resource Definition
s
This section of the Best Practices Guide deals with creating and using
Third Party Resource
This section of the Best Practices Guide deals with creating and using
Custom Resource Definition
objects.
When working with
Third Party Resources (TPR
s), it is important to distinguish
When working with
Custom Resource Definitions (CRD
s), it is important to distinguish
two different pieces:
-
There is a declaration of a TPR. This is the YAML file that has the kind
`ThirdPartyResource`
-
Then there are resources that _use_ the TPR. Say a TPR defines
`foo.example.com/v1`
. Any resource
that has
`apiVersion: example.com/v1`
and kind
`Foo`
is a resource that uses the
TPR.
-
There is a declaration of a CRD. This is the YAML file that has the kind
`CustomResourceDefinition`
-
Then there are resources that _use_ the CRD. Say a CRD defines
`foo.example.com/v1`
. Any resource
that has
`apiVersion: example.com/v1`
and kind
`Foo`
is a resource that uses the CRD.
## Install a
TPR
Declaration Before Using the Resource
## Install a
CRD
Declaration Before Using the Resource
Helm is optimized to load as many resources into Kubernetes as fast as possible.
By design, Kubernetes can take an entire set of manifests and bring them all
online (this is called the reconciliation loop).
But there's a difference with
TPR
s.
But there's a difference with
CRD
s.
For a
TPR, the declaration must be registered before any resources of that TPR
s
For a
CRD, the declaration must be registered before any resources of that CRD
s
kind(s) can be used. And the registration process sometimes takes a few seconds.
### Method 1: Separate Charts
One way to do this is to put the
TPR
definition in one chart, and then put any
resources that use that
TPR
in _another_ chart.
One way to do this is to put the
CRD
definition in one chart, and then put any
resources that use that
CRD
in _another_ chart.
In this method, each chart must be installed separately.
### Method 2: Pre-install Hooks
To package the two together, add a
`pre-install`
hook to the
TPR
definition so
To package the two together, add a
`pre-install`
hook to the
CRD
definition so
that it is fully installed before the rest of the chart is executed.
Note that if you create the
TPR with a
`pre-install`
hook, that TPR
definition
Note that if you create the
CRD with a
`pre-install`
hook, that CRD
definition
will not be deleted when
`helm delete`
is run.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment