Skip to content

Commit

Permalink
Build crossplane from helm package
Browse files Browse the repository at this point in the history
Crossplane unfortunately doesn't have packaged CRDs, so you can't just
read them out of the helm repository.

Instead this creates a cluster with kind, then installs the helm chart, then dumps all
crds that helm chart created, then deletes the cluster.

Right now this dumps all the CRDs, but for a more complex use case, you
can install all the dependencies first, then check what CRDs are
created, then install the target package, then dump the crds, ignore
those that already existed.

Example of how to run the command:
bash -x scripts/helm_to_kcl.sh https://charts.crossplane.io/stable/crossplane-1.17.0.tgz crossplane v1.17.0

Signed-off-by: Daniel Rogers <[email protected]>
  • Loading branch information
dansrogers committed Sep 7, 2024
1 parent d6b8a0d commit 4805276
Show file tree
Hide file tree
Showing 18 changed files with 16,553 additions and 10,570 deletions.
1,180 changes: 446 additions & 734 deletions crossplane/README.md

Large diffs are not rendered by default.

22,584 changes: 15,591 additions & 6,993 deletions crossplane/[email protected] → crossplane/crds/crossplane.yaml

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions crossplane/kcl.mod.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,3 @@
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
33 changes: 19 additions & 14 deletions crossplane/v1/apiextensions_crossplane_io_v1_composition.k
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,20 @@ schema ApiextensionsCrossplaneIoV1CompositionSpec:
Mode controls what type or "mode" of Composition will be used.


"Resources" (the default) indicates that a Composition uses what is
commonly referred to as "Patch & Transform" or P&T composition. This mode
of Composition uses an array of resources, each a template for a composed
resource.
"Pipeline" indicates that a Composition specifies a pipeline of
Composition Functions, each of which is responsible for producing
composed resources that Crossplane should create or update.


"Pipeline" indicates that a Composition specifies a pipeline
of Composition Functions, each of which is responsible for producing
composed resources that Crossplane should create or update. THE PIPELINE
MODE IS A BETA FEATURE. It is not honored if the relevant Crossplane
feature flag is disabled.
"Resources" indicates that a Composition uses what is commonly referred
to as "Patch & Transform" or P&T composition. This mode of Composition
uses an array of resources, each a template for a composed resource.


All Compositions should use Pipeline mode. Resources mode is deprecated.
Resources mode won't be removed in Crossplane 1.x, and will remain the
default to avoid breaking legacy Compositions. However, it's no longer
accepting new features, and only accepting security related bug fixes.
patchSets : [ApiextensionsCrossplaneIoV1CompositionSpecPatchSetsItems0], default is Undefined, optional
PatchSets define a named set of patches that may be included by any
resource in this Composition. PatchSets cannot themselves refer to other
Expand All @@ -69,6 +72,9 @@ schema ApiextensionsCrossplaneIoV1CompositionSpec:

PatchSets are only used by the "Resources" mode of Composition. They
are ignored by other modes.


Deprecated: Use Composition Functions instead.
pipeline : [ApiextensionsCrossplaneIoV1CompositionSpecPipelineItems0], default is Undefined, optional
Pipeline is a list of composition function steps that will be used when a
composite resource referring to this composition is created. One of
Expand All @@ -77,10 +83,6 @@ schema ApiextensionsCrossplaneIoV1CompositionSpec:

The Pipeline is only used by the "Pipeline" mode of Composition. It is
ignored by other modes.


THIS IS A BETA FIELD. It is not honored if the relevant Crossplane
feature flag is disabled.
publishConnectionDetailsWithStoreConfigRef : ApiextensionsCrossplaneIoV1CompositionSpecPublishConnectionDetailsWithStoreConfigRef, default is Undefined, optional
publish connection details with store config ref
resources : [ApiextensionsCrossplaneIoV1CompositionSpecResourcesItems0], default is Undefined, optional
Expand All @@ -90,6 +92,9 @@ schema ApiextensionsCrossplaneIoV1CompositionSpec:

Resources are only used by the "Resources" mode of Composition. They are
ignored by other modes.


Deprecated: Use Composition Functions instead.
writeConnectionSecretsToNamespace : str, default is Undefined, optional
WriteConnectionSecretsToNamespace specifies the namespace in which the
connection secrets of composite resource dynamically provisioned using
Expand Down Expand Up @@ -1221,7 +1226,7 @@ schema ApiextensionsCrossplaneIoV1CompositionSpecResourcesItems0:

