Files
wlan-toolsmith/helmfile/cloud-sdk
Johann Hoffmann eee3b1690b [WIFI-10088] Research and install solution to keep coredumps for debugging purposes (#215)
* Add IAM user and bucket for core-dump-handler

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>

* Fix Terraform format

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>

* Add core-dumps-s3 to Atlantis

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>

* Remove outputs.tf and switch to separate S3 ACL resource

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>

* Fix Terraform state key name

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>

* Add core-dump-handler to helmfile

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>

* Commit helmfile.lock

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>

* Enable helmfile deployment of core-dump-handler

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
2022-07-21 17:33:42 +02:00
..

Helmfile

This directory contains all things required for TIP EKS infrastructure setup. It uses Helmfile for one-command installation

Requirements

Following tools are required to be installed on your local machine to fully utilize this Helmfile:

  1. Helmfile
  2. Helm 3
  3. Helm diff - used during deployments by default for a better changes transparency
  4. Helm secrets
  5. sops

Helm secrets

Helm secrets is a tool that may be used to store secrets in Git repository in ecrypted form. sops is a tool that Helm secrets uses for encryption/decryption operations.

Currently all secrets are stored in secrets directory, where you can find all encrypted files and .sops.yaml file that defines that all new secrets should be encrypted with AWS KMS key.

To work with secret, you need to have your AWS credentials set with administrator role in wifi account, then you would be able to make operations with files (for example to edit secret use helm secrets edit $SECRET_FILE).

If you need to encrypt new file, you simply need to write it in plaintext, then run helm secrets enc $PLAINTEXT_SECRET_FILE - helm secrets will automatically use encryption key defined in .sops.yaml

You can use secrets in Helmfile the same way as values:

  1. Add secrets in environment
  2. Use {{ .Environment.Values... }} where you need it in releases definition

For example, if we have secret secrets/example.yaml

example:
  secretKey: "topSecret"

usage of it will look like this:

environments:
  example:
    secrets:
      - secrets/example.yaml

releases:
- name: example
  values:
  - secretKey: {{ .Environment.Values.example.secretKey }}

Usage

  1. Set credentials that are required to connect to Kubernetes cluster
  2. (optional) If you are going to use environment with secrets, make sure that you also have credentials required for access to AWS KMS key
  3. Run helmfile --environment $ENVIRONMENT diff to see changes that would be applied
  4. If everything is correct, run helmfile --environment $ENVIRONMENT apply to see changes that would be applied

If you would like to limit releasae that you would like to affect, you may use labels. For example, if you want to see changes that would be done only to influxdb release in amazon-cicd environment, you may run helmfile --environment amazon-cicd --selector app=influxdb diff