Skip to content

Commit

Permalink
Add secret organization access policy configurability (#212)
Browse files Browse the repository at this point in the history
* Add secret organization access policy configurability

* Update yaml.v2 to newest version to fix dependabot issues
  • Loading branch information
hamir-suspect committed Feb 20, 2023
1 parent ea188d1 commit dd2c565
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions api/models/secret_v1_beta.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type SecretV1Beta struct {

Metadata SecretV1BetaMetadata `json:"metadata" yaml:"metadata"`
Data SecretV1BetaData `json:"data" yaml:"data"`
OrgConfig *SecretV1BetaOrgConfig `json:"org_config,omitempty" yaml:"org_config,omitempty"`
}

type SecretV1BetaEnvVar struct {
Expand All @@ -37,6 +38,13 @@ type SecretV1BetaMetadata struct {
UpdateTime json.Number `json:"update_time,omitempty,string" yaml:"update_time,omitempty"`
}

type SecretV1BetaOrgConfig struct {
Projects_access string `json:"projects_access,omitempty" yaml:"projects_access,omitempty"`
Project_ids []string `json:"project_ids,omitempty" yaml:"project_ids,omitempty"`
Debug_access string `json:"debug_access,omitempty" yaml:"debug_access,omitempty"`
Attach_access string `json:"attach_access,omitempty" yaml:"attach_access,omitempty"`
}

func NewSecretV1Beta(name string, envVars []SecretV1BetaEnvVar, files []SecretV1BetaFile) SecretV1Beta {
s := SecretV1Beta{}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ require (
github.com/stretchr/testify v1.2.2
github.com/tcnksm/go-gitconfig v0.1.2
gopkg.in/jarcoal/httpmock.v1 v1.0.0-20180719183105-8007e27cdb32
gopkg.in/yaml.v2 v2.2.1
gopkg.in/yaml.v2 v2.4.0
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ gopkg.in/jarcoal/httpmock.v1 v1.0.0-20180719183105-8007e27cdb32/go.mod h1:d3R+Nl
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=

0 comments on commit dd2c565

Please sign in to comment.