keptn-provisioning
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

keptn-provisioning-npm

Standard - JavaScript Style Guide

NPM

Create or update projects, stages, and services Keptn. Also enabled monitoring for SLO.

Example

import { provisioning } from "keptn-provisioning";

// If you select this section will use port-forwarding and Keptn API token will get from K8s secrets
const keptnResourcesInKubernetes = `{
  "enabled": true,
  "namespace": "keptn",
  "secret": "keptn-api-token",
  "service": "api-gateway-nginx"
}`;

// If you have public Keptn URL and `enabled = false` please fill these settings
const keptnAuth = `{
  "keptnURL": "",
  "token": ""
}`;

const config = `{
  "projects": [
    {
      "name": "test",
      "github": {
        "url": "https://github.test.com",
        "user": "github-user",
        "token": "github-pat",
        // For personal repo - "owner" is similar with "user"
        "owner": "github-organization-name",
        "repo": "github-repo-name",
        "isPrivateRepo": true,
        "isOrganization": true,
        "isEnterprise": true
      },
      "stages": [
        {
          "name": "develop"
        }
      ],
      "services": [
        {
          "name": "test",
          // Upload all files from this folder (optional)
          "workdir": "services/test",
          // Enable monitoring for SLO (optional)
          "monitoring": {
            "enabled": true,
            "type": "prometheus"
          }
        }
      ],
      "shipyardPath": "projects/test/shipyard.yaml"
    }
  ]
}`;

provisioning(config, keptnAuth, keptnResourcesInKubernetes);

Readme

Keywords

Package Sidebar

Install

npm i keptn-provisioning

Weekly Downloads

0

Version

1.1.2

License

Apache License 2.0

Unpacked Size

35.8 kB

Total Files

32

Last publish

Collaborators

  • moon1706