capactio / capact

Simple way to manage applications and infrastructure.
https://capact.io
Apache License 2.0
80 stars 19 forks source link

Implement Helm release storage backend #677

Closed mszostok closed 2 years ago

mszostok commented 2 years ago

Description

Changes proposed in this pull request:

Related PR: https://github.com/capactio/hub-manifests/pull/62. In backend, we have an assumption that the data is validated by Local Hub, so we receive a valid context with all required fields.

Testing

Setup

  1. Create k8s cluster. For example, run:
    k3d cluster create test
  2. Install PostgreSQL Helm chart:
    RUNNER_CONTEXT_PATH=cmd/helm-runner/example-input/context.yaml \
     RUNNER_ARGS_PATH=cmd/helm-runner/example-input/install-args.yaml \
     RUNNER_LOGGER_DEV_MODE=true \
     RUNNER_COMMAND="install" \
     go run cmd/helm-runner/main.go

    Testing

  3. Run server:
    APP_LOGGER_DEV_MODE=true APP_MODE="release" go run ./cmd/helm-storage-backend/main.go
  4. Run showcase test:
    GRPC_SECRET_STORAGE_BACKEND_ADDR=":50051" go test ./internal/helm-storage-backend/... -run "^TestShowcase$" -v -count 1

There is also unit test coverage.

Related issue(s)

Fix: https://github.com/capactio/capact/issues/671