<commit_before># Yeoman generator for you Kubernetes boilerplate code

[![Build Status](https://travis-ci.org/sesispla/generator-kubegen.svg?branch=master)](https://travis-ci.org/sesispla/generator-kubegen)
[![Coveralls](https://img.shields.io/coveralls/sesispla/generator-kubegen.svg)](https://coveralls.io/github/sesispla/generator-kubegen)
![Version](https://img.shields.io/npm/v/generator-kubegen.svg)
[![npm](https://img.shields.io/npm/dm/generator-kubegen.svg)](https://www.npmjs.com/package/generator-kubegen)

kubegen is a tool that aims to simplify your Kubernetes day-to-day, writing the boilerplate code for you and letting you focus on the important things.

kubegen is a [Yeoman](http://yeoman.io) generator, so you'll need to have [NodeJS](https://nodejs.org/) installed.

# Installation

To install kubegen, you need to execute the following command:

```bash
npm install generator-kubegen
```

# Usage

Quite easy! The follwing commands are available at the moment:

| Command                | Description                                                                                         | Arguments                              |
| ---------------------- | --------------------------------------------------------------------------------------------------- | -------------------------------------- |
| yo kubegen             | Starts a full Kubernetes file generation wizard. All generated files are stored in a new folder.    | --apply: Spawns a "kubectl apply -f " to all files generated immediately <br> --create: Spawns a "kubectl create -f " to all files generated immediately <br> --delete:  Spawns a "kubectl delete -f " to all files generated immediately |
| yo kubegen:deployment  | Starts the Deployment subgenerator. 'deployment.yml' file is created, in the current folder.        |
| yo kubegen:rc          | Starts the Replication Controller subgenerator. 'rc.yml' file is created, in the current folder.    |
| yo kubegen:service     | Starts the Service subgenerator. 'service.yml' file is created, in the current folder.              |
| yo kubegen:ingress     | Starts the Replication Controller subgenerator. 'deployment.yml' file is created, in the current folder.   |                                 |
| yo kubegen:apply <folder> | Spawns a kubectl apply -f file to all files present in the given folder                          | Optional: The folder where the command should be spawned |
| yo kubegen:create <folder> | Spawns a kubectl create -f file to all files present in the given folder                        | Optional: The folder where the command should be spawned |
| yo kubegen:delete <folder> | Spawns a kubectl delete -f file to all files present in the given folder                        | Optional: The folder where the command should be spawned |

```bash
yo kubegen

 |  |/  / |  |  |  | |   _  \  |   ____| /  _____||   ____||  \ |  |
 |  '  /  |  |  |  | |  |_)  | |  |__   |  |  __  |  |__   |   \|  |
 |    <   |  |  |  | |   _  <  |   __|  |  | |_ | |   __|  |  . `  |
 |  .  \  |  `--'  | |  |_)  | |  |____ |  |__| | |  |____ |  |\   |
 |__|\__\  \______/  |______/  |_______| \______| |_______||__| \__|

Welcome to Kubernetes Generator (kubegen)!
? How the service should be named? nginx
? In which Namespace should be deployed? default
? Which type of Pod controller mechanism whould you like to use? Deployment
? (Deployment) Which Docker image should the Deployment use? nginx
? (Deployment) How much container replicas should be created? 1<commit_msg>#3 Removed all referentes to subgenerators that spawn commands, and left only the --apply argument for the app generator<commit_after># Yeoman generator for you Kubernetes boilerplate code

[![Build Status](https://travis-ci.org/sesispla/generator-kubegen.svg?branch=master)](https://travis-ci.org/sesispla/generator-kubegen)
[![Coveralls](https://img.shields.io/coveralls/sesispla/generator-kubegen.svg)](https://coveralls.io/github/sesispla/generator-kubegen)
![Version](https://img.shields.io/npm/v/generator-kubegen.svg)
[![npm](https://img.shields.io/npm/dm/generator-kubegen.svg)](https://www.npmjs.com/package/generator-kubegen)

kubegen is a tool that aims to simplify your Kubernetes day-to-day, writing the boilerplate code for you and letting you focus on the important things.

kubegen is a [Yeoman](http://yeoman.io) generator, so you'll need to have [NodeJS](https://nodejs.org/) installed.

# Installation

To install kubegen, you need to execute the following command:

```bash
npm install generator-kubegen
```

# Usage

Quite easy! The follwing commands are available at the moment:

| Command                | Description                                                                                                | Arguments                                                                |
| ---------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| yo kubegen             | Starts a full Kubernetes file generation wizard. All generated files are stored in a new folder.           | --apply: Spawns a "kubectl apply -f " to all files generated immediately |
| yo kubegen:deployment  | Starts the Deployment subgenerator. 'deployment.yml' file is created, in the current folder.               |                                                                          |
| yo kubegen:rc          | Starts the Replication Controller subgenerator. 'rc.yml' file is created, in the current folder.           |                                                                          |
| yo kubegen:service     | Starts the Service subgenerator. 'service.yml' file is created, in the current folder.                     |                                                                          |
| yo kubegen:ingress     | Starts the Replication Controller subgenerator. 'deployment.yml' file is created, in the current folder.   |                                                                          |

```bash
yo kubegen

 |  |/  / |  |  |  | |   _  \  |   ____| /  _____||   ____||  \ |  |
 |  '  /  |  |  |  | |  |_)  | |  |__   |  |  __  |  |__   |   \|  |
 |    <   |  |  |  | |   _  <  |   __|  |  | |_ | |   __|  |  . `  |
 |  .  \  |  `--'  | |  |_)  | |  |____ |  |__| | |  |____ |  |\   |
 |__|\__\  \______/  |______/  |_______| \______| |_______||__| \__|

Welcome to Kubernetes Generator (kubegen)!
? How the service should be named? nginx
? In which Namespace should be deployed? default
? Which type of Pod controller mechanism whould you like to use? Deployment
? (Deployment) Which Docker image should the Deployment use? nginx
? (Deployment) How much container replicas should be created? 1
{'fraction_non_alphanumeric': 0.15487375220199648, 'fraction_numerical': 0.00044039929536112744, 'mean_word_length': 1.8141263940520447, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 8, 'https://': 16, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 25, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4567582', 'n_tokens_mistral': 1948, 'n_tokens_neox': 1856, 'n_words': 555}