Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ type SecretStore struct {
GCPSecretManager *SecretManagerGCP `json:"gcpSecretManager,omitempty"`
AWSSecretManager *SecretManagerAWS `json:"awsSecretManager,omitempty"`
KafkaConnect *SecretStoreKafkaConnect `json:"kafkaConnect,omitempty"`
// Scopes is a list of supported secret scopes
Scopes []string `json:"scopes,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be reconciled within genSecretStore() ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, thanks!

}

// SecretManagerGCP is the configuration object for using Google Cloud's secret manager.
Expand Down
5 changes: 5 additions & 0 deletions operator/api/vectorized/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,11 @@ spec:
- clusters
- enabled
type: object
scopes:
description: Scopes is a list of supported secret scopes
items:
type: string
type: array
secretNamePrefix:
description: |-
SecretNamePrefix is the prefix that shall be used for each secret name
Expand Down
7 changes: 7 additions & 0 deletions operator/pkg/console/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,19 @@ func (cm *ConfigMap) genSecretStore() EnterpriseSecretStore {
})
}
}
s := EnterpriseSecretStoreScopes{}
if ss.Scopes != nil {
s = EnterpriseSecretStoreScopes{
Scopes: ss.Scopes,
}
}
return EnterpriseSecretStore{
Enabled: ss.Enabled,
SecretNamePrefix: ss.SecretNamePrefix,
GCPSecretManager: smGCP,
AWSSecretManager: smAWS,
KafkaConnect: kc,
Scopes: s,
}
}

Expand Down
5 changes: 5 additions & 0 deletions operator/pkg/console/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ type EnterpriseSecretStore struct {
GCPSecretManager EnterpriseSecretManagerGCP `json:"gcpSecretManager" yaml:"gcpSecretManager"`
AWSSecretManager EnterpriseSecretManagerAWS `json:"awsSecretManager" yaml:"awsSecretManager"`
KafkaConnect EnterpriseSecretStoreKafkaConnect `json:"kafkaConnect" yaml:"kafkaConnect"`
Scopes EnterpriseSecretStoreScopes `json:"scopes" yaml:"scopes"`
}

type EnterpriseSecretManagerGCP struct {
Expand All @@ -186,6 +187,10 @@ type EnterpriseSecretStoreKafkaConnect struct {
Clusters []EnterpriseSecretStoreKafkaConnectCluster `json:"clusters" yaml:"clusters"`
}

type EnterpriseSecretStoreScopes struct {
Scopes []string `json:"scopes" yaml:"scopes"`
}

type EnterpriseSecretStoreKafkaConnectCluster struct {
Name string `json:"name" yaml:"name"`
SecretNamePrefixAppend string `json:"secretNamePrefixAppend" yaml:"secretNamePrefixAppend"`
Expand Down