Skip to content

Commit

Permalink
update the topic comment of the api (#1048)
Browse files Browse the repository at this point in the history
Signed-off-by: myan <[email protected]>
  • Loading branch information
yanmxa authored Aug 8, 2024
1 parent 5f4eae3 commit 85c88cb
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 29 deletions.
16 changes: 8 additions & 8 deletions operator/apis/v1alpha4/multiclusterglobalhub_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ type PostgresConfig struct {

// KafkaConfig defines the desired state of kafka
type KafkaConfig struct {
// KafkaTopics specifies the desired topics. It can endup with '*'
// KafkaTopics specify the desired topics
// +kubebuilder:default={"specTopic": "gh-spec", "statusTopic": "gh-event.*"}
KafkaTopics KafkaTopics `json:"topics,omitempty"`

Expand All @@ -188,17 +188,17 @@ type KafkaConfig struct {
StorageSize string `json:"storageSize,omitempty"`
}

// KafkaTopics is the transport topics for the manager and agent to communicate
// KafkaTopics is the transport topics for the manager and agent to communicate to one another
type KafkaTopics struct {
// SpecTopic is the topic to distribute workload from global hub to managed hubs. The default value is "gh-spec"
// SpecTopic is the topic to distribute workloads from global hub to managed hubs. The default value is "gh-spec"
// +kubebuilder:default="gh-spec"
SpecTopic string `json:"specTopic,omitempty"`

// StatusTopic specifies the topic where an agent reports events and status updates to a manager. Specially, the topic
// can end up with an asterisk '*', indicating topics for individual managed hubs.
// For example: the default value is "gh-event.*" for the global hub built-in kafka. Thus, the topic for hub cluster
// named "hub1" whould be "gh-event.hub1".
// As for the BYO case, the default value is simply "gh-event" for all the managed hubs.
// StatusTopic specifies the topic where an agent reports events and status updates to a manager.
// Specifically, the topic can end up with an asterisk (*), indicating topics for individual managed hubs.
// For example: the default value is "gh-event.*" for the global hub built-in kafka. Therefore, the topic
// for the hub cluster named "hub1" would be "gh-event.hub1"; In the BYO case, the default value for all
// managed hubs is "gh-event"
// +kubebuilder:default="gh-event.*"
StatusTopic string `json:"statusTopic,omitempty"`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ metadata:
categories: Integration & Delivery,OpenShift Optional
certified: "false"
containerImage: quay.io/stolostron/multicluster-global-hub-operator:latest
createdAt: "2024-08-02T02:49:27Z"
createdAt: "2024-08-08T01:35:13Z"
description: Manages the installation and upgrade of the Multicluster Global Hub.
olm.skipRange: '>=1.2.0 <1.3.0'
operatorframework.io/initialization-resource: '{"apiVersion":"operator.open-cluster-management.io/v1alpha4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,26 +266,25 @@ spec:
default:
specTopic: gh-spec
statusTopic: gh-event.*
description: KafkaTopics specifies the desired topics. It
can endup with '*'
description: KafkaTopics specify the desired topics
properties:
specTopic:
default: gh-spec
description: SpecTopic is the topic to distribute workload
description: SpecTopic is the topic to distribute workloads
from global hub to managed hubs. The default value is
"gh-spec"
type: string
statusTopic:
default: gh-event.*
description: 'StatusTopic specifies the topic where an
agent reports events and status updates to a manager.
Specially, the topic can end up with an asterisk ''*'',
indicating topics for individual managed hubs. For example:
the default value is "gh-event.*" for the global hub
built-in kafka. Thus, the topic for hub cluster named
"hub1" whould be "gh-event.hub1". As for the BYO case,
the default value is simply "gh-event" for all the managed
hubs.'
Specifically, the topic can end up with an asterisk
(*), indicating topics for individual managed hubs.
For example: the default value is "gh-event.*" for the
global hub built-in kafka. Therefore, the topic for
the hub cluster named "hub1" would be "gh-event.hub1";
In the BYO case, the default value for all managed hubs
is "gh-event"'
type: string
type: object
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,26 +266,25 @@ spec:
default:
specTopic: gh-spec
statusTopic: gh-event.*
description: KafkaTopics specifies the desired topics. It
can endup with '*'
description: KafkaTopics specify the desired topics
properties:
specTopic:
default: gh-spec
description: SpecTopic is the topic to distribute workload
description: SpecTopic is the topic to distribute workloads
from global hub to managed hubs. The default value is
"gh-spec"
type: string
statusTopic:
default: gh-event.*
description: 'StatusTopic specifies the topic where an
agent reports events and status updates to a manager.
Specially, the topic can end up with an asterisk ''*'',
indicating topics for individual managed hubs. For example:
the default value is "gh-event.*" for the global hub
built-in kafka. Thus, the topic for hub cluster named
"hub1" whould be "gh-event.hub1". As for the BYO case,
the default value is simply "gh-event" for all the managed
hubs.'
Specifically, the topic can end up with an asterisk
(*), indicating topics for individual managed hubs.
For example: the default value is "gh-event.*" for the
global hub built-in kafka. Therefore, the topic for
the hub cluster named "hub1" would be "gh-event.hub1";
In the BYO case, the default value for all managed hubs
is "gh-event"'
type: string
type: object
type: object
Expand Down

0 comments on commit 85c88cb

Please sign in to comment.