@appthrust/kubernetes-models-appthrust
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

@appthrust/appthrust

appthrust models.

Installation

Install with npm.

npm install @appthrust/appthrust@0.1.0

Usage

import { Project, IProject } from "@appthrust/appthrust/projects.appthrust.io/v1alpha1";

// Create a new Project
const project = new Project({
  metadata: {
    name: "my-project",
  },
  spec: {
    displayName: "My Project",
    description: "This is my first project",
    template: "nodejs",
  },
});

// Validate against JSON schema
project.validate();

// Get the raw JSON representation
const json = project.toJSON();

// Create a new instance from JSON
const anotherProject = new Project(json);

Getting CRDs from appthrust repository

If you encounter issues with the token expiring when getting CRDs, you can clone the appthrust repository and specify the relative path to the CRD files instead.

  1. Clone the appthrust repository:
git clone https://github.com/appthrust/appthrust.git
  1. In your package.json, update the crd-generate.input field to point to the cloned CRD files. For example:
"crd-generate": {
  "input": [
    "../../appthrust/apps/project/crds/projects.appthrust.io.yaml"
  ],
  "output": "./gen"
}

This way, the CRDs will be read from the cloned repository instead of the token URL.

License

MIT

Package Sidebar

Install

npm i @appthrust/kubernetes-models-appthrust

Weekly Downloads

49

Version

0.4.0

License

MIT

Unpacked Size

56.9 kB

Total Files

17

Last publish

Collaborators

  • suin
  • k-okina
  • zimagen