mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-02 14:26:23 -04:00
Refactor Helm deployments (#341)
* Wrap KMS deployment in one main chart that deploys all other services. Other services will follow. * Use .tgz via helm-package as serialization format * Change Release type to carry chart as byte slice * Remove KMSConfig * Use json-schema to validate values * Extend release.md to mention updating helm charts
This commit is contained in:
parent
10a207c7ec
commit
07f02a442c
31 changed files with 261 additions and 119 deletions
34
cli/internal/helm/loader_test.go
Normal file
34
cli/internal/helm/loader_test.go
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
Copyright (c) Edgeless Systems GmbH
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package helm
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/edgelesssys/constellation/v2/internal/cloud/cloudprovider"
|
||||
"github.com/edgelesssys/constellation/v2/internal/deploy/helm"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"helm.sh/helm/v3/pkg/chart/loader"
|
||||
)
|
||||
|
||||
func TestLoad(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
chartLoader := ChartLoader{}
|
||||
release, err := chartLoader.Load(cloudprovider.GCP, true, []byte("secret"), []byte("salt"))
|
||||
assert.NoError(err)
|
||||
|
||||
var helmReleases helm.Releases
|
||||
err = json.Unmarshal(release, &helmReleases)
|
||||
assert.NoError(err)
|
||||
reader := bytes.NewReader(helmReleases.ConstellationServices.Chart)
|
||||
chart, err := loader.LoadArchive(reader)
|
||||
assert.NoError(err)
|
||||
assert.NotNil(chart.Dependencies())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue