hubot

by joaquinito2051

Helm chartv0.0.1App 0.1.9

Hubot chatbot for Slack

About this chart

Hubot

Hubot 3 chatbot with the Slack adaptor

Learn more: https://github.com/mind-doc/hubot

TL;DR;

$ helm install <helm-repo>/hubot

$ helm install stable/hubot

Introduction

This chart creates a Hubot deployment on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes 1.8+ with Beta APIs enabled

Installing the Chart

To install the chart with the release name my-release:

$ helm install --name my-release <helm-repo>/hubot

$ helm install --name my-release stable/hubot The command deploys Hubot on the Kubernetes cluster using the default configuration. The configuration section lists the parameters that can be configured during installation.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete --purge my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the Hubot chart and their default values.

ParameterDescriptionDefault
namespacenamespace to usedefault
replicaCountdesired number of pods1
image.repositorycontainer image repositoryminddocdev/hubot
image.tagcontainer image taglatest
image.pullPolicycontainer image pull policyAlways
service.typetype of service to createNodePort
service.httpPortport for the http service80
ingress.enabledflag to add ingress functionalityfalse
ingress.annotationsingress load balancer annotationsAlways
ingress.pathproxied path/
ingress.hostsproxied hosts[ hubot.local ]
ingress.tlstls certificate secrets[]
resourcesresource requests & limits{}
nodeSelectornode selector logic{}
tolerationsresource tolerations{}
affinitynode affinity{}
hubot.confighubot configuration (environment variables){}
hubot.scriptsFolderhubot scripts folder path/minddocbot/scripts
hubot.scriptscustom hubot scripts{ health.coffee: <script content> }
hubot.slackTokenslack hubot integration token''

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
$ helm install --name my-release \
    --set key_1=value_1,key_2=value_2 \
    <helm-repo>/hubot
$ helm install --name my-release \

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

# example for staging
$ helm install --name my-release -f values.yaml <helm-repo>/hubot

$ helm install --name my-release -f values.yaml stable/hubot

Tip: You can use the default values.yaml

Specific hubot settings

Config

With the hubot.config parameter you can provide a hash that will be used as environment variables by hubot. These environment variables will be picked by hubot's scripts.

For instance:

hubot:
  config:
    HUBOT_STANDUP_PREPEND: '@channel'

Scripts

In addition, you can add your own scripts, which will be created in the scripts folder, with .js or .coffee format. See Hubot Scripting.

By default, this chart adds a health endpoint so Kubernetes can probe the pod.

hubot:
  scripts:
    health.coffee: |
      # Description
      #   A hubot script that exposes a health endpoint
      module.exports = (robot) ->
        robot.router.get '/health', (req, res) -> res.status(200).end()

You can follow the same format for creating your own hubot scripts

hubot:
  scripts:
    hithere.coffee: |
      # Description
      #   A hubot script that is an example for this chart
      module.exports = (robot) ->
        robot.respond /hi my bot/i, (msg) ->
          msg.send 'Hi there my human'

Deploy hubot with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has hubot on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the charthubot is pinned at v0.0.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply