wooden-toddler-96888
09/22/2018, 4:42 AMcreamy-potato-29402
09/22/2018, 5:37 AMwooden-toddler-96888
09/22/2018, 5:41 AMcreamy-potato-29402
09/22/2018, 5:41 AMwooden-toddler-96888
09/22/2018, 6:11 AMconst stagingLetsEncryptIssuer = new k8s.apiextensions.CustomResource(
"staging-lets-encrypt-issuer",
{
apiVersion: "<http://certmanager.k8s.io/v1alpha1|certmanager.k8s.io/v1alpha1>",
kind: "ClusterIssuer",
},
{
provider: ek8s
});
But I couldn't figure out how to fit this, into that definition:
apiVersion: <http://certmanager.k8s.io/v1alpha1|certmanager.k8s.io/v1alpha1>
kind: Issuer
metadata:
name: letsencrypt-staging
spec:
acme:
# The ACME server URL
server: <https://acme-staging.api.letsencrypt.org/directory>
# Email address used for ACME registration
email: "<mailto:certificates@example.com|certificates@example.com>"
# Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: letsencrypt-staging
# Enable the HTTP-01 challenge provider
http01: {}
creamy-potato-29402
09/22/2018, 6:37 AMnew k8s.apiextensions.CustomResource("staging-lets-encrypt-issuer",
{
"apiVersion": "<http://certmanager.k8s.io/v1alpha1|certmanager.k8s.io/v1alpha1>",
"kind": "Issuer",
"metadata": {
"name": "letsencrypt-staging"
},
"spec": {
"acme": {
"server": "<https://acme-staging.api.letsencrypt.org/directory>",
"email": "<mailto:certificates@example.com|certificates@example.com>",
"privateKeySecretRef": {
"name": "letsencrypt-staging"
},
"http01": {
}
}
}
}, {provider: ek8s})
CustomResource
constructor is that it has apiVersion
and `kind`; but it can also have whatever other properties you need.wooden-toddler-96888
09/22/2018, 4:20 PMimport * as k8s from "@pulumi/kubernetes";
import * as pulumi from "@pulumi/pulumi";
export class ExtensibleResource extends k8s.apiextensions.CustomResource {
/**
* Create a CustomResource resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: {
apiVersion: pulumi.Input<string>;
kind: pulumi.Input<string>;
[others: string]: any;
}, opts?: pulumi.CustomResourceOptions) {
super(name, args, opts)
}
}
That's so that TypeScript would allow having additional arbitary unchecked K/V pairs in args.creamy-potato-29402
09/22/2018, 5:10 PM