@grucloud/module-k8s-cert-manager
v13.2.5
Published
Grucloud module for the k8s cert-manager
Downloads
68
Maintainers
Readme
GruCloud Module for the K8s Cert Manager
Integrate the jetstack cert-manager with GruCloud.
## How to use this module
npm i @grucloud/module-k8s-cert-manager
Require the package @grucloud/module-k8s-cert-manager
const CertManager = require("@grucloud/module-k8s-cert-manager");
The CertManager exposes these functions:
- createResources
- config
- loadManifest
loadManifest will tell the K8s provider about the Cert Manager CRDs.
const createStack = async ({ stackAws }) => {
const provider = K8sProvider({
configs: [require("./configK8s"), CertManager.config],
manifests: await CertManager.loadManifest(),
});
const certManagerResources = await CertManager.createResources({
provider,
});
return { provider, resources: certManagerResources };
};
Contributing
The cert-manager manifest is transformed into javascript code using the k8s-manifest2code tool:
Change the version
Change the Cert Manager version in the download-manifest
script located in package.json.
Found the latest version at https://github.com/jetstack/cert-manager/tags
Download the new manifet
This script calls curl wit the right options:
npm run download-manifest
Generate resources.js
The gen-code script is a wrapper around k8s-manifest2code. The manifest cert-manager.yaml previously downloaded is transformed into resource.js which exports the createResource function.
npm run gen-code