Skip to content

Commit

Permalink
test adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Matsuoka committed Feb 14, 2024
1 parent 321dd94 commit 464dc5f
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 2 deletions.
20 changes: 20 additions & 0 deletions api/v1beta1/cryostat_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ type CryostatStatus struct {
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=status,order=2,xDescriptors={"urn:alm:descriptor:io.kubernetes:Secret"}
GrafanaSecret string `json:"grafanaSecret,omitempty"`
// Name of the Secret containing the cryostat storage connection key
StorageSecret string `json:"storageSecret,omitempty"`
// Address of the deployed Cryostat web application.
// +operator-sdk:csv:customresourcedefinitions:type=status,order=1,xDescriptors={"urn:alm:descriptor:org.w3:link"}
ApplicationURL string `json:"applicationUrl"`
Expand Down Expand Up @@ -287,6 +289,13 @@ type GrafanaServiceConfig struct {
ServiceConfig `json:",inline"`
}

type StorageServiceConfig struct {
// HTTP port number for the cryostat storage service.
// Defaults to 8333
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 @@ -309,6 +318,9 @@ 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 storage container.
// +optional
StorageConfig *StorageServiceConfig `json:"storageConfig,omitEmpty"`
}

// NetworkConfiguration provides customization for how to expose a Cryostat
Expand Down Expand Up @@ -503,6 +515,14 @@ type SecurityOptions struct {
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
GrafanaSecurityContext *corev1.SecurityContext `json:"grafanaSecurityContext,omitempty"`
// Security Context to apply to the storage container.
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
StorageSecurityContext *corev1.SecurityContext `json:"storageSecurityContext,omitempty"`
// Security Context to apply to the storage container.
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
DatabaseSecurityContext *corev1.SecurityContext `json:"databaseSecurityContext,omitempty"`
}

// ReportsSecurityOptions contains Security Context customizations for the
Expand Down
36 changes: 36 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

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

8 changes: 6 additions & 2 deletions internal/controllers/reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1118,8 +1118,8 @@ func (c *controllerTest) commonTests() {
datasourceImg := "my/datasource-image:1.0.0-BETA25"
grafanaImg := "my/grafana-image:1.0.0-dev"
reportsImg := "my/reports-image:1.0.0-SNAPSHOT"
storageImg := "my/storage-image:1.0.0"
databaseImg := "my/database-image:1.0.0"
storageImg := "my/storage-image:1.0.0-dev"
databaseImg := "my/database-image:1.0.0-dev"
t.EnvCoreImageTag = &coreImg
t.EnvDatasourceImageTag = &datasourceImg
t.EnvGrafanaImageTag = &grafanaImg
Expand Down Expand Up @@ -1181,10 +1181,14 @@ func (c *controllerTest) commonTests() {
datasourceImg := "my/datasource-image@sha256:59ded87392077c2371b26e021aade0409855b597383fa78e549eefafab8fc90c"
grafanaImg := "my/grafana-image@sha256:e5bc16c2c5b69cd6fd8fdf1381d0a8b6cc9e01d92b9e1bb0a61ed89196563c72"
reportsImg := "my/reports-image@sha256:8a23ca5e8c8a343789b8c14558a44a49d35ecd130c18e62edf0d1ad9ce88d37d"
storageImg := "my/reports-image@sha256:8b23ca5e8c8a343789b8c14558a44a49d35ecd130c18e62edf0d1ad9ce88d37d"
databaseImg := "my/reports-image@sha256:8c23ca5e8c8a343789b8c14558a44a49d35ecd130c18e62edf0d1ad9ce88d37d"
t.EnvCoreImageTag = &coreImg
t.EnvDatasourceImageTag = &datasourceImg
t.EnvGrafanaImageTag = &grafanaImg
t.EnvReportsImageTag = &reportsImg
t.EnvDatabaseImageTag = &databaseImg
t.EnvStorageImageTag = &storageImg
})
It("should create deployment with the expected tags", func() {
t.expectMainDeployment()
Expand Down

0 comments on commit 464dc5f

Please sign in to comment.