Skip to content

Commit

Permalink
fix: gcp empty secret handling (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra authored Nov 18, 2024
1 parent cb0e181 commit 28d2122
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/secrets/gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ type GCPSealedSecret struct{}

func (s GCPSealedSecret) GenerateSealedSecret(params SealedSecretParams) ([]byte, error) {
// We setup SQLUser and database via CRDs
return nil, nil
return []byte(""), nil
}
2 changes: 2 additions & 0 deletions pkg/tenant/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ spec:
values:
domain: {{.host}}
tenantSlug: {{.slug}}
cloud: {{.cloud}}
vcluster:
syncer:
extraArgs:
Expand Down Expand Up @@ -68,6 +69,7 @@ func GetTenantResources(tenant v1.Tenant, sealedSecret string) (obj []*unstructu
"jwksURL": v1.GlobalConfig.Clerk.JWKSURL,
"id": tenant.ID,
"orgID": tenant.OrgID,
"cloud": tenant.Cloud,
}
helmReleaseRaw, err := utils.Template(HELM_RELEASE_TEMPLATE, vars)
if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func RandomString(length uint) string {
func GetUnstructuredObjects(data ...string) ([]*unstructured.Unstructured, error) {
var items []*unstructured.Unstructured
for _, d := range data {
if d == "" {
continue
}
decoder := yamlutil.NewYAMLOrJSONDecoder(bytes.NewReader([]byte(d)), 1024)
var resource *unstructured.Unstructured

Expand Down

0 comments on commit 28d2122

Please sign in to comment.