Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
29 changes: 29 additions & 0 deletions apis/v1alpha1/amazoncloudwatchagent_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,18 @@ type AmazonCloudWatchAgentSpec struct {
// This is only applicable to Deployment mode.
// +optional
DeploymentUpdateStrategy appsv1.DeploymentStrategy `json:"deploymentUpdateStrategy,omitempty"`

// Service to override configuration of the generated Collector Service.
// +optional
Service ServiceSpec `json:"service,omitempty"`

// HeadlessService to override configuration of the generated Collector HeadlessService.
// +optional
HeadlessService ServiceSpec `json:"headlessService,omitempty"`

// MonitoringService to override configuration of the generated Collector MonitoringService.
// +optional
MonitoringService ServiceSpec `json:"monitoringService,omitempty"`
}

// AmazonCloudWatchAgentTargetAllocator defines the configurations for the Prometheus target allocator.
Expand Down Expand Up @@ -562,6 +574,23 @@ type ConfigMapsSpec struct {
MountPath string `json:"mountpath"`
}

type ServiceSpec struct {
// Enabled indicates whether the Service should be created.
// nil means not set (defaults to enabled for backward compatibility)
// +optional
Enabled *bool `json:"enabled,omitempty"`

// Name to override the default Service name
// +optional
Name string `json:"name,omitempty"`
}

// IsEnabled returns true if the service should be created.
// nil (not set) defaults to true for backward compatibility.
func (s *ServiceSpec) IsEnabled() bool {
return s.Enabled == nil || *s.Enabled
}

func init() {
SchemeBuilder.Register(&AmazonCloudWatchAgent{}, &AmazonCloudWatchAgentList{})
}
23 changes: 23 additions & 0 deletions apis/v1alpha1/zz_generated.deepcopy.go

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

29 changes: 29 additions & 0 deletions apis/v1alpha2/amazoncloudwatchagent_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,18 @@ type AmazonCloudWatchAgentSpec struct {
// This is only applicable to Deployment mode.
// +optional
DeploymentUpdateStrategy appsv1.DeploymentStrategy `json:"deploymentUpdateStrategy,omitempty"`

// Service to override configuration of the generated Collector Service.
// +optional
Service ServiceSpec `json:"service,omitempty"`

// HeadlessService to override configuration of the generated Collector HeadlessService.
// +optional
HeadlessService ServiceSpec `json:"headlessService,omitempty"`

// MonitoringService to override configuration of the generated Collector MonitoringService.
// +optional
MonitoringService ServiceSpec `json:"monitoringService,omitempty"`
}

// AmazonCloudWatchAgentStatus defines the observed state of AmazonCloudWatchAgent.
Expand Down Expand Up @@ -260,6 +272,23 @@ type AmazonCloudWatchAgentList struct {
Items []AmazonCloudWatchAgent `json:"items"`
}

type ServiceSpec struct {
// Enabled indicates whether the Service should be created.
// nil means not set (defaults to enabled for backward compatibility)
// +optional
Enabled *bool `json:"enabled,omitempty"`

// Name to override the default Service name
// +optional
Name string `json:"name,omitempty"`
}

// IsEnabled returns true if the service should be created.
// nil (not set) defaults to true for backward compatibility.
func (s *ServiceSpec) IsEnabled() bool {
return s.Enabled == nil || *s.Enabled
}

func init() {
SchemeBuilder.Register(&AmazonCloudWatchAgent{}, &AmazonCloudWatchAgentList{})
}
23 changes: 23 additions & 0 deletions apis/v1alpha2/zz_generated.deepcopy.go

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

Loading