JSPM

  • Created
  • Published
  • 0
  • Score
    100M100P100Q66463F
  • License ISC

Grucloud module for the k8s cert-manager

Package Exports

  • @grucloud/module-k8s-cert-manager
  • @grucloud/module-k8s-cert-manager/iac

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@grucloud/module-k8s-cert-manager) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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