Skip to content

Commit

Permalink
Fixing merge conflicts, syncing with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Matsuoka committed Apr 15, 2024
2 parents 4c73c8e + 461096c commit d2830ed
Show file tree
Hide file tree
Showing 35 changed files with 540 additions and 1,343 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
- v[0-9]+
- v[0-9]+.[0-9]+
- cryostat-v[0-9]+.[0-9]+
# TODO remove once merged into main
- cryostat3

env:
CI_USER: cryostat+bot
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-ci-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
- v[0-9]+
- v[0-9]+.[0-9]+
- cryostat-v[0-9]+.[0-9]+
# TODO remove once merged into main
- cryostat3

jobs:
check-before-test:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ENVTEST_K8S_VERSION ?= 1.26
# See: https://github.com/operator-framework/operator-sdk/pull/4762
#
# Suffix is the timestamp of the image build, compute with: date -u '+%Y%m%d%H%M%S'
CUSTOM_SCORECARD_VERSION ?= 2.5.0-$(shell date -u '+%Y%m%d%H%M%S')
CUSTOM_SCORECARD_VERSION ?= 3.0.0-$(shell date -u '+%Y%m%d%H%M%S')
export CUSTOM_SCORECARD_IMG ?= $(IMAGE_TAG_BASE)-scorecard:$(CUSTOM_SCORECARD_VERSION)

DEPLOY_NAMESPACE ?= cryostat-operator-system
Expand Down
6 changes: 0 additions & 6 deletions api/v1beta1/cryostat_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,13 @@ func (src *Cryostat) ConvertTo(dstRaw conversion.Hub) error {
}

func convertSpecTo(src *CryostatSpec, dst *operatorv1beta2.CryostatSpec) {
dst.Minimal = src.Minimal
dst.EnableCertManager = src.EnableCertManager
dst.TrustedCertSecrets = convertCertSecretsTo(src.TrustedCertSecrets)
dst.EventTemplates = convertEventTemplatesTo(src.EventTemplates)
dst.StorageOptions = convertStorageOptionsTo(src.StorageOptions)
dst.ServiceOptions = convertServiceOptionsTo(src.ServiceOptions)
dst.NetworkOptions = convertNetworkOptionsTo(src.NetworkOptions)
dst.ReportOptions = convertReportOptionsTo(src.ReportOptions)
dst.MaxWsConnections = src.MaxWsConnections
dst.JmxCacheOptions = convertJmxCacheOptionsTo(src.JmxCacheOptions)
dst.Resources = convertResourceOptionsTo(src.Resources)
dst.AuthProperties = convertAuthPropertiesTo(src.AuthProperties)
Expand Down Expand Up @@ -158,7 +156,6 @@ func convertNetworkOptionsTo(srcOpts *NetworkConfigurationList) *operatorv1beta2
dstOpts = &operatorv1beta2.NetworkConfigurationList{
CoreConfig: convertNetworkConfigTo(srcOpts.CoreConfig),
GrafanaConfig: convertNetworkConfigTo(srcOpts.GrafanaConfig),
CommandConfig: convertNetworkConfigTo(srcOpts.CommandConfig), // TODO Remove this from v1beta2 API
}
}
return dstOpts
Expand Down Expand Up @@ -328,15 +325,13 @@ func (dst *Cryostat) ConvertFrom(srcRaw conversion.Hub) error {
}

