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

feat(deploy): separate database and storage into separate pods #848

Closed
wants to merge 3 commits into from
Closed
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
38 changes: 38 additions & 0 deletions api/v1beta2/cryostat_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,18 @@ const (
ConditionTypeMainDeploymentProgressing CryostatConditionType = "MainDeploymentProgressing"
// If pods within the main Cryostat deployment failed to be created or destroyed.
ConditionTypeMainDeploymentReplicaFailure CryostatConditionType = "MainDeploymentReplicaFailure"
// If enabled, whether the database deployment is available.
ConditionTypeDatabaseDeploymentAvailable CryostatConditionType = "DatabaseDeploymentAvailable"
// If enabled, whether the database deployment is progressing.
ConditionTypeDatabaseDeploymentProgressing CryostatConditionType = "DatabaseDeploymentProgressing"
// If enabled, whether pods in the database deployment failed to be created or destroyed.
ConditionTypeDatabaseDeploymentReplicaFailure CryostatConditionType = "DatabaseDeploymentReplicaFailure"
// If enabled, whether the storage deployment is available.
ConditionTypeStorageDeploymentAvailable CryostatConditionType = "StorageDeploymentAvailable"
// If enabled, whether the storage deployment is progressing.
ConditionTypeStorageDeploymentProgressing CryostatConditionType = "StorageDeploymentProgressing"
// If enabled, whether pods in the storage deployment failed to be created or destroyed.
ConditionTypeStorageDeploymentReplicaFailure CryostatConditionType = "StorageDeploymentReplicaFailure"
// If enabled, whether the reports deployment is available.
ConditionTypeReportsDeploymentAvailable CryostatConditionType = "ReportsDeploymentAvailable"
// If enabled, whether the reports deployment is progressing.
Expand Down Expand Up @@ -306,6 +318,26 @@ type ReportsServiceConfig struct {
ServiceConfig `json:",inline"`
}

// DatabaseServiceConfig provides customization for the service handling
// traffic for the cryostat application's database.
type DatabaseServiceConfig struct {
// HTTP port number for the cryostat application's database.
// Defaults to 5432.
// +optional
HTTPPort *int32 `json:"httpPort,omitempty"`
ServiceConfig `json:",inline"`
}

// DatabaseServiceConfig provides customization for the service handling
// traffic for the storage to be created by the operator.
type StorageServiceConfig struct {
// HTTP port number for the storage to be created by the operator.
// Defaults to 8333.
// +optional
HTTPPort *int32 `json:"httpPort,omitempty"`
ServiceConfig `json:",inline"`
}

// ServiceConfigList holds the service configuration for each
// service created by the operator.
type ServiceConfigList struct {
Expand All @@ -315,6 +347,12 @@ type ServiceConfigList struct {
// Specification for the service responsible for the cryostat-reports sidecars.
// +optional
ReportsConfig *ReportsServiceConfig `json:"reportsConfig,omitempty"`
// Specification for the service responsible for the cryostat application's database.
// +optional
DatabaseConfig *DatabaseServiceConfig `json:"databaseConfig,omitempty"`
// Specification for the service responsible for the storage to be created by the operator.
// +optional
StorageConfig *StorageServiceConfig `json:"storageConfig,omitempty"`
}

// NetworkConfiguration provides customization for how to expose a Cryostat
Expand Down
52 changes: 52 additions & 0 deletions api/v1beta2/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ metadata:
capabilities: Seamless Upgrades
categories: Monitoring, Developer Tools
containerImage: quay.io/cryostat/cryostat-operator:3.0.0-dev
createdAt: "2024-05-28T20:14:14Z"
createdAt: "2024-06-05T20:22:51Z"
description: JVM monitoring and profiling tool
operatorframework.io/initialization-resource: |-
{
Expand Down
52 changes: 52 additions & 0 deletions bundle/manifests/operator.cryostat.io_cryostats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9396,6 +9396,32 @@ spec:
description: Type of service to create. Defaults to "ClusterIP".
type: string
type: object
databaseConfig:
description: Specification for the service responsible for the
cryostat application's database.
properties:
annotations:
additionalProperties:
type: string
description: Annotations to add to the service during its
creation.
type: object
httpPort:
description: HTTP port number for the cryostat application's
database. Defaults to 5432.
format: int32
type: integer
labels:
additionalProperties:
type: string
description: Labels to add to the service during its creation.
The labels with keys "app" and "component" are reserved
for use by the operator.
type: object
serviceType:
description: Type of service to create. Defaults to "ClusterIP".
type: string
type: object
reportsConfig:
description: Specification for the service responsible for the
cryostat-reports sidecars.
Expand All @@ -9422,6 +9448,32 @@ spec:
description: Type of service to create. Defaults to "ClusterIP".
type: string
type: object
storageConfig:
description: Specification for the service responsible for the
storage to be created by the operator.
properties:
annotations:
additionalProperties:
type: string
description: Annotations to add to the service during its
creation.
type: object
httpPort:
description: HTTP port number for the storage to be created
by the operator. Defaults to 8333.
format: int32
type: integer
labels:
additionalProperties:
type: string
description: Labels to add to the service during its creation.
The labels with keys "app" and "component" are reserved
for use by the operator.
type: object
serviceType:
description: Type of service to create. Defaults to "ClusterIP".
type: string
type: object
type: object
storageOptions:
description: Options to customize the storage provisioned for the
Expand Down
12 changes: 6 additions & 6 deletions bundle/tests/scorecard/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- operator-install
image: quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240511064726
image: quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240605171253
labels:
suite: cryostat
test: operator-install
Expand All @@ -80,7 +80,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- cryostat-cr
image: quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240511064726
image: quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240605171253
labels:
suite: cryostat
test: cryostat-cr
Expand All @@ -90,7 +90,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- cryostat-multi-namespace
image: quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240511064726
image: quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240605171253
labels:
suite: cryostat
test: cryostat-multi-namespace
Expand All @@ -100,7 +100,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- cryostat-recording
image: quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240511064726
image: quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240605171253
labels:
suite: cryostat
test: cryostat-recording
Expand All @@ -110,7 +110,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- cryostat-config-change
image: quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240511064726
image: quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240605171253
labels:
suite: cryostat
test: cryostat-config-change
Expand All @@ -120,7 +120,7 @@ stages:
- entrypoint:
- cryostat-scorecard-tests
- cryostat-report
image: quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240511064726
image: quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240605171253
labels:
suite: cryostat
test: cryostat-report
Expand Down
52 changes: 52 additions & 0 deletions config/crd/bases/operator.cryostat.io_cryostats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9386,6 +9386,32 @@ spec:
description: Type of service to create. Defaults to "ClusterIP".
type: string
type: object
databaseConfig:
description: Specification for the service responsible for the
cryostat application's database.
properties:
annotations:
additionalProperties:
type: string
description: Annotations to add to the service during its
creation.
type: object
httpPort:
description: HTTP port number for the cryostat application's
database. Defaults to 5432.
format: int32
type: integer
labels:
additionalProperties:
type: string
description: Labels to add to the service during its creation.
The labels with keys "app" and "component" are reserved
for use by the operator.
type: object
serviceType:
description: Type of service to create. Defaults to "ClusterIP".
type: string
type: object
reportsConfig:
description: Specification for the service responsible for the
cryostat-reports sidecars.
Expand All @@ -9412,6 +9438,32 @@ spec:
description: Type of service to create. Defaults to "ClusterIP".
type: string
type: object
storageConfig:
description: Specification for the service responsible for the
storage to be created by the operator.
properties:
annotations:
additionalProperties:
type: string
description: Annotations to add to the service during its
creation.
type: object
httpPort:
description: HTTP port number for the storage to be created
by the operator. Defaults to 8333.
format: int32
type: integer
labels:
additionalProperties:
type: string
description: Labels to add to the service during its creation.
The labels with keys "app" and "component" are reserved
for use by the operator.
type: object
serviceType:
description: Type of service to create. Defaults to "ClusterIP".
type: string
type: object
type: object
storageOptions:
description: Options to customize the storage provisioned for the
Expand Down
12 changes: 6 additions & 6 deletions config/scorecard/patches/custom.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
entrypoint:
- cryostat-scorecard-tests
- operator-install
image: "quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240511064726"
image: "quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240605171253"
labels:
suite: cryostat
test: operator-install
Expand All @@ -18,7 +18,7 @@
entrypoint:
- cryostat-scorecard-tests
- cryostat-cr
image: "quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240511064726"
image: "quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240605171253"
labels:
suite: cryostat
test: cryostat-cr
Expand All @@ -28,7 +28,7 @@
entrypoint:
- cryostat-scorecard-tests
- cryostat-multi-namespace
image: "quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240511064726"
image: "quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240605171253"
labels:
suite: cryostat
test: cryostat-multi-namespace
Expand All @@ -38,7 +38,7 @@
entrypoint:
- cryostat-scorecard-tests
- cryostat-recording
image: "quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240511064726"
image: "quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240605171253"
labels:
suite: cryostat
test: cryostat-recording
Expand All @@ -48,7 +48,7 @@
entrypoint:
- cryostat-scorecard-tests
- cryostat-config-change
image: "quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240511064726"
image: "quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240605171253"
labels:
suite: cryostat
test: cryostat-config-change
Expand All @@ -58,7 +58,7 @@
entrypoint:
- cryostat-scorecard-tests
- cryostat-report
image: "quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240511064726"
image: "quay.io/cryostat/cryostat-operator-scorecard:3.0.0-20240605171253"
labels:
suite: cryostat
test: cryostat-report
Loading
Loading