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 -storage and -db pods #923

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
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.

9 changes: 7 additions & 2 deletions bundle/manifests/cryostat-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ metadata:
"reportOptions": {
"replicas": 0
},
"securityOptions": {
"authProxySecurityContext": {
"runAsUser": 1001
}
},
"storageOptions": {
"pvc": {
"annotations": {},
Expand All @@ -30,7 +35,7 @@ metadata:
capabilities: Seamless Upgrades
categories: Monitoring, Developer Tools
containerImage: quay.io/cryostat/cryostat-operator:4.0.0-dev
createdAt: "2024-08-07T21:05:35Z"
createdAt: "2024-07-30T18:48:36Z"
description: JVM monitoring and profiling tool
operatorframework.io/initialization-resource: |-
{
Expand Down Expand Up @@ -1018,7 +1023,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/cryostat/cryostat-operator:4.0.0-dev
image: quay.io/miwan/cryostat-operator:4.0.0-dev
imagePullPolicy: Always
livenessProbe:
httpGet:
Expand Down
56 changes: 56 additions & 0 deletions bundle/manifests/operator.cryostat.io_cryostats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8935,6 +8935,34 @@ 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 Down Expand Up @@ -8963,6 +8991,34 @@ 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
56 changes: 56 additions & 0 deletions config/crd/bases/operator.cryostat.io_cryostats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8922,6 +8922,34 @@ 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 Down Expand Up @@ -8950,6 +8978,34 @@ 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
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: quay.io/cryostat/cryostat-operator
newName: quay.io/miwan/cryostat-operator
newTag: 4.0.0-dev
3 changes: 3 additions & 0 deletions config/samples/operator_v1beta2_cryostat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ spec:
spec: {}
reportOptions:
replicas: 0
securityOptions:
authProxySecurityContext:
runAsUser: 1001
Loading
Loading