func convertSpecFrom(src *operatorv1beta2.CryostatSpec, dst *CryostatSpec) {
dst.Minimal = src.Minimal
dst.EnableCertManager = src.EnableCertManager
dst.TrustedCertSecrets = convertCertSecretsFrom(src.TrustedCertSecrets)
dst.EventTemplates = convertEventTemplatesFrom(src.EventTemplates)
dst.StorageOptions = convertStorageOptionsFrom(src.StorageOptions)
dst.ServiceOptions = convertServiceOptionsFrom(src.ServiceOptions)
dst.NetworkOptions = convertNetworkOptionsFrom(src.NetworkOptions)
dst.ReportOptions = convertReportOptionsFrom(src.ReportOptions)
dst.MaxWsConnections = src.MaxWsConnections
dst.JmxCacheOptions = convertJmxCacheOptionsFrom(src.JmxCacheOptions)
dst.Resources = convertResourceOptionsFrom(src.Resources)
dst.AuthProperties = convertAuthPropertiesFrom(src.AuthProperties)
Expand Down Expand Up @@ -444,7 +439,6 @@ func convertNetworkOptionsFrom(srcOpts *operatorv1beta2.NetworkConfigurationList
dstOpts = &NetworkConfigurationList{
CoreConfig: convertNetworkConfigFrom(srcOpts.CoreConfig),
GrafanaConfig: convertNetworkConfigFrom(srcOpts.GrafanaConfig),
CommandConfig: convertNetworkConfigFrom(srcOpts.CommandConfig), // TODO Remove this from v1beta2 API
}
}
return dstOpts
Expand Down
21 changes: 17 additions & 4 deletions api/v1beta1/cryostat_conversion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var _ = Describe("Cryostat", func() {

Expect(converted).To(Equal(newCR))
},
tableEntries(),
tableEntriesTo(),
)

DescribeTable("converting from v1beta2 to v1beta1",
Expand All @@ -71,11 +71,26 @@ var _ = Describe("Cryostat", func() {

Expect(converted).To(Equal(oldCR))
},
tableEntries(),
tableEntriesFrom(),
)

})

func tableEntriesTo() []TableEntry {
return append(tableEntries(),
Entry("WS connections", (*test.TestResources).NewCryostatWithWsConnectionsSpecV1Beta1,
(*test.TestResources).NewCryostat),
Entry("command config", (*test.TestResources).NewCryostatWithCommandConfigV1Beta1,
(*test.TestResources).NewCryostatWithIngress),
Entry("minimal mode", (*test.TestResources).NewCryostatWithMinimalModeV1Beta1,
(*test.TestResources).NewCryostat),
)
}

func tableEntriesFrom() []TableEntry {
return tableEntries()
}

