@mcpg-dev/pulumi-crds

中文文档
0.1.0-beta.45发布于 2026/11/02Apache-2.0TypeScriptCommonJS构建来源已验证

Typed Pulumi resource classes for the mcpg.dev custom resources, generated from the MCPG CRD schemas.

原始使用文档
文档目录6 节
  1. Quick start
  2. Resources
  3. Higher-level components
  4. Licence
  5. See also
  6. Building and testing

@mcpg/pulumi-crds

Typed Pulumi resource classes for the mcpg.dev custom resources — the Kubernetes API served by the MCPG operator. Declare an MCPGGateway, an MCPGPluginSet, or any other MCPG resource in a Pulumi program with real TypeScript types, completion, and diffs, instead of pushing untyped YAML through a generic config group.

The package is generated from the MCPG CRD schemas with crd2pulumi and committed as generated. Do not edit it by hand: change the CRDs and regenerate.

Quick start

import { mcpg } from "@mcpg/pulumi-crds";

new mcpg.v1alpha1.MCPGGateway("orders", {
  metadata: { namespace: "mcpg-system" },
  spec: {
    image: { repository: "ghcr.io/mcpg-dev/source-code/gateway", tag: "<tag>" },
    config: {},
  },
});

Resources

mcpg.v1alpha1 exports one class per MCPG kind, plus …List and …Patch variants of each for reading collections and for server-side-apply patches.

ClassWhat it declares
MCPGGatewayA gateway deployment and the configuration it serves.
MCPGClusterThe coordination backend a gateway cluster shares.
MCPGRouteA tool subset bound into a shared gateway, with its chains.
MCPGTenantA tenant boundary: namespaces, plugin allowlist, quotas.
MCPGPluginA plugin artifact and the trust it must satisfy.
MCPGPluginSetAn ordered plugin list and its capability grants.
MCPGPluginMirrorAn in-cluster mirror for plugin artifacts.
MCPGRevocationListRevoked plugin artifacts, by digest.

Higher-level components

These classes are the raw resource surface. For components that install the operator, own the CRD lifecycle, assemble a gateway's configuration, and set up tenants, use @mcpg/pulumi, which is built on this package.

Licence

Apache-2.0.

See also

Building and testing

npm install
npm run build

版本与发布记录

@mcpg-dev/pulumi-crds 共发布 30 个版本,首次发布于 2026/08/13;过去 12 个月发布了 30 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.1.0-beta.45latest2026/11/021 天前
0.1.0-beta.442026/11/012 天前
0.1.0-beta.432026/10/303 天前
0.1.0-beta.422026/10/2410 天前
0.1.0-beta.412026/10/1915 天前
0.1.0-beta.402026/10/1816 天前

其他发布通道:canary → 0.1.0-canary.732,beta → 0.1.0-beta.13。

关于 @mcpg-dev/pulumi-crds 的常见问题

@mcpg-dev/pulumi-crds 是什么?

从MCPG CRD模式生成的MCPG .dev自定义资源的类型化Pulumi资源类。

如何安装 @mcpg-dev/pulumi-crds?

在项目目录运行 npm install @mcpg-dev/pulumi-crds,或使用 pnpm add / yarn add / bun add。

@mcpg-dev/pulumi-crds 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@mcpg-dev/pulumi-crds 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@mcpg-dev/pulumi-crds 可以商用吗?

@mcpg-dev/pulumi-crds 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@mcpg-dev/pulumi-crds 还在维护吗?

最新版本 0.1.0-beta.45 发布于 2026/11/02(1 天前);至今共发布 30 个版本,其中过去 12 个月发布了 30 个;首次发布于 2026/08/13。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。