Sign inSign up

containeroo/helminator

By containeroo

•Updated over 5 years ago

Image
0

10K+

containeroo/helminator repository overview

⁠Helminator

Docker Image Version (latest semver) Docker Pulls Docker Image Size (tag) Docker Cloud Automated build Docker Cloud Build Status GitHub issues Twitter Follow

⁠Introduction

Helminator scans your Ansible playbook for helm and helm_repository tasks. It then checks if there is an update to any of the defined Helm charts available. If configured, it creates a branch and merge request and/or send out a Slack notification. Helminator is built to run in a CI environment (e.g. GitLab CI).

⁠Requirements

⁠Configration

In the examples directory you can find an example playbook including the required GitLab CI configuration.

Helminator takes the following environment variables:

VariableDescriptionExample
HELMINATOR_ANSIBLE_ROOT_DIRDirectory to scan (defaults to CI_PROJECT_DIR)ansible/
HELMINATOR_ANSIBLE_VARS_FILEPath to file with extra variablesvars/main.yml
HELMINATOR_ENABLE_PRERELEASESEnable pre-release processing (defaults to false)true or false
HELMINATOR_VERIFY_SSLVerify ssl certificate (defaults to true)true or false
HELMINATOR_LOGLEVELSet loglevel (defaults to info)one of critical, error, warning, info, debug
HELMINATOR_ENABLE_MERGEREQUESTSCreate for each chart update a merge request (defaults to true)true or false
HELMINATOR_GITLAB_TOKENGitlab access token (more detail see below)12345678
HELMINATOR_GITLAB_REMOVE_SOURCE_BRANCHDelete source branch when merge request is accepted (defaults to true)true or false
HELMINATOR_GITLAB_SQUASH_COMMITSSquash commits when merge request is accepted (defaults to false)true or false
HELMINATOR_GITLAB_AUTOMERGEAccept merge request and close it (defaults tofalse)true or false
HELMINATOR_GITLAB_MERGE_MAJORAutomerge also major updates (defaults tofalse)true or false
HELMINATOR_GITLAB_ASSIGNEESList of name of assignees, separate by a commauser1,user2
HELMINATOR_GITLAB_LABELSList of labels to set on a merge request, separate by a comma. set it to "" for no labels (defaults to helminator)helm,update,k8s
HELMINATOR_SLACK_API_TOKENSlack API Tokenxorb-abc-def
HELMINATOR_SLACK_CHANNELSlack channel to send message to#kubernetes

GITLAB_TOKEN Add a user as member with role developer to a project and use his token.

⁠Slack App

To receive Slack notifications you have to create a Slack App. Please refer to this guide⁠.

⁠Usage

Ansible Playbook example: playbook-k8s⁠

⁠GitLab

If you want to use Helminator in a GitLab CI / CD job, you can use the follwing .gitlab-ci.yml as an example:

image:
  name: containeroo/helminator:latest
  entrypoint: [""]

stages:
  - helminator

helminator:
  stage: helminator
  only:
    - schedules
  script: python /app/helminator.py

In order to set the configration environment variables, go to your project (repository) containing the playbook.
Go to Settings -> CI / CD -> Variabels -> Expand.

After you have set all variables you can create a pipeline schedule. This ensures your job runs regularly.

Tag summary

Content type

Image

Digest

Size

26.6 MB

Last updated

over 5 years ago

docker pull containeroo/helminator