Skip to content

Commit

Permalink
chore(grafana): remove separate Grafana service/route/ingress (#809)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores authored May 8, 2024
1 parent 0a3021f commit 70351e1
Show file tree
Hide file tree
Showing 18 changed files with 11 additions and 1,158 deletions.
18 changes: 2 additions & 16 deletions api/v1beta1/cryostat_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,6 @@ func convertServiceOptionsTo(srcOpts *ServiceConfigList) *operatorv1beta2.Servic
ServiceConfig: convertServiceConfigTo(srcOpts.CoreConfig.ServiceConfig),
}
}
if srcOpts.GrafanaConfig != nil {
dstOpts.GrafanaConfig = &operatorv1beta2.GrafanaServiceConfig{
HTTPPort: srcOpts.GrafanaConfig.HTTPPort,
ServiceConfig: convertServiceConfigTo(srcOpts.GrafanaConfig.ServiceConfig),
}
}
if srcOpts.ReportsConfig != nil {
dstOpts.ReportsConfig = &operatorv1beta2.ReportsServiceConfig{
HTTPPort: srcOpts.ReportsConfig.HTTPPort,
Expand All @@ -152,8 +146,7 @@ func convertNetworkOptionsTo(srcOpts *NetworkConfigurationList) *operatorv1beta2
var dstOpts *operatorv1beta2.NetworkConfigurationList
if srcOpts != nil {
dstOpts = &operatorv1beta2.NetworkConfigurationList{
CoreConfig: convertNetworkConfigTo(srcOpts.CoreConfig),
GrafanaConfig: convertNetworkConfigTo(srcOpts.GrafanaConfig),
CoreConfig: convertNetworkConfigTo(srcOpts.CoreConfig),
}
}
return dstOpts
Expand Down Expand Up @@ -393,12 +386,6 @@ func convertServiceOptionsFrom(srcOpts *operatorv1beta2.ServiceConfigList) *Serv
ServiceConfig: convertServiceConfigFrom(srcOpts.CoreConfig.ServiceConfig),
}
}
if srcOpts.GrafanaConfig != nil {
dstOpts.GrafanaConfig = &GrafanaServiceConfig{
HTTPPort: srcOpts.GrafanaConfig.HTTPPort,
ServiceConfig: convertServiceConfigFrom(srcOpts.GrafanaConfig.ServiceConfig),
}
}
if srcOpts.ReportsConfig != nil {
dstOpts.ReportsConfig = &ReportsServiceConfig{
HTTPPort: srcOpts.ReportsConfig.HTTPPort,
Expand All @@ -421,8 +408,7 @@ func convertNetworkOptionsFrom(srcOpts *operatorv1beta2.NetworkConfigurationList
var dstOpts *NetworkConfigurationList
if srcOpts != nil {
dstOpts = &NetworkConfigurationList{
CoreConfig: convertNetworkConfigFrom(srcOpts.CoreConfig),
GrafanaConfig: convertNetworkConfigFrom(srcOpts.GrafanaConfig),
CoreConfig: convertNetworkConfigFrom(srcOpts.CoreConfig),
}
}
return dstOpts
Expand Down
4 changes: 0 additions & 4 deletions api/v1beta1/cryostat_conversion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,10 @@ func tableEntries() []TableEntry {
(*test.TestResources).NewCryostatWithEmptyDirSpec),
Entry("core service", (*test.TestResources).NewCryostatWithCoreSvcV1Beta1,
(*test.TestResources).NewCryostatWithCoreSvc),
Entry("Grafana service", (*test.TestResources).NewCryostatWithGrafanaSvcV1Beta1,
(*test.TestResources).NewCryostatWithGrafanaSvc),
Entry("reports service", (*test.TestResources).NewCryostatWithReportsSvcV1Beta1,
(*test.TestResources).NewCryostatWithReportsSvc),
Entry("core ingress", (*test.TestResources).NewCryostatWithCoreNetworkOptionsV1Beta1,
(*test.TestResources).NewCryostatWithCoreNetworkOptions),
Entry("Grafana ingress", (*test.TestResources).NewCryostatWithGrafanaNetworkOptionsV1Beta1,
(*test.TestResources).NewCryostatWithGrafanaNetworkOptions),
Entry("reports resources", (*test.TestResources).NewCryostatWithReportsResourcesV1Beta1,
(*test.TestResources).NewCryostatWithReportsResources),
Entry("reports low resource limit", (*test.TestResources).NewCryostatWithReportLowResourceLimitV1Beta1,
Expand Down
18 changes: 0 additions & 18 deletions api/v1beta2/cryostat_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,16 +292,6 @@ type CoreServiceConfig struct {
ServiceConfig `json:",inline"`
}

// GrafanaServiceConfig provides customization for the service handling
// traffic for the Grafana dashboard.
type GrafanaServiceConfig struct {
// HTTP port number for the Grafana dashboard service.
// Defaults to 3000.
// +optional
HTTPPort *int32 `json:"httpPort,omitempty"`
ServiceConfig `json:",inline"`
}

// ReportsServiceConfig provides customization for the service handling
// traffic for the cryostat-reports sidecars.
type ReportsServiceConfig struct {
Expand All @@ -318,9 +308,6 @@ type ServiceConfigList struct {
// Specification for the service responsible for the Cryostat application.
// +optional
CoreConfig *CoreServiceConfig `json:"coreConfig,omitempty"`
// Specification for the service responsible for the Cryostat Grafana dashboard.
// +optional
GrafanaConfig *GrafanaServiceConfig `json:"grafanaConfig,omitempty"`
// Specification for the service responsible for the cryostat-reports sidecars.
// +optional
ReportsConfig *ReportsServiceConfig `json:"reportsConfig,omitempty"`
Expand Down Expand Up @@ -357,11 +344,6 @@ type NetworkConfigurationList struct {
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
CoreConfig *NetworkConfiguration `json:"coreConfig,omitempty"`
// Specifications for how to expose Cryostat's Grafana service,
// which serves the Grafana dashboard.
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
GrafanaConfig *NetworkConfiguration `json:"grafanaConfig,omitempty"`
}

// PersistentVolumeClaimConfig holds all customization options to
Expand Down
31 changes: 0 additions & 31 deletions api/v1beta2/zz_generated.deepcopy.go

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

18 changes: 1 addition & 17 deletions bundle/manifests/cryostat-operator.clusterserviceversion.yaml
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-06T20:05:20Z"
createdAt: "2024-05-08T15:33:40Z"
description: JVM monitoring and profiling tool
operatorframework.io/initialization-resource: |-
{
Expand Down Expand Up @@ -612,22 +612,6 @@ spec:
label with key "app" is reserved for use by the operator.
displayName: Labels
path: networkOptions.coreConfig.labels
- description: Specifications for how to expose Cryostat's Grafana service,
which serves the Grafana dashboard.
displayName: Grafana Config
path: networkOptions.grafanaConfig
- description: Annotations to add to the Ingress or Route during its creation.
displayName: Annotations
path: networkOptions.grafanaConfig.annotations
- description: Configuration for an Ingress object. Currently subpaths are not
supported, so unique hosts must be specified (if a single external IP is
being used) to differentiate between ingresses/services.
displayName: Ingress Spec
path: networkOptions.grafanaConfig.ingressSpec
- description: Labels to add to the Ingress or Route during its creation. The
label with key "app" is reserved for use by the operator.
displayName: Labels
path: networkOptions.grafanaConfig.labels
- description: Options to configure the Cryostat deployments and pods metadata
displayName: Operand metadata
path: operandMetadata
Expand Down
Loading

0 comments on commit 70351e1

Please sign in to comment.