Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CDAP-21114] Disable messaging service pod for new cdf instances with Cloud Spanner enabled #126

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 3 additions & 1 deletion api/v1alpha1/cdapmaster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ type CDAPMasterSpec struct {
// Logs is specification for the CDAP logging service.
Logs LogsSpec `json:"logs,omitempty"`
// Messaging is specification for the CDAP messaging service.
Messaging MessagingSpec `json:"messaging,omitempty"`
// To disable this service: either omit or set the field to nil
// To enable this service: set it to a pointer to a MessagingSpec struct (can be an empty struct)
Messaging *MessagingSpec `json:"messaging,omitempty"`
// Metadata is specification for the CDAP metadata service.
Metadata MetadataSpec `json:"metadata,omitempty"`
// Metrics is specification for the CDAP metrics service.
Expand Down
7 changes: 5 additions & 2 deletions api/v1alpha1/zz_generated.deepcopy.go

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

38,425 changes: 18,501 additions & 19,924 deletions config/crd/bases/cdap.cdap.io_cdapmasters.yaml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion controllers/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ var _ = Describe("Controller Suite", func() {
})
It("k8s objs for just essential services", func() {
master.Spec.Runtime = nil
numOptionalServices := 1
master.Spec.Messaging = nil
numOptionalServices := 2

emptyLabels := make(map[string]string)
spec, err := buildDeploymentPlanSpec(master, emptyLabels)
Expand Down
68 changes: 32 additions & 36 deletions controllers/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,48 +18,44 @@ var _ = Describe("Controller Suite", func() {
BeforeEach(func() {
master = &v1alpha1.CDAPMaster{}
serviceToSpec = map[string]*v1alpha1.CDAPServiceSpec{
serviceLogs: &master.Spec.Logs.CDAPServiceSpec,
serviceAppFabric: &master.Spec.AppFabric.CDAPServiceSpec,
serviceAppFabricProcessor: &master.Spec.AppFabricProcessor.CDAPServiceSpec,
serviceMetrics: &master.Spec.Metrics.CDAPServiceSpec,
serviceRouter: &master.Spec.Router.CDAPServiceSpec,
serviceMessaging: &master.Spec.Messaging.CDAPServiceSpec,
serviceMetadata: &master.Spec.Metadata.CDAPServiceSpec,
servicePreview: &master.Spec.Preview.CDAPServiceSpec,
serviceUserInterface: &master.Spec.UserInterface.CDAPServiceSpec,
serviceLogs: &master.Spec.Logs.CDAPServiceSpec,
serviceAppFabric: &master.Spec.AppFabric.CDAPServiceSpec,
serviceAppFabricProcessor: &master.Spec.AppFabricProcessor.CDAPServiceSpec,
serviceMetrics: &master.Spec.Metrics.CDAPServiceSpec,
serviceRouter: &master.Spec.Router.CDAPServiceSpec,
serviceMetadata: &master.Spec.Metadata.CDAPServiceSpec,
servicePreview: &master.Spec.Preview.CDAPServiceSpec,
serviceUserInterface: &master.Spec.UserInterface.CDAPServiceSpec,
}
serviceToScalableSpec = map[string]*v1alpha1.CDAPScalableServiceSpec{
serviceLogs: nil,
serviceAppFabric: &master.Spec.AppFabric.CDAPScalableServiceSpec,
serviceAppFabricProcessor: nil,
serviceMetrics: nil,
serviceRouter: &master.Spec.Router.CDAPScalableServiceSpec,
serviceMessaging: nil,
serviceMetadata: &master.Spec.Metadata.CDAPScalableServiceSpec,
servicePreview: nil,
serviceUserInterface: &master.Spec.UserInterface.CDAPScalableServiceSpec,
serviceLogs: nil,
serviceAppFabric: &master.Spec.AppFabric.CDAPScalableServiceSpec,
serviceAppFabricProcessor: nil,
serviceMetrics: nil,
serviceRouter: &master.Spec.Router.CDAPScalableServiceSpec,
serviceMetadata: &master.Spec.Metadata.CDAPScalableServiceSpec,
servicePreview: nil,
serviceUserInterface: &master.Spec.UserInterface.CDAPScalableServiceSpec,
}
serviceToStatefulSpec = map[string]*v1alpha1.CDAPStatefulServiceSpec{
serviceLogs: &master.Spec.Logs.CDAPStatefulServiceSpec,
serviceAppFabric: nil,
serviceAppFabricProcessor: &master.Spec.AppFabricProcessor.CDAPStatefulServiceSpec,
serviceMetrics: &master.Spec.Metrics.CDAPStatefulServiceSpec,
serviceRouter: nil,
serviceMessaging: &master.Spec.Messaging.CDAPStatefulServiceSpec,
serviceMetadata: nil,
servicePreview: &master.Spec.Preview.CDAPStatefulServiceSpec,
serviceUserInterface: nil,
serviceLogs: &master.Spec.Logs.CDAPStatefulServiceSpec,
serviceAppFabric: nil,
serviceAppFabricProcessor: &master.Spec.AppFabricProcessor.CDAPStatefulServiceSpec,
serviceMetrics: &master.Spec.Metrics.CDAPStatefulServiceSpec,
serviceRouter: nil,
serviceMetadata: nil,
servicePreview: &master.Spec.Preview.CDAPStatefulServiceSpec,
serviceUserInterface: nil,
}
serviceToExternalSpec = map[string]*v1alpha1.CDAPExternalServiceSpec{
serviceLogs: nil,
serviceAppFabric: nil,
serviceAppFabricProcessor: nil,
serviceMetrics: nil,
serviceRouter: &master.Spec.Router.CDAPExternalServiceSpec,
serviceMessaging: nil,
serviceMetadata: nil,
servicePreview: nil,
serviceUserInterface: &master.Spec.UserInterface.CDAPExternalServiceSpec,
serviceLogs: nil,
serviceAppFabric: nil,
serviceAppFabricProcessor: nil,
serviceMetrics: nil,
serviceRouter: &master.Spec.Router.CDAPExternalServiceSpec,
serviceMetadata: nil,
servicePreview: nil,
serviceUserInterface: &master.Spec.UserInterface.CDAPExternalServiceSpec,
}
})
It("Successfully get pointer to CDAPServiceSpec", func() {
Expand Down

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

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

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

Loading