tree: ccd091ff84683673fc2162175874315fde9b0781 [path history] [tgz]
  1. dev/
  2. env/
  3. src/
  4. LICENSE
  5. package.json
  6. README.md
  7. tsconfig.json
packages/k8s-yaml-to-apiserver-requests/README.md

K8s YAML to APIServer Requests

Library to map Kubernetes API resources and apply resource YAMLs

Features

  • interpolateK8sResourceYamls(): Given an YAML and a tokens map, interpolate the YAML content with values provided by the token map. Tokens are represented with ${{token.path.name}}.
  • parseK8sResourceYaml(): Given a YAML file, return an array of JSON objects parsed.
  • buildK8sApiServerEndpointsByResourceKind(): Generates a map of Kubernetes resources and their API endpoints.
  • callK8sApiServer(): Make the requests to the Kubernetes APIServer in order to create given resources.

How to use

Import as a library and invoke the functions described above.

How to test

Run

pnpm start <k8sApiServerUrl> <k8sNamespace> <k8sServiceAccountToken> <k8sYamlFilepath>

to test changes made to this libray.

Example:

pnpm start https://api.to.my.openshift.cluster.com:6443 my-project sha256~MGnPXMPsi1YJkCV6kr970gQYI6KtQWztIObm3jQxUJI ../myDeployment.yaml

Apache KIE (incubating) is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Some of the incubating project’s releases may not be fully compliant with ASF policy. For example, releases may have incomplete or un-reviewed licensing conditions. What follows is a list of known issues the project is currently aware of (note that this list, by definition, is likely to be incomplete):

  • Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2

  • Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header

  • Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2

  • Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header

If you are planning to incorporate this work into your product/project, please be aware that you will need to conduct a thorough licensing review to determine the overall implications of including this work. For the current status of this project through the Apache Incubator visit: https://incubator.apache.org/projects/kie.html