func tableEntries() []TableEntry {
return []TableEntry{
Entry("defaults", (*test.TestResources).NewCryostatV1Beta1,
Expand Down Expand Up @@ -134,8 +149,6 @@ func tableEntries() []TableEntry {
(*test.TestResources).NewCryostatWithBuiltInPortConfigDisabled),
Entry("JMX cache options", (*test.TestResources).NewCryostatWithJmxCacheOptionsSpecV1Beta1,
(*test.TestResources).NewCryostatWithJmxCacheOptionsSpec),
Entry("WS connections", (*test.TestResources).NewCryostatWithWsConnectionsSpecV1Beta1,
(*test.TestResources).NewCryostatWithWsConnectionsSpec),
Entry("subprocess heap", (*test.TestResources).NewCryostatWithReportSubprocessHeapSpecV1Beta1,
(*test.TestResources).NewCryostatWithReportSubprocessHeapSpec),
Entry("security", (*test.TestResources).NewCryostatWithSecurityOptionsV1Beta1,
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/cryostat_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ type JmxCacheOptions struct {
// Cryostat allows you to install Cryostat for a single namespace.
// It contains configuration options for controlling the Deployment of the Cryostat
// application and its related components.
// A ClusterCryostat or Cryostat instance must be created to instruct the operator
// A Cryostat instance must be created to instruct the operator
// to deploy the Cryostat application.
// +operator-sdk:csv:customresourcedefinitions:resources={{Deployment,v1},{Ingress,v1},{PersistentVolumeClaim,v1},{Secret,v1},{Service,v1},{Route,v1},{ConsoleLink,v1}}
// +kubebuilder:printcolumn:name="Application URL",type=string,JSONPath=`.status.applicationUrl`
Expand Down
15 changes: 0 additions & 15 deletions api/v1beta2/cryostat_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ type CryostatSpec struct {
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec,order=2
TargetNamespaces []string `json:"targetNamespaces,omitempty"`
// Deploy a pared-down Cryostat instance with no Grafana Dashboard or JFR Data Source.
// +operator-sdk:csv:customresourcedefinitions:type=spec,order=4,displayName="Minimal Deployment",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
Minimal bool `json:"minimal"`
// List of TLS certificates to trust when connecting to targets.
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Trusted TLS Certificates"
Expand Down Expand Up @@ -64,11 +61,6 @@ type CryostatSpec struct {
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
ReportOptions *ReportConfiguration `json:"reportOptions,omitempty"`
// The maximum number of WebSocket client connections allowed (minimum 1, default unlimited).
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Max WebSocket Connections",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"}
// +kubebuilder:validation:Minimum=1
MaxWsConnections int32 `json:"maxWsConnections,omitempty"`
// Options to customize the JMX target connections cache for the Cryostat application.
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="JMX Connections Cache Options"
Expand Down Expand Up @@ -356,13 +348,6 @@ type NetworkConfigurationList struct {
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
CoreConfig *NetworkConfiguration `json:"coreConfig,omitempty"`
// Specifications for how to expose the Cryostat command service,
// which serves the WebSocket command channel.
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:hidden"}
//
// Deprecated: CommandConfig is no longer used.
CommandConfig *NetworkConfiguration `json:"commandConfig,omitempty"`
// Specifications for how to expose Cryostat's Grafana service,
// which serves the Grafana dashboard.
// +optional
Expand Down
5 changes: 0 additions & 5 deletions api/v1beta2/zz_generated.deepcopy.go

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

41 changes: 4 additions & 37 deletions bundle/manifests/cryostat-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ metadata:
"spec": {
"enableCertManager": true,
"eventTemplates": [],
"minimal": false,
"reportOptions": {
"replicas": 0
},
Expand All @@ -53,8 +52,8 @@ metadata:
]
capabilities: Seamless Upgrades
categories: Monitoring, Developer Tools
containerImage: quay.io/cryostat/cryostat-operator:2.5.0-dev
createdAt: "2024-03-27T17:54:03Z"
containerImage: quay.io/cryostat/cryostat-operator:3.0.0-dev
createdAt: "2024-04-04T17:19:02Z"
description: JVM monitoring and profiling tool
operatorframework.io/initialization-resource: |-
{
Expand All @@ -65,7 +64,6 @@ metadata:
},
"spec": {
"enableCertManager": true,
"minimal": false,
"reportOptions": {
"replicas": 0
}
Expand All @@ -87,8 +85,8 @@ spec:
owned:
- description: Cryostat allows you to install Cryostat for a single namespace.
It contains configuration options for controlling the Deployment of the Cryostat
application and its related components. A ClusterCryostat or Cryostat instance
must be created to instruct the operator to deploy the Cryostat application.
application and its related components. A Cryostat instance must be created
to instruct the operator to deploy the Cryostat application.
displayName: Cryostat
kind: Cryostat
name: cryostats.operator.cryostat.io
Expand Down Expand Up @@ -533,12 +531,6 @@ spec:
path: enableCertManager
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- description: Deploy a pared-down Cryostat instance with no Grafana Dashboard
or JFR Data Source.
displayName: Minimal Deployment
path: minimal
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- description: Override default authorization properties for Cryostat on OpenShift.
displayName: Authorization Properties
path: authProperties
Expand Down Expand Up @@ -594,35 +586,10 @@ spec:
path: jmxCredentialsDatabaseOptions.databaseSecretName
x-descriptors:
- urn:alm:descriptor:io.kubernetes:Secret
- description: The maximum number of WebSocket client connections allowed (minimum
1, default unlimited).
displayName: Max WebSocket Connections
path: maxWsConnections
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:number
- description: Options to control how the operator exposes the application outside
of the cluster, such as using an Ingress or Route.
displayName: Network Options
path: networkOptions
- description: "Specifications for how to expose the Cryostat command service,
which serves the WebSocket command channel. \n Deprecated: CommandConfig
is no longer used."
displayName: Command Config
path: networkOptions.commandConfig
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:hidden
- description: Annotations to add to the Ingress or Route during its creation.
displayName: Annotations
path: networkOptions.commandConfig.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.commandConfig.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.commandConfig.labels
- description: Specifications for how to expose the Cryostat service, which
serves the Cryostat application.
displayName: Core Config
Expand Down
Loading

0 comments on commit d2830ed

Please sign in to comment.