Skip to content

Commit

Permalink
docs(network): NetworkConfiguration is not Ingress-specific (#429)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebaron committed Jul 20, 2022
1 parent d696da8 commit 5ceb7db
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 77 deletions.
34 changes: 18 additions & 16 deletions api/v1beta1/cryostat_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ type CryostatSpec struct {
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
ServiceOptions *ServiceConfigList `json:"serviceOptions,omitempty"`
// Options to control how the operator exposes the application outside of the cluster
// using an Ingress or Route.
// Options to control how the operator exposes the application outside of the cluster,
// such as using an Ingress or Route.
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
NetworkOptions *NetworkConfigurationList `json:"networkOptions,omitempty"`
Expand Down Expand Up @@ -244,44 +244,46 @@ type ServiceConfigList struct {
ReportsConfig *ReportsServiceConfig `json:"reportsConfig,omitempty"`
}

// NetworkConfiguration provides customization for the corresponding ingress,
// which allows a service to be exposed when running in a Kubernetes environment
// NetworkConfiguration provides customization for how to expose a Cryostat
// service, so that it can be reached from outside the cluster.
// On OpenShift, a Route is created by default. On Kubernetes, an Ingress will
// be created if the IngressSpec is defined within this NetworkConfiguration.
type NetworkConfiguration struct {
// Configuration for an ingress object.
// 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
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
IngressSpec *netv1.IngressSpec `json:"ingressSpec,omitempty"`
// Annotations to add to the ingress during its creation.
// Annotations to add to the Ingress or Route during its creation.
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
Annotations map[string]string `json:"annotations,omitempty"`
// Labels to add to the ingress during its creation.
// Labels to add to the Ingress or Route during its creation.
// The label with key "app" is reserved for use by the operator.
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
Labels map[string]string `json:"labels,omitempty"`
}

// NetworkConfigurationList holds all three NetworkConfiguration objects that specify
// the Ingress configurations for the services created by the operator for
// the main Cryostat deployment
// NetworkConfigurationList holds NetworkConfiguration objects that specify
// how to expose the services created by the operator for the main Cryostat
// deployment
type NetworkConfigurationList struct {
// Specifications for ingress that exposes the cryostat service
// (which serves the cryostat web-client)
// Specifications for how to expose the Cryostat service,
// which serves the Cryostat application
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
CoreConfig *NetworkConfiguration `json:"coreConfig,omitempty"`
// Specifications for ingress that exposes the cryostat-command service
// (which serves the websocket command channel)
// 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 ingress that exposes the cryostat-grafana service
// (which serves the grafana dashboard)
// 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"`
Expand Down
26 changes: 13 additions & 13 deletions bundle/manifests/cryostat-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,45 +154,45 @@ spec:
path: minimal
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- description: Options to control how the operator exposes the application outside of the cluster using an Ingress or Route.
- 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 ingress that exposes the cryostat-command service (which serves the websocket command channel) \n Deprecated: CommandConfig is no longer used."
- 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 during its creation.
- 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
- 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 during its creation. The label with key "app" is reserved for use by the operator.
- 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 ingress that exposes the cryostat service (which serves the cryostat web-client)
- description: Specifications for how to expose the Cryostat service, which serves the Cryostat application
displayName: Core Config
path: networkOptions.coreConfig
- description: Annotations to add to the ingress during its creation.
- description: Annotations to add to the Ingress or Route during its creation.
displayName: Annotations
path: networkOptions.coreConfig.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
- 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.coreConfig.ingressSpec
- description: Labels to add to the ingress during its creation. The label with key "app" is reserved for use by the operator.
- 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.coreConfig.labels
- description: Specifications for ingress that exposes the cryostat-grafana service (which serves the grafana dashboard)
- 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 during its creation.
- 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
- 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 during its creation. The label with key "app" is reserved for use by the operator.
- 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 Cryostat Automated Report Analysis
Expand Down
26 changes: 13 additions & 13 deletions bundle/manifests/operator.cryostat.io_cryostats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,18 @@ spec:
description: Deploy a pared-down Cryostat instance with no Grafana Dashboard or JFR Data Source.
type: boolean
networkOptions:
description: Options to control how the operator exposes the application outside of the cluster using an Ingress or Route.
description: Options to control how the operator exposes the application outside of the cluster, such as using an Ingress or Route.
properties:
commandConfig:
description: "Specifications for ingress that exposes the cryostat-command service (which serves the websocket command channel) \n Deprecated: CommandConfig is no longer used."
description: "Specifications for how to expose the Cryostat command service, which serves the WebSocket command channel \n Deprecated: CommandConfig is no longer used."
properties:
annotations:
additionalProperties:
type: string
description: Annotations to add to the ingress during its creation.
description: Annotations to add to the Ingress or Route during its creation.
type: object
ingressSpec:
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
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
properties:
defaultBackend:
description: DefaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller.
Expand Down Expand Up @@ -226,19 +226,19 @@ spec:
labels:
additionalProperties:
type: string
description: Labels to add to the ingress during its creation. The label with key "app" is reserved for use by the operator.
description: Labels to add to the Ingress or Route during its creation. The label with key "app" is reserved for use by the operator.
type: object
type: object
coreConfig:
description: Specifications for ingress that exposes the cryostat service (which serves the cryostat web-client)
description: Specifications for how to expose the Cryostat service, which serves the Cryostat application
properties:
annotations:
additionalProperties:
type: string
description: Annotations to add to the ingress during its creation.
description: Annotations to add to the Ingress or Route during its creation.
type: object
ingressSpec:
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
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
properties:
defaultBackend:
description: DefaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller.
Expand Down Expand Up @@ -377,19 +377,19 @@ spec:
labels:
additionalProperties:
type: string
description: Labels to add to the ingress during its creation. The label with key "app" is reserved for use by the operator.
description: Labels to add to the Ingress or Route during its creation. The label with key "app" is reserved for use by the operator.
type: object
type: object
grafanaConfig:
description: Specifications for ingress that exposes the cryostat-grafana service (which serves the grafana dashboard)
description: Specifications for how to expose Cryostat's Grafana service, which serves the Grafana dashboard
properties:
annotations:
additionalProperties:
type: string
description: Annotations to add to the ingress during its creation.
description: Annotations to add to the Ingress or Route during its creation.
type: object
ingressSpec:
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
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
properties:
defaultBackend:
description: DefaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller.
Expand Down Expand Up @@ -528,7 +528,7 @@ spec:
labels:
additionalProperties:
type: string
description: Labels to add to the ingress during its creation. The label with key "app" is reserved for use by the operator.
description: Labels to add to the Ingress or Route during its creation. The label with key "app" is reserved for use by the operator.
type: object
type: object
type: object
Expand Down
Loading

0 comments on commit 5ceb7db

Please sign in to comment.