Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Oct 2, 2020. It is now read-only.
/ kuban Public archive

Kuban is a custom kubernetes wrapper for ansible that make possible to build kubernetes reusable charts simpler

License

Notifications You must be signed in to change notification settings

kivio/kuban

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Migrated to Gitlab: https://gitlab.com/mkandco/kuban

kuban

Kuban is a custom kubernetes wrapper for ansible that make possible to build kubernetes reusable charts simpler

How kuban will work look like main.yaml:

- name: Rabbitmq configurations files
  configMap:
    name: {{ project.name }}-config
    labels: {{ project.labels }}
    data:
      - {{ lookup('file', 'enabled_plugins') }}
      - {{ lookup('template', 'rabbitmq.conf') }}

- name: Rabbitmq secrets
  secret:
    name: {{ project.name }}-auth
    labels: {{ project.labels }}
    type: Opaque
    data: 
      user: "rabbitmq-user"
      password: {{ lookup('onepassword', 'rabbitmq-user', field='rabbitmq-password') }}

- name: Gather config files
  find:
    paths: ./init-config/
  register: config-files

- name: Rabbitmq initial config
  configMap:
    name: {{ project.name}}-init-{{ item.name }}
    labels: {{ project.labels }}
    data:
      - {{ item.name }} :|
        {{ lookup('file', item.path) }}
  loop: "{{ config-files }}"

- name: Rabbimtq Statefullset
  include: statefullset.yaml

and next file `statefullset.yaml' can look like:

- name: Rabbitmq-statefullset creation
  statefullSet:
    name: {{ project.name }}-service
    labels: {{ project.labels }}
    spec: 
      containers:
        image: {{ project.image }}:{{ project.version }}
        ...

What difference to Helm Charts - ansible lookups, ready to use modules that can analyse code and other parameters and based on that create proper constructions. Like in example loading files from proper directory as configMaps.

How to run it:

kubanctl create ./my-code-here

Example structure of directory /my-code-here:

my-code-here/
  variables.yml
  main.yaml
  statefullset.yaml
  init-config/
    users.json
    auth.conf

Variables files can be stored out of repository to make it more flexible:

kubanctl create ./my-code-here -v variables.yaml -v /tmp/s3conf/var.yaml

About

Kuban is a custom kubernetes wrapper for ansible that make possible to build kubernetes reusable charts simpler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages