Kuberig

Kuberig

  • Docs
  • Blog
  • Help

›Environments

Getting started

  • Intro
  • Quick Start
  • DSL Intro

Environments

  • Initializing an Environment
  • Managing Container Versions
  • Environment Support

Resource Coding

  • Coding Resources
  • Resource Grouping
  • Resource Apply Action
  • DSL Details

Code Samples

  • Defining a ConfigMap
  • Defining a Secret
  • Defining a Deployment
  • Defining a Service
  • Defining an Ingress

Reference

  • Configuration
  • Repository Organisation
  • Encryption Support
  • Service Account Setup

Environment Support

Environments are a first-class concept in KubeRig.

Each environment has its own sub-directory in the environments directory.

The environment sub-directory contains at least:

  • The CA certificate of the cluster.
  • The configs properties file.
  • The keyset.json encryption key.
  • An encrypted access token of the service account that is used to deploy to the environment.

Environment specific information is available during resource generation via the following methods of the ResourceGenerationContext:

  • environmentFileText pass in a relative path to the environment sub-directory.
  • environmentFileBytes pass in a relative path to the environment sub-directory.
  • environmentConfig pass in a key available in the configs properties file.

Environment Specific Tasks

After initializing/creating an environment with the initEnvironment task KubeRig provides a number of tasks to execution actions specifically for the environment.

Deploy Task

There is a deploy task for every environment.

This task will directly communicate with the Kubernetes API to create/update the resources that you have defined using the KubeRig DSL.

Generate Yaml task

In case you need it or feel nostalgic there is a generateYaml task for every environment.

The files are generated inside the build/generated-yaml directory. For each environment you will find a subdirectory there containing the generated yaml files.

Encryption tasks

Various tasks to encrypt/decrypt files an configuration parameters. More information about those can be found on the encryption support page.

Last updated on 1/2/2021
← Managing Container VersionsCoding Resources →
  • Environment Specific Tasks
    • Deploy Task
    • Generate Yaml task
    • Encryption tasks
Kuberig
Docs
HomeQuick StartDSL Intro
Community
Stack OverflowDiscordTwitter
More
BlogGitHubStar
Follow @kuberigio
Copyright © 2021 Rigeldev BV