Skip to content

WIP: SignalManager API to install signal stacks. #724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ check-jq:
jq --version > /dev/null

.PHONY: docs
docs: $(CRDOC)
docs: $(CRDOC) generate-crds
mkdir -p docs
$(CRDOC) --resources deploy/crds/common --output docs/api.md

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ metadata:
capabilities: Basic Install
categories: Monitoring
certified: "false"
containerImage: observability-operator:1.0.0
createdAt: "2025-03-03T08:38:22Z"
containerImage: grover.home:5000/alanconway/observability-operator:3.3.3
createdAt: "2025-04-10T17:19:16Z"
description: A Go based Kubernetes operator to setup and manage highly available
Monitoring Stack using Prometheus, Alertmanager and Thanos Querier.
operatorframework.io/cluster-monitoring: "true"
Expand All @@ -58,7 +58,7 @@ metadata:
]
operators.operatorframework.io/project_layout: unknown
repository: https://github.com/rhobs/observability-operator
name: observability-operator.v1.0.0
name: observability-operator.v3.3.3
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -511,23 +511,33 @@ spec:
- apiGroups:
- observability.openshift.io
resources:
- uiplugins
- signalmanagers
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- observability.openshift.io
resources:
- signalmanagers/finalizers
- signalmanagers/status
- uiplugins/finalizers
- uiplugins/status
verbs:
- get
- update
- apiGroups:
- observability.openshift.io
resources:
- uiplugins
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- operator.openshift.io
resources:
Expand Down Expand Up @@ -917,7 +927,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: observability-operator:1.0.0
image: grover.home:5000/alanconway/observability-operator:3.3.3
imagePullPolicy: Always
livenessProbe:
httpGet:
Expand Down Expand Up @@ -1045,7 +1055,7 @@ spec:
maturity: alpha
provider:
name: Red Hat
version: 1.0.0
version: 3.3.3
webhookdefinitions:
- admissionReviewVersions:
- v1
Expand Down
6 changes: 3 additions & 3 deletions cmd/operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ var defaultImages = map[string]string{
"alertmanager": "",
"thanos": obopo.DefaultThanosImage,
"ui-dashboards": "quay.io/openshift-observability-ui/console-dashboards-plugin:v0.4.0",
"ui-troubleshooting-panel": "quay.io/openshift-observability-ui/troubleshooting-panel-console-plugin:v0.4.0",
"ui-troubleshooting-panel": "grover.home:5000/alanconway/troubleshooting-panel-console-plugin:latest",
"ui-distributed-tracing-pf4": "quay.io/openshift-observability-ui/distributed-tracing-console-plugin:v0.3.0",
"ui-distributed-tracing": "quay.io/openshift-observability-ui/distributed-tracing-console-plugin:v0.4.0",
"ui-logging-pf4": "quay.io/openshift-observability-ui/logging-view-plugin:v6.0.0",
"ui-logging": "quay.io/openshift-observability-ui/logging-view-plugin:v6.1.0",
"ui-monitoring": "quay.io/openshift-observability-ui/monitoring-console-plugin:release-coo-1.1",
"korrel8r": "quay.io/korrel8r/korrel8r:0.7.4",
"korrel8r": "grover.home:5000/alanconway/korrel8r:latest",
"health-analyzer": "quay.io/openshiftanalytics/cluster-health-analyzer:v0.4.0",
"perses": "quay.io/persesdev/perses:v0.50.1",
}
Expand Down Expand Up @@ -95,7 +95,7 @@ func main() {
flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
flag.StringVar(&healthProbeAddr, "health-probe-bind-address", ":8081", "The address the health probe endpoint binds to.")
flag.Var(images, "images", fmt.Sprintf("Full images refs to use for containers managed by the operator. E.g thanos=quay.io/thanos/thanos:v0.33.0. Images used are %v", imagesUsed()))
flag.BoolVar(&openShiftEnabled, "openshift.enabled", false, "Enable OpenShift specific features such as Console Plugins.")
flag.BoolVar(&openShiftEnabled, "openshift.enabled", true, "Enable OpenShift specific features such as Console Plugins.")

opts := zap.Options{
Development: true,
Expand Down
94 changes: 94 additions & 0 deletions deploy/crds/common/observability.openshift.io_configs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.2
name: configs.observability.openshift.io
spec:
group: observability.openshift.io
names:
kind: Config
listKind: ConfigList
plural: configs
singular: config
scope: Cluster
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: |-
Config defines an observability configuration that can deploy operators and resources for
observability signal collectors and stores.
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: ConfigSpec specifies what to install.
properties:
defaultInstall:
description: |-
DefaultInstall is the default install type for signals that are not listed or
are listed without an `install` field.
For example, `{ defaultinstall: Default }` with no `signals` field installs all signal
types with default settings.
type: string
installDefinitions:
items:
description: InstallDefinitionSpec defines a new installation type.
properties:
configMap:
description: |-
ConfigMap contains deployment bundles for the install type, with key=signal type.
FIXME: which way around? install < signal or signal < install
type: string
install:
description: Name of the installation type.
type: string
type: object
type: array
signals:
description: Signals specifies what to install for each signal type.
items:
properties:
installType:
description: Install type for this signal. Optional, if absent
use ..defaultInstall
type: string
namespace:
description: |-
Namespace to install to. Optional, each signal type has a default namespace.
A signal can be listed multiple times with different `namespace` values,
to install in multiple namespaces.
type: string
signal:
description: Name of this signal type.
type: string
required:
- signal
type: object
type: array
type: object
status:
description: FIXME Status
type: object
type: object
served: true
storage: true
subresources:
status: {}
135 changes: 135 additions & 0 deletions deploy/crds/common/observability.openshift.io_signalmanagers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.2
name: signalmanagers.observability.openshift.io
spec:
group: observability.openshift.io
names:
kind: SignalManager
listKind: SignalManagerList
plural: signalmanagers
singular: signalmanager
scope: Cluster
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: "SignalManager is a custom resource to enable observability in
the cluster.\n\nEach type of observability signal (logs, metrics, network
events, ...) requires operators to be\ninstalled and resources created to
configure collection, processing, and storage of signal data.\n\nThe SignalManager
automatically installs the operators, custom resource definitions, and\nresources
to enable all the desired observability signals in a cluster with default\nconfigurations.\n\nThis
means you can get observability up and running quickly and easily,\nbut
still customize the details if and when you need to.\n\n## Pattern\n\nA
\"Pattern\" is a named set of configurations for each of the observability
signals.\nChoosing a pattern automatically installs required operators (if
needed) _and_ creates\nworking resources so you have complete, working,
observability stacks.\n\nThe following patterns are always available, others
may be made available.\n\n - Default:\n Installs operators and resources
suitable for the most common use cases.\n The operator owns and manages
the resources, and keeps them in the default state.\n - Custom:\n Installs
operators, but does not create any live resources.\n The user can create
customized resources, they will not be modified by this operator.\n - Disabled:
Do not install any operators, resource definitions, or resources.\n\nCustom
patterns can be defined in `spec.patterns`.\n\n## Examples\n\nEnable all
observability components with default settings.\n\n\tkind: SignalManager\n\tspec:\n\t
\ pattern: Default\n\nDisable all observability components except for logging.\n\n\tkind:
SignalManager\n\tspec:\n\t pattern: Disabled\n\t signals:\n\t name:
Log\n\t pattern: Default\n\nEnable most components with defaults, install
the logging operators,\nbut use custom logging resources (created separately)\n\n\tkind:
SignalManager\n\tspec:\n\t pattern: Default\n\t signals:\n\t name:
log\n\t pattern: Custom\n\n## Lifecycle and ownership\n\nOwnership of
resources depends on the pattern:\n\n - None: No operators installed, no
resources created or reconciled.\n - Custom: Operators installed but no
resources created. User is free to create resources\n they are not owned
or reconciled by this operator.\n - Default, or any other defined configuration:\n
\ This operator creates, owns, and reconciles resources to keep them consistent
with the chosen\n pattern.\n\nFIXME: Operator may reconcile only part
of the resource and allow user to tweak other parts.\nNeeds consideration.
COO already uses server-side-apply to do this in some cases.\n\nFIXME: Patterns
may need to be \"parameterized\" e.g. with sizing data.\nHow to include
such parameters without duplicating existing CRs?\n\nFIXME: Define behavior
on spec changes: deleting, re-creating, updating resources.\nChange to Custom
should leave resources in place so user can eddit.\nWhat to do on change
_from_ Custom?"
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: Lists signals and the pattern to deploy them.
properties:
pattern:
description: The default pattern for signals that are not listed or
have no `pattern` field.
type: string
patterns:
description: Patterns is a list of custom pattern definitions.
items:
description: |-
PatternSpec defines a custom pattern.

on the cluster. Simplest format is a flat YAML file, but we may need more structure
to store kustomize scripts, multi-stage deployments, health checks, metadata etc....
Possible storage formats: ConfigMap, PersistentVolume, container image...

Patterns should also be usable directly, without depending on this API.
Preferably using only kubectl and kustomize.
properties:
pattern:
description: Name of the pattern.
type: string
required:
- pattern
type: object
type: array
signals:
description: Signals is a list of signal types with the desired pattern.
items:
properties:
name:
description: Signal name
type: string
namespace:
description: |-
Namespace to install to.

Optional, each signal type has a default namespace.
type: string
pattern:
description: Pattern for this signal. Optional, if absent use
the 'Default' pattern.
type: string
required:
- name
type: object
type: array
required:
- pattern
type: object
status:
description: Status of the signal manager.
type: object
type: object
served: true
storage: true
subresources:
status: {}
4 changes: 2 additions & 2 deletions deploy/olm/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ resources:

images:
- name: observability-operator
newName: observability-operator
newTag: 1.0.0
newName: grover.home:5000/alanconway/observability-operator
newTag: 3.3.3

patches:
- patch: |-
Expand Down
20 changes: 15 additions & 5 deletions deploy/operator/observability-operator-cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,23 +226,33 @@ rules:
- apiGroups:
- observability.openshift.io
resources:
- uiplugins
- signalmanagers
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- observability.openshift.io
resources:
- signalmanagers/finalizers
- signalmanagers/status
- uiplugins/finalizers
- uiplugins/status
verbs:
- get
- update
- apiGroups:
- observability.openshift.io
resources:
- uiplugins
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- operator.openshift.io
resources:
Expand Down
Loading
Loading