项目作者: FireBlinkLTD

项目描述 :
FBL plugin for kubectl CLI tool
高级语言: TypeScript
项目地址: git://github.com/FireBlinkLTD/fbl-plugins-k8s-kubectl.git
创建时间: 2019-04-23T14:20:06Z
项目社区:https://github.com/FireBlinkLTD/fbl-plugins-k8s-kubectl

开源协议:MIT License

下载


FBL Plugins: K8s Kubectl

Apply, delete K8s resources inside your FBL flows.

Tests
Known Vulnerabilities
codecov
Total alerts
Language grade: JavaScript

Purpose

fbl is a flow automation tool. That generally means it can automate any kind of routine processes and allows to create some really complex combinations of actions, even non related to deployment (probably, the main reason why you’re currently reading this now).

While cluster deployment is in some cases really simple and some PaaS providers already support cluster creation withing few commands / mouse clicks, service deployment into the cluster is not trivial like that.

At FireBlink we generally treat entire cluster as a single product. As any other software product update of any of its dependencies may lead to unexpected behaviour. We never trust 3rd party vendors to have backward compatibility. So the only way we can be sure that all the services will work consistantly across environment is lock of the versions.

As cluster is a product, it has it’s own version, migration scripts, and set of helm/kubectl commands required to stand up / update the cluster.

To help with that 2 main plugins for FBL has been created:

Generally both plugins are used together, as Secrets should be created outside the helm chart.

Sensitive information can be hosted inside the Git repo and encrypted with @fbl-plugins/crypto.

Flexibility of the deployment is the key concept of FBL and plugins, as we never know what challenges we need to resolve the following day.

Examples

Check fbl-examples repository for usage examples.

Integration

There are multiple ways how plugin can be integrated into your flow.

package.json

This is the most recommended way. Create package.json next to your flow file with following content:

  1. {
  2. "name": "flow-name",
  3. "version": "1.0.0",
  4. "description": "",
  5. "scripts": {
  6. "fbl": "fbl"
  7. },
  8. "license": "UNLICENSED",
  9. "dependencies": {
  10. "@fbl-plugins/k8s-kubectl": "1.0.0",
  11. "fbl": "1.7.0"
  12. }
  13. }

Then you can install dependencies as any other node module yarn install depending on the package manager of your choice.

After that you can use yarn fbl <args> to execute your flow or even register a custom script inside “scripts”.

Global installation

npm i -g @fbl-plugins/k8s-kubectl

Register plugin to be accessible by fbl

  • via cli: fbl -p @fbl-plugins/k8s-kubectl <args>
  • via flow:
  1. requires:
  2. fbl: '>=1.8.0 <2.0.0'
  3. plugins:
  4. '@fbl-plugins/k8s-kubectl': '>=1.1.0'
  5. pipeline:
  6. # your flow goes here

Action Handlers