Skip to content

Commit 0123b37

Browse files
tomasz-saduraRafalKorepta
authored andcommitted
Add secret scopes
1 parent f888ad1 commit 0123b37

File tree

5 files changed

+24
-0
lines changed

5 files changed

+24
-0
lines changed

operator/api/vectorized/v1alpha1/console_enterprise_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ type SecretStore struct {
179179
GCPSecretManager *SecretManagerGCP `json:"gcpSecretManager,omitempty"`
180180
AWSSecretManager *SecretManagerAWS `json:"awsSecretManager,omitempty"`
181181
KafkaConnect *SecretStoreKafkaConnect `json:"kafkaConnect,omitempty"`
182+
// Scopes is a list of supported secret scopes
183+
Scopes []string `json:"scopes,omitempty"`
182184
}
183185

184186
// SecretManagerGCP is the configuration object for using Google Cloud's secret manager.

operator/api/vectorized/v1alpha1/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

operator/config/crd/bases/redpanda.vectorized.io_consoles.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,11 @@ spec:
896896
- clusters
897897
- enabled
898898
type: object
899+
scopes:
900+
description: Scopes is a list of supported secret scopes
901+
items:
902+
type: string
903+
type: array
899904
secretNamePrefix:
900905
description: |-
901906
SecretNamePrefix is the prefix that shall be used for each secret name

operator/pkg/console/configmap.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,12 +432,19 @@ func (cm *ConfigMap) genSecretStore() EnterpriseSecretStore {
432432
})
433433
}
434434
}
435+
s := EnterpriseSecretStoreScopes{}
436+
if ss.Scopes != nil {
437+
s = EnterpriseSecretStoreScopes{
438+
Scopes: ss.Scopes,
439+
}
440+
}
435441
return EnterpriseSecretStore{
436442
Enabled: ss.Enabled,
437443
SecretNamePrefix: ss.SecretNamePrefix,
438444
GCPSecretManager: smGCP,
439445
AWSSecretManager: smAWS,
440446
KafkaConnect: kc,
447+
Scopes: s,
441448
}
442449
}
443450

operator/pkg/console/console.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ type EnterpriseSecretStore struct {
165165
GCPSecretManager EnterpriseSecretManagerGCP `json:"gcpSecretManager" yaml:"gcpSecretManager"`
166166
AWSSecretManager EnterpriseSecretManagerAWS `json:"awsSecretManager" yaml:"awsSecretManager"`
167167
KafkaConnect EnterpriseSecretStoreKafkaConnect `json:"kafkaConnect" yaml:"kafkaConnect"`
168+
Scopes EnterpriseSecretStoreScopes `json:"scopes" yaml:"scopes"`
168169
}
169170

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

190+
type EnterpriseSecretStoreScopes struct {
191+
Scopes []string `json:"scopes" yaml:"scopes"`
192+
}
193+
189194
type EnterpriseSecretStoreKafkaConnectCluster struct {
190195
Name string `json:"name" yaml:"name"`
191196
SecretNamePrefixAppend string `json:"secretNamePrefixAppend" yaml:"secretNamePrefixAppend"`

0 commit comments

Comments
 (0)