Skip to content

Commit

Permalink
feat(discovery): options to configure discovery port names and numbers (
Browse files Browse the repository at this point in the history
#715)

Signed-off-by: Thuan Vo <[email protected]>
  • Loading branch information
tthvo authored Feb 12, 2024
1 parent 6ac7ec6 commit a552021
Show file tree
Hide file tree
Showing 11 changed files with 353 additions and 34 deletions.
18 changes: 17 additions & 1 deletion api/v1beta1/cryostat_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,10 +520,26 @@ type ReportsSecurityOptions struct {

// TargetDiscoveryOptions provides configuration options to the Cryostat application's target discovery mechanisms.
type TargetDiscoveryOptions struct {
// When true, the Cryostat application will disable the built-in discovery mechanisms. Defaults to false
// When true, the Cryostat application will disable the built-in discovery mechanisms. Defaults to false.
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Disable Built-in Discovery",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
BuiltInDiscoveryDisabled bool `json:"builtInDiscoveryDisabled,omitempty"`
// When true, the Cryostat application will use the default port name jfr-jmx to look for JMX connectable targets.
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Disable Built-in Port Names",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
DisableBuiltInPortNames bool `json:"disableBuiltInPortNames,omitempty"`
// List of port names that the Cryostat application should look for in order to consider a target as JMX connectable.
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldDependency:targetDiscoveryOptions.disableBuiltInPortNames:true"}
DiscoveryPortNames []string `json:"discoveryPortNames,omitempty"`
// When true, the Cryostat application will use the default port number 9091 to look for JMX connectable targets.
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Disable Built-in Port Numbers",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
DisableBuiltInPortNumbers bool `json:"disableBuiltInPortNumbers,omitempty"`
// List of port numbers that the Cryostat application should look for in order to consider a target as JMX connectable.
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldDependency:targetDiscoveryOptions.disableBuiltInPortNumbers:true"}
DiscoveryPortNumbers []int32 `json:"discoveryPortNumbers,omitempty"`
}

// JmxCredentialsDatabaseOptions provides configuration options to the Cryostat application's credentials database.
Expand Down
12 changes: 11 additions & 1 deletion api/v1beta1/zz_generated.deepcopy.go

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

54 changes: 51 additions & 3 deletions bundle/manifests/cryostat-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ metadata:
capabilities: Seamless Upgrades
categories: Monitoring, Developer Tools
containerImage: quay.io/cryostat/cryostat-operator:2.5.0-dev
createdAt: "2023-11-13T21:47:45Z"
createdAt: "2024-02-04T06:09:16Z"
description: JVM monitoring and profiling tool
operatorframework.io/initialization-resource: |-
{
Expand Down Expand Up @@ -444,11 +444,35 @@ spec:
displayName: Target Discovery Options
path: targetDiscoveryOptions
- description: When true, the Cryostat application will disable the built-in
discovery mechanisms. Defaults to false
discovery mechanisms. Defaults to false.
displayName: Disable Built-in Discovery
path: targetDiscoveryOptions.builtInDiscoveryDisabled
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- description: When true, the Cryostat application will use the default port
name jfr-jmx to look for JMX connectable targets.
displayName: Disable Built-in Port Names
path: targetDiscoveryOptions.disableBuiltInPortNames
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- description: When true, the Cryostat application will use the default port
number 9091 to look for JMX connectable targets.
displayName: Disable Built-in Port Numbers
path: targetDiscoveryOptions.disableBuiltInPortNumbers
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- description: List of port names that the Cryostat application should look
for in order to consider a target as JMX connectable.
displayName: Discovery Port Names
path: targetDiscoveryOptions.discoveryPortNames
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:targetDiscoveryOptions.disableBuiltInPortNames:true
- description: List of port numbers that the Cryostat application should look
for in order to consider a target as JMX connectable.
displayName: Discovery Port Numbers
path: targetDiscoveryOptions.discoveryPortNumbers
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:targetDiscoveryOptions.disableBuiltInPortNumbers:true
- description: List of TLS certificates to trust when connecting to targets.
displayName: Trusted TLS Certificates
path: trustedCertSecrets
Expand Down Expand Up @@ -836,11 +860,35 @@ spec:
displayName: Target Discovery Options
path: targetDiscoveryOptions
- description: When true, the Cryostat application will disable the built-in
discovery mechanisms. Defaults to false
discovery mechanisms. Defaults to false.
displayName: Disable Built-in Discovery
path: targetDiscoveryOptions.builtInDiscoveryDisabled
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- description: When true, the Cryostat application will use the default port
name jfr-jmx to look for JMX connectable targets.
displayName: Disable Built-in Port Names
path: targetDiscoveryOptions.disableBuiltInPortNames
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- description: When true, the Cryostat application will use the default port
number 9091 to look for JMX connectable targets.
displayName: Disable Built-in Port Numbers
path: targetDiscoveryOptions.disableBuiltInPortNumbers
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- description: List of port names that the Cryostat application should look
for in order to consider a target as JMX connectable.
displayName: Discovery Port Names
path: targetDiscoveryOptions.discoveryPortNames
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:targetDiscoveryOptions.disableBuiltInPortNames:true
- description: List of port numbers that the Cryostat application should look
for in order to consider a target as JMX connectable.
displayName: Discovery Port Numbers
path: targetDiscoveryOptions.discoveryPortNumbers
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:targetDiscoveryOptions.disableBuiltInPortNumbers:true
- description: List of TLS certificates to trust when connecting to targets.
displayName: Trusted TLS Certificates
path: trustedCertSecrets
Expand Down
23 changes: 22 additions & 1 deletion bundle/manifests/operator.cryostat.io_clustercryostats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4606,8 +4606,29 @@ spec:
properties:
builtInDiscoveryDisabled:
description: When true, the Cryostat application will disable
the built-in discovery mechanisms. Defaults to false
the built-in discovery mechanisms. Defaults to false.
type: boolean
disableBuiltInPortNames:
description: When true, the Cryostat application will use the
default port name jfr-jmx to look for JMX connectable targets.
type: boolean
disableBuiltInPortNumbers:
description: When true, the Cryostat application will use the
default port number 9091 to look for JMX connectable targets.
type: boolean
discoveryPortNames:
description: List of port names that the Cryostat application
should look for in order to consider a target as JMX connectable.
items:
type: string
type: array
discoveryPortNumbers:
description: List of port numbers that the Cryostat application
should look for in order to consider a target as JMX connectable.
items:
format: int32
type: integer
type: array
type: object
targetNamespaces:
description: 'List of namespaces whose workloads Cryostat should be
Expand Down
23 changes: 22 additions & 1 deletion bundle/manifests/operator.cryostat.io_cryostats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4602,8 +4602,29 @@ spec:
properties:
builtInDiscoveryDisabled:
description: When true, the Cryostat application will disable
the built-in discovery mechanisms. Defaults to false
the built-in discovery mechanisms. Defaults to false.
type: boolean
disableBuiltInPortNames:
description: When true, the Cryostat application will use the
default port name jfr-jmx to look for JMX connectable targets.
type: boolean
disableBuiltInPortNumbers:
description: When true, the Cryostat application will use the
default port number 9091 to look for JMX connectable targets.
type: boolean
discoveryPortNames:
description: List of port names that the Cryostat application
should look for in order to consider a target as JMX connectable.
items:
type: string
type: array
discoveryPortNumbers:
description: List of port numbers that the Cryostat application
should look for in order to consider a target as JMX connectable.
items:
format: int32
type: integer
type: array
type: object
trustedCertSecrets:
description: List of TLS certificates to trust when connecting to
Expand Down
23 changes: 22 additions & 1 deletion config/crd/bases/operator.cryostat.io_clustercryostats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4607,8 +4607,29 @@ spec:
properties:
builtInDiscoveryDisabled:
description: When true, the Cryostat application will disable
the built-in discovery mechanisms. Defaults to false
the built-in discovery mechanisms. Defaults to false.
type: boolean
disableBuiltInPortNames:
description: When true, the Cryostat application will use the
default port name jfr-jmx to look for JMX connectable targets.
type: boolean
disableBuiltInPortNumbers:
description: When true, the Cryostat application will use the
default port number 9091 to look for JMX connectable targets.
type: boolean
discoveryPortNames:
description: List of port names that the Cryostat application
should look for in order to consider a target as JMX connectable.
items:
type: string
type: array
discoveryPortNumbers:
description: List of port numbers that the Cryostat application
should look for in order to consider a target as JMX connectable.
items:
format: int32
type: integer
type: array
type: object
targetNamespaces:
description: 'List of namespaces whose workloads Cryostat should be
Expand Down
23 changes: 22 additions & 1 deletion config/crd/bases/operator.cryostat.io_cryostats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4603,8 +4603,29 @@ spec:
properties:
builtInDiscoveryDisabled:
description: When true, the Cryostat application will disable
the built-in discovery mechanisms. Defaults to false
the built-in discovery mechanisms. Defaults to false.
type: boolean
disableBuiltInPortNames:
description: When true, the Cryostat application will use the
default port name jfr-jmx to look for JMX connectable targets.
type: boolean
disableBuiltInPortNumbers:
description: When true, the Cryostat application will use the
default port number 9091 to look for JMX connectable targets.
type: boolean
discoveryPortNames:
description: List of port names that the Cryostat application
should look for in order to consider a target as JMX connectable.
items:
type: string
type: array
discoveryPortNumbers:
description: List of port numbers that the Cryostat application
should look for in order to consider a target as JMX connectable.
items:
format: int32
type: integer
type: array
type: object
trustedCertSecrets:
description: List of TLS certificates to trust when connecting to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,35 @@ spec:
displayName: Target Discovery Options
path: targetDiscoveryOptions
- description: When true, the Cryostat application will disable the built-in
discovery mechanisms. Defaults to false
discovery mechanisms. Defaults to false.
displayName: Disable Built-in Discovery
path: targetDiscoveryOptions.builtInDiscoveryDisabled
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- description: When true, the Cryostat application will use the default port
name jfr-jmx to look for JMX connectable targets.
displayName: Disable Built-in Port Names
path: targetDiscoveryOptions.disableBuiltInPortNames
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- description: When true, the Cryostat application will use the default port
number 9091 to look for JMX connectable targets.
displayName: Disable Built-in Port Numbers
path: targetDiscoveryOptions.disableBuiltInPortNumbers
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- description: List of port names that the Cryostat application should look
for in order to consider a target as JMX connectable.
displayName: Discovery Port Names
path: targetDiscoveryOptions.discoveryPortNames
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:targetDiscoveryOptions.disableBuiltInPortNames:true
- description: List of port numbers that the Cryostat application should look
for in order to consider a target as JMX connectable.
displayName: Discovery Port Numbers
path: targetDiscoveryOptions.discoveryPortNumbers
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:targetDiscoveryOptions.disableBuiltInPortNumbers:true
- description: List of TLS certificates to trust when connecting to targets.
displayName: Trusted TLS Certificates
path: trustedCertSecrets
Expand Down Expand Up @@ -774,11 +798,35 @@ spec:
displayName: Target Discovery Options
path: targetDiscoveryOptions
- description: When true, the Cryostat application will disable the built-in
discovery mechanisms. Defaults to false
discovery mechanisms. Defaults to false.
displayName: Disable Built-in Discovery
path: targetDiscoveryOptions.builtInDiscoveryDisabled
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- description: When true, the Cryostat application will use the default port
name jfr-jmx to look for JMX connectable targets.
displayName: Disable Built-in Port Names
path: targetDiscoveryOptions.disableBuiltInPortNames
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- description: When true, the Cryostat application will use the default port
number 9091 to look for JMX connectable targets.
displayName: Disable Built-in Port Numbers
path: targetDiscoveryOptions.disableBuiltInPortNumbers
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- description: List of port names that the Cryostat application should look
for in order to consider a target as JMX connectable.
displayName: Discovery Port Names
path: targetDiscoveryOptions.discoveryPortNames
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:targetDiscoveryOptions.disableBuiltInPortNames:true
- description: List of port numbers that the Cryostat application should look
for in order to consider a target as JMX connectable.
displayName: Discovery Port Numbers
path: targetDiscoveryOptions.discoveryPortNumbers
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:targetDiscoveryOptions.disableBuiltInPortNumbers:true
- description: List of TLS certificates to trust when connecting to targets.
displayName: Trusted TLS Certificates
path: trustedCertSecrets
Expand Down
Loading

0 comments on commit a552021

Please sign in to comment.