patches?: [ApiextensionsCrossplaneIoV1CompositionSpecResourcesItems0PatchesItems0]

readinessChecks?: [ApiextensionsCrossplaneIoV1CompositionSpecResourcesItems0ReadinessChecksItems0] = [{"matchCondition": {"status": "True", "type": "Ready"}, "type": "MatchCondition"}]
readinessChecks?: [ApiextensionsCrossplaneIoV1CompositionSpecResourcesItems0ReadinessChecksItems0] = [{"matchCondition": {"type": "Ready", "status": "True"}, "type": "MatchCondition"}]


schema ApiextensionsCrossplaneIoV1CompositionSpecResourcesItems0ConnectionDetailsItems0:
Expand Down
31 changes: 18 additions & 13 deletions crossplane/v1/apiextensions_crossplane_io_v1_composition_revision.k
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,20 @@ schema ApiextensionsCrossplaneIoV1CompositionRevisionSpec:
Mode controls what type or "mode" of Composition will be used.


"Resources" (the default) indicates that a Composition uses what is
commonly referred to as "Patch & Transform" or P&T composition. This mode
of Composition uses an array of resources, each a template for a composed
resource.
"Pipeline" indicates that a Composition specifies a pipeline of
Composition Functions, each of which is responsible for producing
composed resources that Crossplane should create or update.


"Pipeline" indicates that a Composition specifies a pipeline
of Composition Functions, each of which is responsible for producing
composed resources that Crossplane should create or update. THE PIPELINE
MODE IS A BETA FEATURE. It is not honored if the relevant Crossplane
feature flag is disabled.
"Resources" indicates that a Composition uses what is commonly referred
to as "Patch & Transform" or P&T composition. This mode of Composition
uses an array of resources, each a template for a composed resource.


All Compositions should use Pipeline mode. Resources mode is deprecated.
Resources mode won't be removed in Crossplane 1.x, and will remain the
default to avoid breaking legacy Compositions. However, it's no longer
accepting new features, and only accepting security related bug fixes.
patchSets : [ApiextensionsCrossplaneIoV1CompositionRevisionSpecPatchSetsItems0], default is Undefined, optional
PatchSets define a named set of patches that may be included by any
resource in this Composition. PatchSets cannot themselves refer to other
Expand All @@ -74,6 +77,9 @@ schema ApiextensionsCrossplaneIoV1CompositionRevisionSpec:

PatchSets are only used by the "Resources" mode of Composition. They
are ignored by other modes.


Deprecated: Use Composition Functions instead.
pipeline : [ApiextensionsCrossplaneIoV1CompositionRevisionSpecPipelineItems0], default is Undefined, optional
Pipeline is a list of composition function steps that will be used when a
composite resource referring to this composition is created. One of
Expand All @@ -82,10 +88,6 @@ schema ApiextensionsCrossplaneIoV1CompositionRevisionSpec:

The Pipeline is only used by the "Pipeline" mode of Composition. It is
ignored by other modes.


THIS IS A BETA FIELD. It is not honored if the relevant Crossplane
feature flag is disabled.
publishConnectionDetailsWithStoreConfigRef : ApiextensionsCrossplaneIoV1CompositionRevisionSpecPublishConnectionDetailsWithStoreConfigRef, default is Undefined, optional
publish connection details with store config ref
resources : [ApiextensionsCrossplaneIoV1CompositionRevisionSpecResourcesItems0], default is Undefined, optional
Expand All @@ -95,6 +97,9 @@ schema ApiextensionsCrossplaneIoV1CompositionRevisionSpec:

Resources are only used by the "Resources" mode of Composition. They are
ignored by other modes.


Deprecated: Use Composition Functions instead.
revision : int, default is Undefined, required
Revision number. Newer revisions have larger numbers.
writeConnectionSecretsToNamespace : str, default is Undefined, optional
Expand Down
91 changes: 0 additions & 91 deletions crossplane/v1/meta_pkg_crossplane_io_v1_configuration.k

This file was deleted.

149 changes: 0 additions & 149 deletions crossplane/v1/meta_pkg_crossplane_io_v1_provider.k

This file was deleted.

Loading

0 comments on commit 4805276

Please sign in to comment.