Skip to content

Commit

Permalink
Add Affinity field for Cruise Control in KafkaCluster resource(#962)
Browse files Browse the repository at this point in the history
* Adding Affinity for Cruise Control

* removing pkg/sdk

* Adding api changes for tag
  • Loading branch information
shubhamcoc committed Apr 24, 2023
1 parent ce1be1f commit c94e166
Show file tree
Hide file tree
Showing 4 changed files with 1,752 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/v1beta1/kafkacluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ type CruiseControlConfig struct {
Log4jConfig string `json:"log4jConfig,omitempty"`
Image string `json:"image,omitempty"`
TopicConfig *TopicConfig `json:"topicConfig,omitempty"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
// Annotations to be applied to CruiseControl pod
// +optional
CruiseControlAnnotations map[string]string `json:"cruiseControlAnnotations,omitempty"`
Expand Down Expand Up @@ -839,6 +840,11 @@ func (cConfig *CruiseControlConfig) GetNodeSelector() map[string]string {
return cConfig.NodeSelector
}

// GetAffinity returns the Affinity config for cruise control
func (cConfig *CruiseControlConfig) GetAffinity() *corev1.Affinity {
return cConfig.Affinity
}

// GetNodeSelector returns the node selector for envoy
func (eConfig *EnvoyConfig) GetNodeSelector() map[string]string {
return eConfig.NodeSelector
Expand Down
10 changes: 10 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

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

0 comments on commit c94e166

Please sign in to comment.