pulumi-extra-crds 1.0.0 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.crd2pulumi-checksum +1 -0
- package/.github/workflows/generate.yml +31 -28
- package/CHANGELOG.md +100 -0
- package/LICENSE +201 -0
- package/README.md +325 -0
- package/crd2pulumi.tar.gz +0 -0
- package/generated/crds/README.md +14 -0
- package/generated/crds/acme/index.d.ts +2 -0
- package/generated/crds/acme/index.js +8 -0
- package/generated/crds/acme/index.ts +11 -0
- package/generated/crds/acme/v1/challenge.d.ts +64 -0
- package/generated/crds/acme/v1/challenge.js +63 -0
- package/generated/crds/acme/v1/challenge.ts +99 -0
- package/generated/crds/acme/v1/challengeList.d.ts +69 -0
- package/generated/crds/acme/v1/challengeList.js +64 -0
- package/generated/crds/acme/v1/challengeList.ts +105 -0
- package/generated/crds/acme/v1/challengePatch.d.ts +70 -0
- package/generated/crds/acme/v1/challengePatch.js +69 -0
- package/generated/crds/acme/v1/challengePatch.ts +105 -0
- package/generated/crds/acme/v1/index.d.ts +18 -0
- package/generated/crds/acme/v1/index.js +41 -0
- package/generated/crds/acme/v1/index.ts +60 -0
- package/generated/crds/acme/v1/order.d.ts +64 -0
- package/generated/crds/acme/v1/order.js +63 -0
- package/generated/crds/acme/v1/order.ts +99 -0
- package/generated/crds/acme/v1/orderList.d.ts +69 -0
- package/generated/crds/acme/v1/orderList.js +64 -0
- package/generated/crds/acme/v1/orderList.ts +105 -0
- package/generated/crds/acme/v1/orderPatch.d.ts +70 -0
- package/generated/crds/acme/v1/orderPatch.js +69 -0
- package/generated/crds/acme/v1/orderPatch.ts +105 -0
- package/generated/crds/cert_manager/index.d.ts +2 -0
- package/generated/crds/cert_manager/index.js +8 -0
- package/generated/crds/cert_manager/index.ts +11 -0
- package/generated/crds/cert_manager/v1/certificate.d.ts +67 -0
- package/generated/crds/cert_manager/v1/certificate.js +66 -0
- package/generated/crds/cert_manager/v1/certificate.ts +102 -0
- package/generated/crds/cert_manager/v1/certificateList.d.ts +69 -0
- package/generated/crds/cert_manager/v1/certificateList.js +64 -0
- package/generated/crds/cert_manager/v1/certificateList.ts +105 -0
- package/generated/crds/cert_manager/v1/certificatePatch.d.ts +73 -0
- package/generated/crds/cert_manager/v1/certificatePatch.js +72 -0
- package/generated/crds/cert_manager/v1/certificatePatch.ts +108 -0
- package/generated/crds/cert_manager/v1/certificateRequest.d.ts +72 -0
- package/generated/crds/cert_manager/v1/certificateRequest.js +71 -0
- package/generated/crds/cert_manager/v1/certificateRequest.ts +107 -0
- package/generated/crds/cert_manager/v1/certificateRequestList.d.ts +69 -0
- package/generated/crds/cert_manager/v1/certificateRequestList.js +64 -0
- package/generated/crds/cert_manager/v1/certificateRequestList.ts +105 -0
- package/generated/crds/cert_manager/v1/certificateRequestPatch.d.ts +78 -0
- package/generated/crds/cert_manager/v1/certificateRequestPatch.js +77 -0
- package/generated/crds/cert_manager/v1/certificateRequestPatch.ts +113 -0
- package/generated/crds/cert_manager/v1/clusterIssuer.d.ts +68 -0
- package/generated/crds/cert_manager/v1/clusterIssuer.js +67 -0
- package/generated/crds/cert_manager/v1/clusterIssuer.ts +103 -0
- package/generated/crds/cert_manager/v1/clusterIssuerList.d.ts +69 -0
- package/generated/crds/cert_manager/v1/clusterIssuerList.js +64 -0
- package/generated/crds/cert_manager/v1/clusterIssuerList.ts +105 -0
- package/generated/crds/cert_manager/v1/clusterIssuerPatch.d.ts +74 -0
- package/generated/crds/cert_manager/v1/clusterIssuerPatch.js +73 -0
- package/generated/crds/cert_manager/v1/clusterIssuerPatch.ts +109 -0
- package/generated/crds/cert_manager/v1/index.d.ts +36 -0
- package/generated/crds/cert_manager/v1/index.js +65 -0
- package/generated/crds/cert_manager/v1/index.ts +102 -0
- package/generated/crds/cert_manager/v1/issuer.d.ts +67 -0
- package/generated/crds/cert_manager/v1/issuer.js +66 -0
- package/generated/crds/cert_manager/v1/issuer.ts +102 -0
- package/generated/crds/cert_manager/v1/issuerList.d.ts +69 -0
- package/generated/crds/cert_manager/v1/issuerList.js +64 -0
- package/generated/crds/cert_manager/v1/issuerList.ts +105 -0
- package/generated/crds/cert_manager/v1/issuerPatch.d.ts +73 -0
- package/generated/crds/cert_manager/v1/issuerPatch.js +72 -0
- package/generated/crds/cert_manager/v1/issuerPatch.ts +108 -0
- package/generated/crds/gateway/index.d.ts +5 -0
- package/generated/crds/gateway/index.js +14 -0
- package/generated/crds/gateway/index.ts +17 -0
- package/generated/crds/gateway/v1/gateway.d.ts +65 -0
- package/generated/crds/gateway/v1/gateway.js +66 -0
- package/generated/crds/gateway/v1/gateway.ts +102 -0
- package/generated/crds/gateway/v1/gatewayClass.d.ts +80 -0
- package/generated/crds/gateway/v1/gatewayClass.js +81 -0
- package/generated/crds/gateway/v1/gatewayClass.ts +117 -0
- package/generated/crds/gateway/v1/gatewayClassList.d.ts +69 -0
- package/generated/crds/gateway/v1/gatewayClassList.js +64 -0
- package/generated/crds/gateway/v1/gatewayClassList.ts +105 -0
- package/generated/crds/gateway/v1/gatewayClassPatch.d.ts +86 -0
- package/generated/crds/gateway/v1/gatewayClassPatch.js +87 -0
- package/generated/crds/gateway/v1/gatewayClassPatch.ts +123 -0
- package/generated/crds/gateway/v1/gatewayList.d.ts +69 -0
- package/generated/crds/gateway/v1/gatewayList.js +64 -0
- package/generated/crds/gateway/v1/gatewayList.ts +105 -0
- package/generated/crds/gateway/v1/gatewayPatch.d.ts +71 -0
- package/generated/crds/gateway/v1/gatewayPatch.js +72 -0
- package/generated/crds/gateway/v1/gatewayPatch.ts +108 -0
- package/generated/crds/gateway/v1/grpcroute.d.ts +90 -0
- package/generated/crds/gateway/v1/grpcroute.js +91 -0
- package/generated/crds/gateway/v1/grpcroute.ts +127 -0
- package/generated/crds/gateway/v1/grpcrouteList.d.ts +69 -0
- package/generated/crds/gateway/v1/grpcrouteList.js +64 -0
- package/generated/crds/gateway/v1/grpcrouteList.ts +105 -0
- package/generated/crds/gateway/v1/grpcroutePatch.d.ts +96 -0
- package/generated/crds/gateway/v1/grpcroutePatch.js +97 -0
- package/generated/crds/gateway/v1/grpcroutePatch.ts +133 -0
- package/generated/crds/gateway/v1/httproute.d.ts +67 -0
- package/generated/crds/gateway/v1/httproute.js +68 -0
- package/generated/crds/gateway/v1/httproute.ts +104 -0
- package/generated/crds/gateway/v1/httprouteList.d.ts +69 -0
- package/generated/crds/gateway/v1/httprouteList.js +64 -0
- package/generated/crds/gateway/v1/httprouteList.ts +105 -0
- package/generated/crds/gateway/v1/httproutePatch.d.ts +73 -0
- package/generated/crds/gateway/v1/httproutePatch.js +74 -0
- package/generated/crds/gateway/v1/httproutePatch.ts +110 -0
- package/generated/crds/gateway/v1/index.d.ts +36 -0
- package/generated/crds/gateway/v1/index.js +65 -0
- package/generated/crds/gateway/v1/index.ts +102 -0
- package/generated/crds/gateway/v1alpha2/backendLBPolicy.d.ts +65 -0
- package/generated/crds/gateway/v1alpha2/backendLBPolicy.js +64 -0
- package/generated/crds/gateway/v1alpha2/backendLBPolicy.ts +100 -0
- package/generated/crds/gateway/v1alpha2/backendLBPolicyList.d.ts +69 -0
- package/generated/crds/gateway/v1alpha2/backendLBPolicyList.js +64 -0
- package/generated/crds/gateway/v1alpha2/backendLBPolicyList.ts +105 -0
- package/generated/crds/gateway/v1alpha2/backendLBPolicyPatch.d.ts +71 -0
- package/generated/crds/gateway/v1alpha2/backendLBPolicyPatch.js +70 -0
- package/generated/crds/gateway/v1alpha2/backendLBPolicyPatch.ts +106 -0
- package/generated/crds/gateway/v1alpha2/grpcroute.d.ts +90 -0
- package/generated/crds/gateway/v1alpha2/grpcroute.js +91 -0
- package/generated/crds/gateway/v1alpha2/grpcroute.ts +127 -0
- package/generated/crds/gateway/v1alpha2/grpcrouteList.d.ts +69 -0
- package/generated/crds/gateway/v1alpha2/grpcrouteList.js +64 -0
- package/generated/crds/gateway/v1alpha2/grpcrouteList.ts +105 -0
- package/generated/crds/gateway/v1alpha2/grpcroutePatch.d.ts +96 -0
- package/generated/crds/gateway/v1alpha2/grpcroutePatch.js +97 -0
- package/generated/crds/gateway/v1alpha2/grpcroutePatch.ts +133 -0
- package/generated/crds/gateway/v1alpha2/index.d.ts +54 -0
- package/generated/crds/gateway/v1alpha2/index.js +89 -0
- package/generated/crds/gateway/v1alpha2/index.ts +144 -0
- package/generated/crds/gateway/v1alpha2/referenceGrant.d.ts +82 -0
- package/generated/crds/gateway/v1alpha2/referenceGrant.js +82 -0
- package/generated/crds/gateway/v1alpha2/referenceGrant.ts +117 -0
- package/generated/crds/gateway/v1alpha2/referenceGrantList.d.ts +69 -0
- package/generated/crds/gateway/v1alpha2/referenceGrantList.js +64 -0
- package/generated/crds/gateway/v1alpha2/referenceGrantList.ts +105 -0
- package/generated/crds/gateway/v1alpha2/referenceGrantPatch.d.ts +88 -0
- package/generated/crds/gateway/v1alpha2/referenceGrantPatch.js +88 -0
- package/generated/crds/gateway/v1alpha2/referenceGrantPatch.ts +123 -0
- package/generated/crds/gateway/v1alpha2/tcproute.d.ts +66 -0
- package/generated/crds/gateway/v1alpha2/tcproute.js +65 -0
- package/generated/crds/gateway/v1alpha2/tcproute.ts +101 -0
- package/generated/crds/gateway/v1alpha2/tcprouteList.d.ts +69 -0
- package/generated/crds/gateway/v1alpha2/tcprouteList.js +64 -0
- package/generated/crds/gateway/v1alpha2/tcprouteList.ts +105 -0
- package/generated/crds/gateway/v1alpha2/tcproutePatch.d.ts +72 -0
- package/generated/crds/gateway/v1alpha2/tcproutePatch.js +71 -0
- package/generated/crds/gateway/v1alpha2/tcproutePatch.ts +107 -0
- package/generated/crds/gateway/v1alpha2/tlsroute.d.ts +69 -0
- package/generated/crds/gateway/v1alpha2/tlsroute.js +68 -0
- package/generated/crds/gateway/v1alpha2/tlsroute.ts +104 -0
- package/generated/crds/gateway/v1alpha2/tlsrouteList.d.ts +69 -0
- package/generated/crds/gateway/v1alpha2/tlsrouteList.js +64 -0
- package/generated/crds/gateway/v1alpha2/tlsrouteList.ts +105 -0
- package/generated/crds/gateway/v1alpha2/tlsroutePatch.d.ts +75 -0
- package/generated/crds/gateway/v1alpha2/tlsroutePatch.js +74 -0
- package/generated/crds/gateway/v1alpha2/tlsroutePatch.ts +110 -0
- package/generated/crds/gateway/v1alpha2/udproute.d.ts +66 -0
- package/generated/crds/gateway/v1alpha2/udproute.js +65 -0
- package/generated/crds/gateway/v1alpha2/udproute.ts +101 -0
- package/generated/crds/gateway/v1alpha2/udprouteList.d.ts +69 -0
- package/generated/crds/gateway/v1alpha2/udprouteList.js +64 -0
- package/generated/crds/gateway/v1alpha2/udprouteList.ts +105 -0
- package/generated/crds/gateway/v1alpha2/udproutePatch.d.ts +72 -0
- package/generated/crds/gateway/v1alpha2/udproutePatch.js +71 -0
- package/generated/crds/gateway/v1alpha2/udproutePatch.ts +107 -0
- package/generated/crds/gateway/v1alpha3/backendTLSPolicy.d.ts +65 -0
- package/generated/crds/gateway/v1alpha3/backendTLSPolicy.js +64 -0
- package/generated/crds/gateway/v1alpha3/backendTLSPolicy.ts +100 -0
- package/generated/crds/gateway/v1alpha3/backendTLSPolicyList.d.ts +69 -0
- package/generated/crds/gateway/v1alpha3/backendTLSPolicyList.js +64 -0
- package/generated/crds/gateway/v1alpha3/backendTLSPolicyList.ts +105 -0
- package/generated/crds/gateway/v1alpha3/backendTLSPolicyPatch.d.ts +71 -0
- package/generated/crds/gateway/v1alpha3/backendTLSPolicyPatch.js +70 -0
- package/generated/crds/gateway/v1alpha3/backendTLSPolicyPatch.ts +106 -0
- package/generated/crds/gateway/v1alpha3/index.d.ts +9 -0
- package/generated/crds/gateway/v1alpha3/index.js +29 -0
- package/generated/crds/gateway/v1alpha3/index.ts +39 -0
- package/generated/crds/gateway/v1beta1/gateway.d.ts +65 -0
- package/generated/crds/gateway/v1beta1/gateway.js +66 -0
- package/generated/crds/gateway/v1beta1/gateway.ts +102 -0
- package/generated/crds/gateway/v1beta1/gatewayClass.d.ts +80 -0
- package/generated/crds/gateway/v1beta1/gatewayClass.js +81 -0
- package/generated/crds/gateway/v1beta1/gatewayClass.ts +117 -0
- package/generated/crds/gateway/v1beta1/gatewayClassList.d.ts +69 -0
- package/generated/crds/gateway/v1beta1/gatewayClassList.js +64 -0
- package/generated/crds/gateway/v1beta1/gatewayClassList.ts +105 -0
- package/generated/crds/gateway/v1beta1/gatewayClassPatch.d.ts +86 -0
- package/generated/crds/gateway/v1beta1/gatewayClassPatch.js +87 -0
- package/generated/crds/gateway/v1beta1/gatewayClassPatch.ts +123 -0
- package/generated/crds/gateway/v1beta1/gatewayList.d.ts +69 -0
- package/generated/crds/gateway/v1beta1/gatewayList.js +64 -0
- package/generated/crds/gateway/v1beta1/gatewayList.ts +105 -0
- package/generated/crds/gateway/v1beta1/gatewayPatch.d.ts +71 -0
- package/generated/crds/gateway/v1beta1/gatewayPatch.js +72 -0
- package/generated/crds/gateway/v1beta1/gatewayPatch.ts +108 -0
- package/generated/crds/gateway/v1beta1/httproute.d.ts +67 -0
- package/generated/crds/gateway/v1beta1/httproute.js +68 -0
- package/generated/crds/gateway/v1beta1/httproute.ts +104 -0
- package/generated/crds/gateway/v1beta1/httprouteList.d.ts +69 -0
- package/generated/crds/gateway/v1beta1/httprouteList.js +64 -0
- package/generated/crds/gateway/v1beta1/httprouteList.ts +105 -0
- package/generated/crds/gateway/v1beta1/httproutePatch.d.ts +73 -0
- package/generated/crds/gateway/v1beta1/httproutePatch.js +74 -0
- package/generated/crds/gateway/v1beta1/httproutePatch.ts +110 -0
- package/generated/crds/gateway/v1beta1/index.d.ts +36 -0
- package/generated/crds/gateway/v1beta1/index.js +65 -0
- package/generated/crds/gateway/v1beta1/index.ts +102 -0
- package/generated/crds/gateway/v1beta1/referenceGrant.d.ts +78 -0
- package/generated/crds/gateway/v1beta1/referenceGrant.js +78 -0
- package/generated/crds/gateway/v1beta1/referenceGrant.ts +113 -0
- package/generated/crds/gateway/v1beta1/referenceGrantList.d.ts +69 -0
- package/generated/crds/gateway/v1beta1/referenceGrantList.js +64 -0
- package/generated/crds/gateway/v1beta1/referenceGrantList.ts +105 -0
- package/generated/crds/gateway/v1beta1/referenceGrantPatch.d.ts +84 -0
- package/generated/crds/gateway/v1beta1/referenceGrantPatch.js +84 -0
- package/generated/crds/gateway/v1beta1/referenceGrantPatch.ts +119 -0
- package/generated/crds/index.d.ts +8 -0
- package/generated/crds/index.js +27 -0
- package/generated/crds/index.ts +34 -0
- package/generated/crds/meta/v1.d.ts +3 -0
- package/generated/crds/meta/v1.js +2 -0
- package/generated/crds/meta/v1.ts +4 -0
- package/generated/crds/package.json +32 -0
- package/generated/crds/provider.d.ts +23 -0
- package/generated/crds/provider.js +37 -0
- package/generated/crds/provider.ts +44 -0
- package/generated/crds/scripts/postinstall.js +13 -0
- package/generated/crds/tsconfig.json +15 -0
- package/generated/crds/types/index.d.ts +3 -0
- package/generated/crds/types/index.js +10 -0
- package/generated/crds/types/index.ts +13 -0
- package/generated/crds/types/input.d.ts +38601 -0
- package/generated/crds/types/input.js +4 -0
- package/generated/crds/types/input.ts +39421 -0
- package/generated/crds/types/output.d.ts +42150 -0
- package/generated/crds/types/output.js +4 -0
- package/generated/crds/types/output.ts +43038 -0
- package/generated/crds/utilities.d.ts +13 -0
- package/generated/crds/utilities.js +91 -0
- package/generated/crds/utilities.ts +98 -0
- package/package.json +9 -4
package/README.md
ADDED
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
# crd2pulumi
|
|
2
|
+
Generate typed CustomResources based on Kubernetes CustomResourceDefinitions.
|
|
3
|
+
|
|
4
|
+
## Goals
|
|
5
|
+
|
|
6
|
+
`crd2pulumi` is a CLI tool that generates typed CustomResources based on Kubernetes CustomResourceDefinition (CRDs).
|
|
7
|
+
CRDs allow you to extend the Kubernetes API by defining your own schemas for custom objects. While Pulumi lets you create
|
|
8
|
+
[CustomResources](https://www.pulumi.com/docs/reference/pkg/kubernetes/apiextensions/customresource/), there was previously
|
|
9
|
+
no strong-typing for these objects since every schema was, well, custom. This can be a massive headache for popular CRDs
|
|
10
|
+
such as [cert-manager](https://github.com/jetstack/cert-manager/tree/master/deploy/crds) or
|
|
11
|
+
[istio](https://github.com/istio/istio/tree/0321da58ca86fc786fb03a68afd29d082477e4f2/manifests/charts/base/crds), which
|
|
12
|
+
contain thousands of lines of complex YAML schemas. By generating typed versions of CustomResources, `crd2pulumi` makes
|
|
13
|
+
filling out their arguments more convenient by allowing you to leverage existing IDE type checking and autocomplete features.
|
|
14
|
+
|
|
15
|
+
## Building and Installation
|
|
16
|
+
If you wish to use `crd2pulumi` without developing the tool itself, you can use one of the [binary releases](https://github.com/pulumi/crd2pulumi/releases) hosted on this repository.
|
|
17
|
+
|
|
18
|
+
### Homebrew
|
|
19
|
+
`crd2pulumi` can be installed on Mac from the Pulumi Homebrew tap.
|
|
20
|
+
```console
|
|
21
|
+
brew install pulumi/tap/crd2pulumi
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`crd2pulumi` uses Go modules to manage dependencies. If you want to develop `crd2pulumi` itself, you'll need to have
|
|
25
|
+
Go installed in order to build. Once you install this prerequisite, run the following to build the `crd2pulumi` binary
|
|
26
|
+
and install it into `$GOPATH/bin`:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
$ go build -ldflags="-X github.com/pulumi/crd2pulumi/gen.Version=dev" -o $GOPATH/bin/crd2pulumi main.go
|
|
30
|
+
```
|
|
31
|
+
The `ldflags` argument is necessary to dynamically set the `crd2pulumi` version at build time. However, the version
|
|
32
|
+
itself can be anything, so you don't have to set it to `dev`.
|
|
33
|
+
|
|
34
|
+
Go should then automatically handle pulling the dependencies for you. If `$GOPATH/bin` is not on your path, you may
|
|
35
|
+
want to move the `crd2pulumi` binary from `$GOPATH/bin` into a directory that is on your path.
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
```bash
|
|
39
|
+
crd2pulumi is a CLI tool that generates typed Kubernetes
|
|
40
|
+
CustomResources to use in Pulumi programs, based on a
|
|
41
|
+
CustomResourceDefinition YAML schema.
|
|
42
|
+
|
|
43
|
+
Usage:
|
|
44
|
+
crd2pulumi [-dgnp] [--nodejsPath path] [--pythonPath path] [--dotnetPath path] [--goPath path] [--javaPath path] <crd1.yaml> [crd2.yaml ...] [flags]
|
|
45
|
+
crd2pulumi [command]
|
|
46
|
+
|
|
47
|
+
Examples:
|
|
48
|
+
crd2pulumi --nodejs crontabs.yaml
|
|
49
|
+
crd2pulumi -dgnp crd-certificates.yaml crd-issuers.yaml crd-challenges.yaml
|
|
50
|
+
crd2pulumi --pythonPath=crds/python/istio --nodejsPath=crds/nodejs/istio crd-all.gen.yaml crd-mixer.yaml crd-operator.yaml
|
|
51
|
+
crd2pulumi --pythonPath=crds/python/gke https://raw.githubusercontent.com/GoogleCloudPlatform/gke-managed-certs/master/deploy/managedcertificates-crd.yaml
|
|
52
|
+
|
|
53
|
+
Notice that by just setting a language-specific output path (--pythonPath, --nodejsPath, etc) the code will
|
|
54
|
+
still get generated, so setting -p, -n, etc becomes unnecessary.
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
Available Commands:
|
|
58
|
+
help Help about any command
|
|
59
|
+
version Print the version number of crd2pulumi
|
|
60
|
+
|
|
61
|
+
Flags:
|
|
62
|
+
-d, --dotnet generate .NET
|
|
63
|
+
--dotnetName string name of generated .NET package (default "crds")
|
|
64
|
+
--dotnetNamespace string namespace of generated .NET package
|
|
65
|
+
--dotnetPath string optional .NET output dir
|
|
66
|
+
-f, --force overwrite existing files
|
|
67
|
+
-g, --go generate Go
|
|
68
|
+
--goName string name of generated Go package (default "crds")
|
|
69
|
+
--goPath string optional Go output dir
|
|
70
|
+
-h, --help help for crd2pulumi
|
|
71
|
+
-j, --java generate Java
|
|
72
|
+
--javaBasePackage string base package of generated Java package
|
|
73
|
+
--javaName string name of generated Java package (default "crds")
|
|
74
|
+
--javaPath string optional Java output dir
|
|
75
|
+
-n, --nodejs generate NodeJS
|
|
76
|
+
--nodejsName string name of generated NodeJS package (default "crds")
|
|
77
|
+
--nodejsNamespace string namespace of generated NodeJS package
|
|
78
|
+
--nodejsPath string optional NodeJS output dir
|
|
79
|
+
-p, --python generate Python
|
|
80
|
+
--pythonName string name of generated Python package (default "crds")
|
|
81
|
+
--pythonPackagePrefix string prefix of generated Python package
|
|
82
|
+
--pythonPath string optional Python output dir
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
Use "crd2pulumi [command] --help" for more information about a command.
|
|
86
|
+
```
|
|
87
|
+
Setting only a language-specific flag will output the generated code in the default directory; so `-d` will output to
|
|
88
|
+
`crds/dotnet`, `-g` will output to `crds/go`, `-j` will output to `crds/java`, `-n` will output to `crds/nodejs`, and
|
|
89
|
+
`-p` will output to `crds/python`. You can also specify a language-specific path (`--pythonPath`, `--nodejsPath`, etc)
|
|
90
|
+
to control where the code will be outputted, in which case setting `-p`, `-n`, etc becomes unnecessary.
|
|
91
|
+
|
|
92
|
+
## Examples
|
|
93
|
+
Let's use the example CronTab CRD specified in `resourcedefinition.yaml` from the
|
|
94
|
+
[Kubernetes Documentation](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/).
|
|
95
|
+
|
|
96
|
+
### TypeScript
|
|
97
|
+
To generate a strongly-typed CronTab CustomResource in TypeScript, we can run this command:
|
|
98
|
+
```bash
|
|
99
|
+
$ crd2pulumi --nodejsPath ./crontabs resourcedefinition.yaml
|
|
100
|
+
```
|
|
101
|
+
Now let's import the generated code into a Pulumi program that provisions the CRD and creates an instance of it.
|
|
102
|
+
```typescript
|
|
103
|
+
import * as crontabs from "./crontabs"
|
|
104
|
+
import * as pulumi from "@pulumi/pulumi"
|
|
105
|
+
import * as k8s from "@pulumi/kubernetes";
|
|
106
|
+
|
|
107
|
+
// Register the CronTab CRD.
|
|
108
|
+
const cronTabDefinition = new k8s.yaml.ConfigFile("my-crontab-definition", { file: "resourcedefinition.yaml" });
|
|
109
|
+
|
|
110
|
+
// Instantiate a CronTab resource.
|
|
111
|
+
const myCronTab = new crontabs.stable.v1.CronTab("my-new-cron-object",
|
|
112
|
+
{
|
|
113
|
+
metadata: {
|
|
114
|
+
name: "my-new-cron-object",
|
|
115
|
+
},
|
|
116
|
+
spec: {
|
|
117
|
+
cronSpec: "* * * * */5",
|
|
118
|
+
image: "my-awesome-cron-image",
|
|
119
|
+
}
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
As you can see, the `CronTab` object is typed! For example, if you try to set
|
|
124
|
+
`cronSpec` to a non-string or add an extra field, your IDE should immediately warn you.
|
|
125
|
+
|
|
126
|
+
### Python
|
|
127
|
+
```bash
|
|
128
|
+
$ crd2pulumi --pythonPath ./crontabs resourcedefinition.yaml
|
|
129
|
+
```
|
|
130
|
+
```python
|
|
131
|
+
import pulumi_kubernetes as k8s
|
|
132
|
+
import crontabs.pulumi_crds as crontabs
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
# Register the CronTab CRD.
|
|
136
|
+
crontab_definition = k8s.yaml.ConfigFile("my-crontab-definition", file="resourcedefinition.yaml")
|
|
137
|
+
|
|
138
|
+
# Instantiate a CronTab resource.
|
|
139
|
+
crontab_instance = crontabs.stable.v1.CronTab(
|
|
140
|
+
"my-new-cron-object",
|
|
141
|
+
metadata=k8s.meta.v1.ObjectMetaArgs(
|
|
142
|
+
name="my-new-cron-object"
|
|
143
|
+
),
|
|
144
|
+
spec=crontabs.stable.v1.CronTabSpecArgs(
|
|
145
|
+
cron_spec="* * * */5",
|
|
146
|
+
image="my-awesome-cron-image",
|
|
147
|
+
)
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Go
|
|
153
|
+
```bash
|
|
154
|
+
$ crd2pulumi --goPath ./crontabs resourcedefinition.yaml
|
|
155
|
+
```
|
|
156
|
+
Now we can access the `NewCronTab()` constructor. Create a `main.go` file with the following code. In this example,
|
|
157
|
+
the Pulumi project's module is named `crds-go-final`, so the import path is `crds-go-final/crontabs/stable/v1`. Make
|
|
158
|
+
sure to swap this out with your own module's name.
|
|
159
|
+
```go
|
|
160
|
+
package main
|
|
161
|
+
|
|
162
|
+
import (
|
|
163
|
+
crontabs_v1 "crds-go-final/crontabs/stable/v1"
|
|
164
|
+
|
|
165
|
+
meta_v1 "github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/meta/v1"
|
|
166
|
+
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
func main() {
|
|
170
|
+
pulumi.Run(func(ctx *pulumi.Context) error {
|
|
171
|
+
// Register the CronTab CRD.
|
|
172
|
+
_, err := yaml.NewConfigFile(ctx, "my-crontab-definition",
|
|
173
|
+
&yaml.ConfigFileArgs{
|
|
174
|
+
File: "resourcedefinition.yaml",
|
|
175
|
+
},
|
|
176
|
+
)
|
|
177
|
+
if err != nil {
|
|
178
|
+
return err
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// Instantiate a CronTab resource.
|
|
182
|
+
_, err := crontabs_v1.NewCronTab(ctx, "cronTabInstance", &crontabs_v1.CronTabArgs{
|
|
183
|
+
Metadata: &meta_v1.ObjectMetaArgs{
|
|
184
|
+
Name: pulumi.String("my-new-cron-object"),
|
|
185
|
+
},
|
|
186
|
+
Spec: crontabs_v1.CronTabSpecArgs{
|
|
187
|
+
CronSpec: pulumi.String("* * * * */5"),
|
|
188
|
+
Image: pulumi.String("my-awesome-cron-image"),
|
|
189
|
+
Replicas: pulumi.IntPtr(3),
|
|
190
|
+
},
|
|
191
|
+
})
|
|
192
|
+
if err != nil {
|
|
193
|
+
return err
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return nil
|
|
197
|
+
})
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### C\#
|
|
203
|
+
```bash
|
|
204
|
+
$ crd2pulumi --dotnetPath ./crontabs resourcedefinition.yaml
|
|
205
|
+
```
|
|
206
|
+
```csharp
|
|
207
|
+
using Pulumi;
|
|
208
|
+
using Pulumi.Kubernetes.Yaml;
|
|
209
|
+
using Pulumi.Kubernetes.Types.Inputs.Meta.V1;
|
|
210
|
+
|
|
211
|
+
class MyStack : Stack
|
|
212
|
+
{
|
|
213
|
+
public MyStack()
|
|
214
|
+
{
|
|
215
|
+
// Register a CronTab CRD.
|
|
216
|
+
var cronTabDefinition = new Pulumi.Kubernetes.Yaml.ConfigFile("my-crontab-definition",
|
|
217
|
+
new ConfigFileArgs{
|
|
218
|
+
File = "resourcedefinition.yaml"
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
|
|
222
|
+
// Instantiate a CronTab resource.
|
|
223
|
+
var cronTabInstance = new Pulumi.Crds.Stable.V1.CronTab("cronTabInstance",
|
|
224
|
+
new Pulumi.Kubernetes.Types.Inputs.Stable.V1.CronTabArgs{
|
|
225
|
+
Metadata = new ObjectMetaArgs{
|
|
226
|
+
Name = "my-new-cron-object"
|
|
227
|
+
},
|
|
228
|
+
Spec = new Pulumi.Kubernetes.Types.Inputs.Stable.V1.CronTabSpecArgs{
|
|
229
|
+
CronSpec = "* * * * */5",
|
|
230
|
+
Image = "my-awesome-cron-image"
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
> If you get an `Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute` error when trying to run `pulumi up`, then try deleting the `crontabs/bin` and `crontabs/obj` folders.
|
|
239
|
+
|
|
240
|
+
### Java
|
|
241
|
+
```bash
|
|
242
|
+
$ crd2pulumi --javaPath ./crontabs resourcedefinition.yaml
|
|
243
|
+
```
|
|
244
|
+
```java
|
|
245
|
+
package com.example;
|
|
246
|
+
|
|
247
|
+
import com.pulumi.Pulumi;
|
|
248
|
+
|
|
249
|
+
public class MyStack {
|
|
250
|
+
|
|
251
|
+
public static void main(String[] args) {
|
|
252
|
+
Pulumi.run(ctx -> {
|
|
253
|
+
// Register a CronTab CRD (Coming Soon - see https://www.pulumi.com/registry/packages/kubernetes/api-docs/yaml/configfile/)
|
|
254
|
+
|
|
255
|
+
// Instantiate a CronTab resource.
|
|
256
|
+
var cronTabInstance = new com.pulumi.crds.stable.v1.CronTab("cronTabInstance",
|
|
257
|
+
com.pulumi.crds.stable.v1.CronTabArgs.builder()
|
|
258
|
+
.metadata(com.pulumi.kubernetes.meta.v1.inputs.ObjectMetaArgs.builder()
|
|
259
|
+
.name("my-new-cron-object")
|
|
260
|
+
.build())
|
|
261
|
+
.spec(com.pulumi.kubernetes.stable.v1.inputs.CronTabSpecArgs.builder()
|
|
262
|
+
.cronSpec("* * * * */5")
|
|
263
|
+
.image("my-awesome-cron-image")
|
|
264
|
+
.build())
|
|
265
|
+
.build());
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Now let's run the program and perform the update.
|
|
273
|
+
```bash
|
|
274
|
+
$ pulumi up
|
|
275
|
+
Previewing update (dev):
|
|
276
|
+
Type Name Plan
|
|
277
|
+
pulumi:pulumi:Stack examples-dev
|
|
278
|
+
+ ├─ kubernetes:stable.example.com:CronTab my-new-cron-object create
|
|
279
|
+
+ └─ kubernetes:apiextensions.k8s.io:CustomResourceDefinition my-crontab-definition create
|
|
280
|
+
Resources:
|
|
281
|
+
+ 2 to create
|
|
282
|
+
1 unchanged
|
|
283
|
+
Do you want to perform this update? yes
|
|
284
|
+
Updating (dev):
|
|
285
|
+
Type Name Status
|
|
286
|
+
pulumi:pulumi:Stack examples-dev
|
|
287
|
+
+ ├─ kubernetes:stable.example.com:CronTab my-new-cron-object created
|
|
288
|
+
+ └─ kubernetes:apiextensions.k8s.io:CustomResourceDefinition my-crontab-definition created
|
|
289
|
+
Outputs:
|
|
290
|
+
urn: "urn:pulumi:dev::examples::kubernetes:stable.example.com/v1:CronTab::my-new-cron-object"
|
|
291
|
+
Resources:
|
|
292
|
+
+ 2 created
|
|
293
|
+
1 unchanged
|
|
294
|
+
Duration: 17s
|
|
295
|
+
Permalink: https://app.pulumi.com/albert-zhong/examples/dev/updates/4
|
|
296
|
+
```
|
|
297
|
+
It looks like both the CronTab definition and instance were both created! Finally, let's verify that they were created
|
|
298
|
+
by manually viewing the raw YAML data:
|
|
299
|
+
```bash
|
|
300
|
+
$ kubectl get ct -o yaml
|
|
301
|
+
```
|
|
302
|
+
```yaml
|
|
303
|
+
- apiVersion: stable.example.com/v1
|
|
304
|
+
kind: CronTab
|
|
305
|
+
metadata:
|
|
306
|
+
annotations:
|
|
307
|
+
kubectl.kubernetes.io/last-applied-configuration: |
|
|
308
|
+
{"apiVersion":"stable.example.com/v1","kind":"CronTab","metadata":{"labels":{"app.kubernetes.io/managed-by":"pulumi"},"name":"my-new-cron-object"},"spec":{"cronSpec":"* * * * */5","image":"my-awesome-cron-image"}}
|
|
309
|
+
creationTimestamp: "2020-08-10T09:50:38Z"
|
|
310
|
+
generation: 1
|
|
311
|
+
labels:
|
|
312
|
+
app.kubernetes.io/managed-by: pulumi
|
|
313
|
+
name: my-new-cron-object
|
|
314
|
+
namespace: default
|
|
315
|
+
resourceVersion: "1658962"
|
|
316
|
+
selfLink: /apis/stable.example.com/v1/namespaces/default/crontabs/my-new-cron-object
|
|
317
|
+
uid: 5e2c56a2-7332-49cf-b0fc-211a0892c3d5
|
|
318
|
+
spec:
|
|
319
|
+
cronSpec: '* * * * */5'
|
|
320
|
+
image: my-awesome-cron-image
|
|
321
|
+
kind: List
|
|
322
|
+
metadata:
|
|
323
|
+
resourceVersion: ""
|
|
324
|
+
selfLink: ""
|
|
325
|
+
```
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
The Kubernetes provider package offers support for all Kubernetes resources and their properties.
|
|
2
|
+
Resources are exposed as types from modules based on Kubernetes API groups such as 'apps', 'core',
|
|
3
|
+
'rbac', and 'storage', among many others. Additionally, support for deploying Helm charts ('helm')
|
|
4
|
+
and YAML files ('yaml') is available in this package. Using this package allows you to
|
|
5
|
+
programmatically declare instances of any Kubernetes resources and any supported resource version
|
|
6
|
+
using infrastructure as code, which Pulumi then uses to drive the Kubernetes API.
|
|
7
|
+
|
|
8
|
+
If this is your first time using this package, these two resources may be helpful:
|
|
9
|
+
|
|
10
|
+
* [Kubernetes Getting Started Guide](https://www.pulumi.com/docs/quickstart/kubernetes/): Get up and running quickly.
|
|
11
|
+
* [Kubernetes Pulumi Setup Documentation](https://www.pulumi.com/docs/quickstart/kubernetes/configure/): How to configure Pulumi
|
|
12
|
+
for use with your Kubernetes cluster.
|
|
13
|
+
|
|
14
|
+
Use the navigation below to see detailed documentation for each of the supported Kubernetes resources.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by crd2pulumi. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.v1 = void 0;
|
|
6
|
+
// Export sub-modules:
|
|
7
|
+
const v1 = require("./v1");
|
|
8
|
+
exports.v1 = v1;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by crd2pulumi. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as utilities from "../utilities";
|
|
5
|
+
|
|
6
|
+
// Export sub-modules:
|
|
7
|
+
import * as v1 from "./v1";
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
v1,
|
|
11
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "../../types/input";
|
|
3
|
+
import * as outputs from "../../types/output";
|
|
4
|
+
/**
|
|
5
|
+
* Challenge is a type to represent a Challenge request with an ACME server
|
|
6
|
+
*/
|
|
7
|
+
export declare class Challenge extends pulumi.CustomResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get an existing Challenge resource's state with the given name, ID, and optional extra
|
|
10
|
+
* properties used to qualify the lookup.
|
|
11
|
+
*
|
|
12
|
+
* @param name The _unique_ name of the resulting resource.
|
|
13
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
14
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
15
|
+
*/
|
|
16
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Challenge;
|
|
17
|
+
/** @internal */
|
|
18
|
+
static readonly __pulumiType = "kubernetes:acme.cert-manager.io/v1:Challenge";
|
|
19
|
+
/**
|
|
20
|
+
* Returns true if the given object is an instance of Challenge. This is designed to work even
|
|
21
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
22
|
+
*/
|
|
23
|
+
static isInstance(obj: any): obj is Challenge;
|
|
24
|
+
/**
|
|
25
|
+
* APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
|
26
|
+
*/
|
|
27
|
+
readonly apiVersion: pulumi.Output<"acme.cert-manager.io/v1">;
|
|
28
|
+
/**
|
|
29
|
+
* Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
30
|
+
*/
|
|
31
|
+
readonly kind: pulumi.Output<"Challenge">;
|
|
32
|
+
/**
|
|
33
|
+
* Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
34
|
+
*/
|
|
35
|
+
readonly metadata: pulumi.Output<outputs.meta.v1.ObjectMeta>;
|
|
36
|
+
readonly spec: pulumi.Output<outputs.acme.v1.ChallengeSpec>;
|
|
37
|
+
readonly status: pulumi.Output<outputs.acme.v1.ChallengeStatus>;
|
|
38
|
+
/**
|
|
39
|
+
* Create a Challenge resource with the given unique name, arguments, and options.
|
|
40
|
+
*
|
|
41
|
+
* @param name The _unique_ name of the resource.
|
|
42
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
43
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
44
|
+
*/
|
|
45
|
+
constructor(name: string, args?: ChallengeArgs, opts?: pulumi.CustomResourceOptions);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The set of arguments for constructing a Challenge resource.
|
|
49
|
+
*/
|
|
50
|
+
export interface ChallengeArgs {
|
|
51
|
+
/**
|
|
52
|
+
* APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
|
53
|
+
*/
|
|
54
|
+
apiVersion?: pulumi.Input<"acme.cert-manager.io/v1">;
|
|
55
|
+
/**
|
|
56
|
+
* Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
57
|
+
*/
|
|
58
|
+
kind?: pulumi.Input<"Challenge">;
|
|
59
|
+
/**
|
|
60
|
+
* Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
61
|
+
*/
|
|
62
|
+
metadata?: pulumi.Input<inputs.meta.v1.ObjectMeta>;
|
|
63
|
+
spec?: pulumi.Input<inputs.acme.v1.ChallengeSpec>;
|
|
64
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by crd2pulumi. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.Challenge = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("../../utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Challenge is a type to represent a Challenge request with an ACME server
|
|
10
|
+
*/
|
|
11
|
+
class Challenge extends pulumi.CustomResource {
|
|
12
|
+
/**
|
|
13
|
+
* Get an existing Challenge resource's state with the given name, ID, and optional extra
|
|
14
|
+
* properties used to qualify the lookup.
|
|
15
|
+
*
|
|
16
|
+
* @param name The _unique_ name of the resulting resource.
|
|
17
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
18
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
19
|
+
*/
|
|
20
|
+
static get(name, id, opts) {
|
|
21
|
+
return new Challenge(name, undefined, { ...opts, id: id });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns true if the given object is an instance of Challenge. This is designed to work even
|
|
25
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
26
|
+
*/
|
|
27
|
+
static isInstance(obj) {
|
|
28
|
+
if (obj === undefined || obj === null) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
return obj['__pulumiType'] === Challenge.__pulumiType;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Create a Challenge resource with the given unique name, arguments, and options.
|
|
35
|
+
*
|
|
36
|
+
* @param name The _unique_ name of the resource.
|
|
37
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
38
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
39
|
+
*/
|
|
40
|
+
constructor(name, args, opts) {
|
|
41
|
+
let resourceInputs = {};
|
|
42
|
+
opts = opts || {};
|
|
43
|
+
if (!opts.id) {
|
|
44
|
+
resourceInputs["apiVersion"] = "acme.cert-manager.io/v1";
|
|
45
|
+
resourceInputs["kind"] = "Challenge";
|
|
46
|
+
resourceInputs["metadata"] = args ? args.metadata : undefined;
|
|
47
|
+
resourceInputs["spec"] = args ? args.spec : undefined;
|
|
48
|
+
resourceInputs["status"] = undefined /*out*/;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
resourceInputs["apiVersion"] = undefined /*out*/;
|
|
52
|
+
resourceInputs["kind"] = undefined /*out*/;
|
|
53
|
+
resourceInputs["metadata"] = undefined /*out*/;
|
|
54
|
+
resourceInputs["spec"] = undefined /*out*/;
|
|
55
|
+
resourceInputs["status"] = undefined /*out*/;
|
|
56
|
+
}
|
|
57
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
58
|
+
super(Challenge.__pulumiType, name, resourceInputs, opts);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.Challenge = Challenge;
|
|
62
|
+
/** @internal */
|
|
63
|
+
Challenge.__pulumiType = 'kubernetes:acme.cert-manager.io/v1:Challenge';
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by crd2pulumi. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as inputs from "../../types/input";
|
|
6
|
+
import * as outputs from "../../types/output";
|
|
7
|
+
import * as utilities from "../../utilities";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Challenge is a type to represent a Challenge request with an ACME server
|
|
11
|
+
*/
|
|
12
|
+
export class Challenge extends pulumi.CustomResource {
|
|
13
|
+
/**
|
|
14
|
+
* Get an existing Challenge resource's state with the given name, ID, and optional extra
|
|
15
|
+
* properties used to qualify the lookup.
|
|
16
|
+
*
|
|
17
|
+
* @param name The _unique_ name of the resulting resource.
|
|
18
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
19
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
20
|
+
*/
|
|
21
|
+
public static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Challenge {
|
|
22
|
+
return new Challenge(name, undefined as any, { ...opts, id: id });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
public static readonly __pulumiType = 'kubernetes:acme.cert-manager.io/v1:Challenge';
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Returns true if the given object is an instance of Challenge. This is designed to work even
|
|
30
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
31
|
+
*/
|
|
32
|
+
public static isInstance(obj: any): obj is Challenge {
|
|
33
|
+
if (obj === undefined || obj === null) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
return obj['__pulumiType'] === Challenge.__pulumiType;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
|
41
|
+
*/
|
|
42
|
+
public readonly apiVersion!: pulumi.Output<"acme.cert-manager.io/v1">;
|
|
43
|
+
/**
|
|
44
|
+
* Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
45
|
+
*/
|
|
46
|
+
public readonly kind!: pulumi.Output<"Challenge">;
|
|
47
|
+
/**
|
|
48
|
+
* Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
49
|
+
*/
|
|
50
|
+
public readonly metadata!: pulumi.Output<outputs.meta.v1.ObjectMeta>;
|
|
51
|
+
public readonly spec!: pulumi.Output<outputs.acme.v1.ChallengeSpec>;
|
|
52
|
+
public /*out*/ readonly status!: pulumi.Output<outputs.acme.v1.ChallengeStatus>;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Create a Challenge resource with the given unique name, arguments, and options.
|
|
56
|
+
*
|
|
57
|
+
* @param name The _unique_ name of the resource.
|
|
58
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
59
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
60
|
+
*/
|
|
61
|
+
constructor(name: string, args?: ChallengeArgs, opts?: pulumi.CustomResourceOptions) {
|
|
62
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
63
|
+
opts = opts || {};
|
|
64
|
+
if (!opts.id) {
|
|
65
|
+
resourceInputs["apiVersion"] = "acme.cert-manager.io/v1";
|
|
66
|
+
resourceInputs["kind"] = "Challenge";
|
|
67
|
+
resourceInputs["metadata"] = args ? args.metadata : undefined;
|
|
68
|
+
resourceInputs["spec"] = args ? args.spec : undefined;
|
|
69
|
+
resourceInputs["status"] = undefined /*out*/;
|
|
70
|
+
} else {
|
|
71
|
+
resourceInputs["apiVersion"] = undefined /*out*/;
|
|
72
|
+
resourceInputs["kind"] = undefined /*out*/;
|
|
73
|
+
resourceInputs["metadata"] = undefined /*out*/;
|
|
74
|
+
resourceInputs["spec"] = undefined /*out*/;
|
|
75
|
+
resourceInputs["status"] = undefined /*out*/;
|
|
76
|
+
}
|
|
77
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
78
|
+
super(Challenge.__pulumiType, name, resourceInputs, opts);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The set of arguments for constructing a Challenge resource.
|
|
84
|
+
*/
|
|
85
|
+
export interface ChallengeArgs {
|
|
86
|
+
/**
|
|
87
|
+
* APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
|
88
|
+
*/
|
|
89
|
+
apiVersion?: pulumi.Input<"acme.cert-manager.io/v1">;
|
|
90
|
+
/**
|
|
91
|
+
* Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
92
|
+
*/
|
|
93
|
+
kind?: pulumi.Input<"Challenge">;
|
|
94
|
+
/**
|
|
95
|
+
* Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
96
|
+
*/
|
|
97
|
+
metadata?: pulumi.Input<inputs.meta.v1.ObjectMeta>;
|
|
98
|
+
spec?: pulumi.Input<inputs.acme.v1.ChallengeSpec>;
|
|
99
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "../../types/input";
|
|
3
|
+
import * as outputs from "../../types/output";
|
|
4
|
+
/**
|
|
5
|
+
* ChallengeList is a list of Challenge
|
|
6
|
+
*/
|
|
7
|
+
export declare class ChallengeList extends pulumi.CustomResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get an existing ChallengeList resource's state with the given name, ID, and optional extra
|
|
10
|
+
* properties used to qualify the lookup.
|
|
11
|
+
*
|
|
12
|
+
* @param name The _unique_ name of the resulting resource.
|
|
13
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
14
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
15
|
+
*/
|
|
16
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): ChallengeList;
|
|
17
|
+
/** @internal */
|
|
18
|
+
static readonly __pulumiType = "kubernetes:acme.cert-manager.io/v1:ChallengeList";
|
|
19
|
+
/**
|
|
20
|
+
* Returns true if the given object is an instance of ChallengeList. This is designed to work even
|
|
21
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
22
|
+
*/
|
|
23
|
+
static isInstance(obj: any): obj is ChallengeList;
|
|
24
|
+
/**
|
|
25
|
+
* APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
|
26
|
+
*/
|
|
27
|
+
readonly apiVersion: pulumi.Output<"acme.cert-manager.io/v1">;
|
|
28
|
+
/**
|
|
29
|
+
* List of challenges. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
|
|
30
|
+
*/
|
|
31
|
+
readonly items: pulumi.Output<outputs.acme.v1.Challenge[]>;
|
|
32
|
+
/**
|
|
33
|
+
* Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
34
|
+
*/
|
|
35
|
+
readonly kind: pulumi.Output<"ChallengeList">;
|
|
36
|
+
/**
|
|
37
|
+
* Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
38
|
+
*/
|
|
39
|
+
readonly metadata: pulumi.Output<outputs.meta.v1.ListMeta>;
|
|
40
|
+
/**
|
|
41
|
+
* Create a ChallengeList resource with the given unique name, arguments, and options.
|
|
42
|
+
*
|
|
43
|
+
* @param name The _unique_ name of the resource.
|
|
44
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
45
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
46
|
+
*/
|
|
47
|
+
constructor(name: string, args?: ChallengeListArgs, opts?: pulumi.CustomResourceOptions);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The set of arguments for constructing a ChallengeList resource.
|
|
51
|
+
*/
|
|
52
|
+
export interface ChallengeListArgs {
|
|
53
|
+
/**
|
|
54
|
+
* APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
|
55
|
+
*/
|
|
56
|
+
apiVersion?: pulumi.Input<"acme.cert-manager.io/v1">;
|
|
57
|
+
/**
|
|
58
|
+
* List of challenges. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
|
|
59
|
+
*/
|
|
60
|
+
items: pulumi.Input<pulumi.Input<inputs.acme.v1.Challenge>[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
63
|
+
*/
|
|
64
|
+
kind?: pulumi.Input<"ChallengeList">;
|
|
65
|
+
/**
|
|
66
|
+
* Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
67
|
+
*/
|
|
68
|
+
metadata?: pulumi.Input<inputs.meta.v1.ListMeta>;
|
|
69
|
+
}
|