Skip to content

Commit dc15ff4

Browse files
authored
Merge pull request #393 from rabbitmq/better-fields-descriptions
Better fields descriptions
2 parents ffba67e + 325e902 commit dc15ff4

File tree

4 files changed

+15
-19
lines changed

4 files changed

+15
-19
lines changed

api/v1beta1/schemareplication_types.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,21 @@ type SchemaReplicationSpec struct {
3030
// When endpoints are provided in both spec.endpoints and spec.upstreamSecret, spec.endpoints takes
3131
// precedence.
3232
Endpoints string `json:"endpoints,omitempty"`
33-
// Secret backend configuration for the RabbitmqCluster.
34-
// Enables to fetch default user credentials and certificates from K8s external secret stores.
33+
// Set to fetch user credentials from K8s external secret stores to be used for schema replication.
3534
SecretBackend SecretBackend `json:"secretBackend,omitempty"`
3635
}
3736

3837
// SecretBackend configures a single secret backend.
3938
// Today, only Vault exists as supported secret backend.
40-
// Future secret backends could be Secrets Store CSI Driver.
41-
// If not configured, K8s Secrets will be used.
4239
type SecretBackend struct {
4340
Vault *VaultSpec `json:"vault,omitempty"`
4441
}
4542

4643
type VaultSpec struct {
47-
// Path in Vault to access a KV (Key-Value) secret with the fields username and password to be used for schema replication.
44+
// Path in Vault to access a KV (Key-Value) secret with the fields username and password to be used for replication.
4845
// For example "secret/data/rabbitmq/config".
49-
// Optional; if not provided, username and password will come from spec.upstreamSecret.
50-
// Have to set either secretBackend.vault.secretPath or spec.upstreamSecret, but not both.
46+
// Optional; if not provided, username and password will come from upstreamSecret instead.
47+
// Have to set either secretBackend.vault.secretPath or upstreamSecret, but not both.
5148
SecretPath string `json:"secretPath,omitempty"`
5249
}
5350

api/v1beta1/schemareplication_webhook_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ var _ = Describe("schema-replication webhook", func() {
9797
Expect(updated.ValidateUpdate(&replication)).To(Succeed())
9898
})
9999

100-
It("allows updates on rabbitmqClusterReference.connectionSecret", func() {
100+
It("does not allow updates on rabbitmqClusterReference.connectionSecret", func() {
101101
connectionScr := SchemaReplication{
102102
ObjectMeta: metav1.ObjectMeta{
103103
Name: "test-replication",

config/crd/bases/rabbitmq.com_schemareplications.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,18 @@ spec:
6868
type: string
6969
type: object
7070
secretBackend:
71-
description: Secret backend configuration for the RabbitmqCluster.
72-
Enables to fetch default user credentials and certificates from
73-
K8s external secret stores.
71+
description: Set to fetch user credentials from K8s external secret
72+
stores to be used for schema replication.
7473
properties:
7574
vault:
7675
properties:
7776
secretPath:
7877
description: Path in Vault to access a KV (Key-Value) secret
79-
with the fields username and password to be used for schema
80-
replication. For example "secret/data/rabbitmq/config".
81-
Optional; if not provided, username and password will come
82-
from spec.upstreamSecret. Have to set either secretBackend.vault.secretPath
83-
or spec.upstreamSecret, but not both.
78+
with the fields username and password to be used for replication.
79+
For example "secret/data/rabbitmq/config". Optional; if
80+
not provided, username and password will come from upstreamSecret
81+
instead. Have to set either secretBackend.vault.secretPath
82+
or upstreamSecret, but not both.
8483
type: string
8584
type: object
8685
type: object

docs/api/rabbitmq.com.ref.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ SchemaReplicationSpec defines the desired state of SchemaReplication
766766
| *`rabbitmqClusterReference`* __xref:{anchor_prefix}-github-com-rabbitmq-messaging-topology-operator-api-v1beta1-rabbitmqclusterreference[$$RabbitmqClusterReference$$]__ | Reference to the RabbitmqCluster that schema replication would be set for. Must be an existing cluster.
767767
| *`upstreamSecret`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#localobjectreference-v1-core[$$LocalObjectReference$$]__ | Defines a Secret which contains credentials to be used for schema replication. The Secret must contain the keys `username` and `password` in its Data field, or operator will error. Have to set either secretBackend.vault.secretPath or spec.upstreamSecret, but not both.
768768
| *`endpoints`* __string__ | endpoints should be one or multiple endpoints separated by ','. Must provide either spec.endpoints or endpoints in spec.upstreamSecret. When endpoints are provided in both spec.endpoints and spec.upstreamSecret, spec.endpoints takes precedence.
769-
| *`secretBackend`* __xref:{anchor_prefix}-github-com-rabbitmq-messaging-topology-operator-api-v1beta1-secretbackend[$$SecretBackend$$]__ | Secret backend configuration for the RabbitmqCluster. Enables to fetch default user credentials and certificates from K8s external secret stores.
769+
| *`secretBackend`* __xref:{anchor_prefix}-github-com-rabbitmq-messaging-topology-operator-api-v1beta1-secretbackend[$$SecretBackend$$]__ | Set to fetch user credentials from K8s external secret stores to be used for schema replication.
770770
|===
771771

772772

@@ -791,7 +791,7 @@ SchemaReplicationStatus defines the observed state of SchemaReplication
791791
[id="{anchor_prefix}-github-com-rabbitmq-messaging-topology-operator-api-v1beta1-secretbackend"]
792792
==== SecretBackend
793793

794-
SecretBackend configures a single secret backend. Today, only Vault exists as supported secret backend. Future secret backends could be Secrets Store CSI Driver. If not configured, K8s Secrets will be used.
794+
SecretBackend configures a single secret backend. Today, only Vault exists as supported secret backend.
795795

796796
.Appears In:
797797
****
@@ -1013,7 +1013,7 @@ UserTag defines the level of access to the management UI allocated to the user.
10131013
[cols="25a,75a", options="header"]
10141014
|===
10151015
| Field | Description
1016-
| *`secretPath`* __string__ | Path in Vault to access a KV (Key-Value) secret with the fields username and password to be used for schema replication. For example "secret/data/rabbitmq/config". Optional; if not provided, username and password will come from spec.upstreamSecret. Have to set either secretBackend.vault.secretPath or spec.upstreamSecret, but not both.
1016+
| *`secretPath`* __string__ | Path in Vault to access a KV (Key-Value) secret with the fields username and password to be used for replication. For example "secret/data/rabbitmq/config". Optional; if not provided, username and password will come from upstreamSecret instead. Have to set either secretBackend.vault.secretPath or upstreamSecret, but not both.
10171017
|===
10181018

10191019

0 commit comments

Comments
 (0)