Back to Charts

⚠️ Repo Archive Notice

stable/hubot/README.md

latest6.1 KB
Original Source

⚠️ Repo Archive Notice

As of Nov 13, 2020, charts in this repo will no longer be updated. For more information, see the Helm Charts Deprecation and Archive Notice, and Update.

Hubot

Hubot 3 chatbot with the Slack adaptor

Learn more: https://hubot.github.com

DEPRECATION NOTICE

This chart is deprecated and no longer supported.

TL;DR;

bash
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:

bash
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:

bash
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
fullnameOverrideOverride the full resource names""
replicaCountDesired number of pods1
strategyTypeType of deployment strategyRollingUpdate
image.repositoryContainer image repositoryminddocdev/hubot
image.tagContainer image tag3.3.2
image.pullPolicyContainer image pull policyIfNotPresent
service.typeType of service to createNodePort
service.portPort for the http service80
configHubot configuration (environment variables){}
secretConfigSensitive environment variables passed to Hubot as Secret{}
existingSecretConfigNameReference to an existing Secret with sensitive env vars""
argsArguments passed to Hubot binary["--name", "${HUBOT_NAME}", "--adapter", "--slack"]
extraArgsAdditional arguments to Hubot binary[]
scriptsCustom hubot scripts{}
scriptsRepo.enableFlag to checkout repo with scriptsfalse
scriptsRepo.imageImage with git-synck8s.gcr.io/git-sync:v3.1.2
scriptsRepo.repositoryGit repository to checkout""
scriptsRepo.branchBranch in repository to checkout frommaster
scriptsRepo.usernameGit repo usernamenull
scriptsRepo.passwordPassword for git reponull
scriptsRepo.existingSecretNameSet if your git credentials are stored in some existing Secretnull
extraPackagesList of additional npm packages to install on Hubot startup (usually, dependencies for scripts)[]
externalScriptsContent for external-scripts.json file (all listed packages will be installed on startup)[]
redis.enabledInstall a dependency chart with Redis (needed for hubot-brain)true
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{}
extraConfigMapMountsAdditional configMaps to be mounted (good for extra files, certs)[]
extraLabelsExtra labels to add to the Resources{}
nodeSelectornode selector logic{}
tolerationsresource tolerations{}
affinitynode affinity{}

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

bash
$ helm install --name my-release \
    --set key_1=value_1,key_2=value_2 \
    stable/hubot

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

bash
# example for staging
$ helm install --name my-release -f values.yaml stable/hubot

Tip: You can use the default values.yaml

Specific hubot settings

Config

The chart provides you with two dictionaries: config and secretConfig. Hashes in both of these variables will be exposed to the Hubot process as environment variables and may be picked by scripts.

The difference between them is that the config dictionary will be saved as ConfigMap object, but the value of secretConfig will be saved as a Secret object.

For instance:

yaml
config:
  HUBOT_STANDUP_PREPEND: '@channel'

secretConfig:
  HUBOT_SLACK_TOKEN: 'xxx-secret-token-xxx'

Redis

By default, this chart will deploy a Redis chart as a dependency. It's required by "hubot-redis-brain" script, which provides persistent storage for Hubot. In this case, the value of REDIS_URL environment variable will be set automatically.

If you want Hubot to use an already existing Redis instance, you need to have redis.enabled set to false and then set REDIS_URL variable, pointing to that instance in config or secretConfig dictionaries.

For instance:

redis:
  enabled: false

secretConfig:
  REDIS_URL: "redis://:[email protected]:6379/prefix"

Scripts

There are three ways of how to extend Hubot with scripts:

  • Install via npm and enable in external-scripts.json file
  • Use a git repository with scripts and set scriptsRepo.enabled to true. It's common for companies to have a dedicated repo with customized scripts.
  • List scripts in scripts hash (good for small 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.

For example:

yaml
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'