Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP better readme #41

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,39 @@ This is a module for [jk][] that helps generate [Kubernetes][] configuration.

[![Build Status](https://travis-ci.org/jkcfg/kubernetes.svg?branch=master)][build-status]

There are four sets of modules, which give different, but compatible,
ways of constructing Kubernetes objects. In addition, there are a
handful of modules for making use of Kubernetes objects, adapting them
to be output via `jk generate`, transforming them in various ways, and
so on.

| Module | purpose | examples |
|-------------|------------------------------------------------|-----------------------|
| `api` | Class definitions for Kubernetes API objects | none |
| `chart` | Analogue of Helm charts, defined in JavaScript | in the [jk repo][] |
| `overlay` | Patch and transform objects | in the [jk repo][] |
| `short` | Shorthands for Kubernetes API objects | none at present |
| ----------- | ---------------------------------------------- | --------------------- |
| `generate` | Prepare Kubernetes objects for `jk generate` | used in other modules |
| `transform` | Transformations used in overlays | used in overlays |
|

## Kubernetes API classes

The module `@jkcfg/kubernetes/api` contains class definitions for
Kubernetes API objects, nested in their API groups.

```js
import * as k8s from '@jkcfg/kubernetes/api';
import { valuesForGenerate } from '@jkcfg/kubernetes/generate';

export default valusForGenerate([new k8s.core.v1.Namespace('hello')]);
```

## Chart module

The module `@jkcfg/`

[jk]: https://github.com/jkcfg/jk
[Kubernetes]: https://kubernetes.io/
[build-status]: https://travis-ci.org/jkcfg/kubernetes