Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Helm storage backend logic #650

Closed
5 tasks done
Tracked by #604
mszostok opened this issue Mar 1, 2022 · 1 comment · Fixed by capactio/website#116
Closed
5 tasks done
Tracked by #604

Implement Helm storage backend logic #650

mszostok opened this issue Mar 1, 2022 · 1 comment · Fixed by capactio/website#116
Assignees
Labels
area/engine Relates to Engine area/hub Relates to Hub enhancement New feature or request
Milestone

Comments

@mszostok
Copy link
Member

mszostok commented Mar 1, 2022

Description

Blocked By: #645

As the Helm backend storage and allow its discovery and consumption via dedicated TypeInstance.

Subtasks

AC

The Helm storage backend consists of two quite independent parts:

Helm release storage

Helm template storage

A storage backend that supports helm templating:

  • Implement as a part of the same binary of the Helm release storage
  • Create dedicated Type for a given Storage backend TypeInstance
    - In context: go template + helm release name + namespace
  • Implement templating support:
    • Template passed in context to the storage backend - it is specified and stored in Local Hub on create/update
    • The service renders the template against the manifests and values for the installed release, and returns the output
    • (Almost) the same logic that we have currently in Helm Runner

Common

  • Modify Helm runner:
    - Remove output.goTemplate. As discussed with @mszostok, we'll keep it to have it as a support for further workflow steps
    - Stop supporting usage of funcs from _helpers.tpl As discussed with @mszostok, we'll keep it to have it as a support for further workflow steps
    • Update JSON Schema for Type
    • Add another output from Helm Runner - create artifact, which puts context for Helm release backend
  • Add dedicated manifests (probably Action) to install Helm storage (same approach as in Configure Secret storage backend to be used with Local Hub #647)
    • Single Helm chart, one deployment, two containers and two separate services
    • The implementation produces two TypeInstances for two storage backends (helm release + helm template)
  • Update pipelines for releasing Helm charts and building image
  • Created dedicated documentation on our website under storage backend section:
    Screen Shot 2022-03-01 at 10 02 28
    • mention two separate modules of a given storage backend (actually, they are separate storage backends)
  • Create a new PostgreSQL and Mattermost Implementation revisions to showcase that the Helm storage works properly.
  • Out of scope: other manifests

Related issues

See epic #604 for the reason and use cases.

@mszostok mszostok changed the title Helm Runner [builtin: 3MD / external: 8MD] Implement Helm storage backend logic Mar 1, 2022
@mszostok mszostok added area/engine Relates to Engine area/hub Relates to Hub labels Mar 1, 2022
@mszostok mszostok added this to the 0.7.0 milestone Mar 1, 2022
@pkosiec pkosiec added the enhancement New feature or request label Mar 15, 2022
@pkosiec pkosiec self-assigned this Mar 16, 2022
@pkosiec
Copy link
Member

pkosiec commented Mar 16, 2022

Proposed subtasks:

Setup [2MD] (no dependencies)

It can be further split into two tasks, but I don't think it makes sense to do so. The most important thing is that the point no 1 needs to be done ASAP to unblock other subtasks.

  1. Bootstrap Go code for the helm storage backends (no dependencies) [0.5MD]
    • Single entrypoint (directory in cmd)
    • Based on flags, a different storage backend gRPC server is run
    • Both servers (release + template) implement the same Storage Backend ProtoBuf interface (use already generated Go code)
    • Modify pipelines to build a single Docker image
  2. Add dedicated Helm chart and Hub manifests to install Helm storage backends (dependency: 1, but it can be developed/tested with a usage of different docker images initially, so it can be started in parallel to 1) [1.5MD]
    • Single Helm chart, one deployment, two containers and two separate services
    • The implementation produces two TypeInstances for two storage backends (helm release backend + helm template backend) - define them
    • Update pipelines for releasing Helm charts
    • Write instruction on PR how to install such storage backend. It will be later reused in documentation
    • Base on secret storage backend, as this is pretty similar case (Configure Secret storage backend to be used with Local Hub #647)

Helm release backend implementation [1MD] (dependency: Setup/1)

  1. Implement Helm release backend logic

Helm template backend implementation [2MD] (dependency: Setup/1)

  1. Implement Helm template backend logic

Storage usage [3MD] (dependency: Setup)

  1. Modify Helm runner (dependency: 2 - agree on Helm Release artifact shape)
    • Remove output.goTemplate.
    • Stop supporting usage of funcs from _helpers.tpl
    • Update JSON Schema for Type
    • Require Helm storage (agree on a given manifest path)
    • Update output Helm Release artifact shape (put context for Helm storage backend)
  2. Create a new PostgreSQL and Mattermost Implementation revisions to showcase that the Helm storage works properly.
    • Create Helm Template artifacts on PostgreSQL install and Mattermost install level (put context for Helm storage backend)
    • Create new helm.install Impl revision
    • Create new helm.upgrade Impl revision
    • Out of scope: other manifests

Documentation [1MD] (dependency: Setup)

  1. Created dedicated documentation on our website under storage backend section:
    Screen Shot 2022-03-01 at 10 02 28
    • mention two separate modules of a given storage backend (actually, they are separate storage backends)
    • reuse instruction from PR description from Setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/engine Relates to Engine area/hub Relates to Hub enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants