Skip to content

Commit

Permalink
Add Jaeger CSV and Package for OLM integration and deployment of the …
Browse files Browse the repository at this point in the history
…operator through OperatorHub

- This pull requests introduces a CSV and Package which can be bundled together and used by the [Operator Lifecycle Manager](https://github.com/operator-framework/operator-lifecycle-manager) to install, manage, and upgrade the Jaeger Operator in a cluster.

- The Jaeger operator versions available to all Kubernetes clusters using OLM can be updated by submitting a pull request to the [Community Operators GitHub repo](https://github.com/operator-framework/community-operators) that includes the latest CSVs, CRDs, and Packages.

- The CSV was created based of the [documentation provided by OLM](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/Documentation/design/building-your-csv.md) and the [documentation](https://github.com/operator-framework/community-operators/blob/master/docs/marketplace-required-csv-annotations.md) provided by [OperatorHub](https://github.com/operator-framework/operator-marketplace).

- The operator and the CSV were tested using the [scorecard functionality recently introduced](operator-framework/operator-sdk#758) to the [Operator-sdk](https://github.com/operator-framework/operator-sdk). Currently, the Jaeger operator scores a 4/18 on the scorecard tests.

OLM integration could be improved by future code changes to the Operator:
- Addressing the operator-sdk scorecard tests that failed.
- Adding additional information to the Jaeger CSV based on the [CSV documentation provided by OLM](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/Documentation/design/building-your-csv.md)
- Adding additional information to the Jaeger CSV based on the [CSV documentation provided by OperatorHub](https://github.com/operator-framework/community-operators/blob/master/docs/marketplace-required-csv-annotations.md)

Signed-off-by: awgreene <agreene@redhat.com>
  • Loading branch information
awgreene committed Jan 24, 2019
1 parent 1e134be commit 509a481
Show file tree
Hide file tree
Showing 3 changed files with 206 additions and 0 deletions.
20 changes: 20 additions & 0 deletions CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,23 @@ There are a set of templates under the `test` directory that can be used to setu
make es
make cassandra
----

==== Operator-Lifecycle-Manager Integration

The link:https://github.com/operator-framework/operator-lifecycle-manager/[Operator-Lifecycle-Manager (OLM)] can install, manage, and upgrade operators and their dependencies in a cluster.

With OLM, users can:

* Define applications as a single Kubernetes resource that encapsulates requirements and metadata
* Install applications automatically with dependency resolution or manually with nothing but kubectl
* Upgrade applications automatically with different approval policies

OLM also enforces some constraints on the components it manages in order to ensure a good user experience.

The Jaeger community can provide and mantain a link:https://github.com/operator-framework/operator-lifecycle-manager/blob/master/Documentation/design/building-your-csv.md/[ClusterServiceVersion (CSV) YAML] to integrate with OLM.
The CSV YAML can be tested with the operator-sdk:

[source,bash]
----
operator-sdk scorecard --cr-manifest deploy/cr-example.yaml --csv-path ./deploy/bundle/camel-k.v0.1.0.clusterserviceversion.yaml
----
4 changes: 4 additions & 0 deletions deploy/bundle/jaeger.package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
packageName: jaeger
channels:
- name: alpha
currentCSV: jaeger-operator.v1.8.2
182 changes: 182 additions & 0 deletions deploy/bundle/jaeger.v1.8.2.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
name: jaeger-operator.v1.8.2
namespace: openshift-operators
annotations:
categories: "tracing, monitoring, troubleshooting"
certified: "false"
containerImage: docker.io/jaegertracing/jaeger-operator:1.8.2
createdAt: 2019-01-09T12:00:00Z
support: Jaeger
alm-examples: >-
[
{
"apiVersion": "io.jaegertracing/v1alpha1",
"kind": "Jaeger",
"metadata": {
"name": "my-jaeger"
},
"spec": {
"strategy": "allInOne",
"allInOne": {
"image": "jaegertracing/all-in-one:1.8",
"options": {
"log-level": "debug",
"query": {
"base-path": "/jaeger"
}
}
},
"ui": {
"options": {
"dependencies": {
"menuEnabled": false
},
"tracking": {
"gaID": "UA-000000-2"
},
"menu": [
{
"label": "About Jaeger",
"items": [
{
"label": "Documentation",
"url": "https://www.jaegertracing.io/docs/latest"
}
]
}
]
}
},
"storage": {
"options": {
"memory": {
"max-traces": 100000
}
}
}
}
}
]
spec:
displayName: jaeger-operator
description: |-
Provides monitoring and troubleshooting microservices-based distributed systems
keywords: ['tracing', 'monitoring', 'troubleshooting']
version: 1.8.2
maintainers:
- name: Jaeger Google Group
email: jaeger-tracing@googlegroups.com
provider:
name: Jaeger
labels:
name: jaeger-operator
selector:
matchLabels:
name: jaeger-operator
links:
- name: Jaeger Operator Source Code
url: https://github.com/jaegertracing/jaeger-operator
installModes:
- type: OwnNamespace
supported: true
- type: SingleNamespace
supported: true
- type: MultiNamespace
supported: false
- type: AllNamespaces
supported: true
install:
strategy: deployment
spec:
permissions:
- serviceAccountName: jaeger-operator
rules:
- apiGroups:
- ""
resources:
- pods
- services
- endpoints
- persistentvolumeclaims
- events
- configmaps
- secrets
- serviceaccounts
verbs:
- '*'
- apiGroups:
- apps
resources:
- deployments
- daemonsets
- replicasets
- statefulsets
verbs:
- '*'
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- get
- create
- apiGroups:
- io.jaegertracing
resources:
- '*'
verbs:
- '*'
- apiGroups:
- extensions
resources:
- ingresses
verbs:
- "*"
- apiGroups:
- batch
resources:
- jobs
- cronjobs
verbs:
- "*"
deployments:
- name: jaeger-operator
spec:
replicas: 1
selector:
matchLabels:
name: jaeger-operator
template:
metadata:
labels:
name: jaeger-operator
spec:
serviceAccountName: jaeger-operator
containers:
- name: jaeger-operator
image: jaegertracing/jaeger-operator:1.8.2
ports:
- containerPort: 60000
name: metrics
args: ["start"]
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "jaeger-operator"
customresourcedefinitions:
owned:
- name: jaegers.io.jaegertracing
version: v1alpha1
kind: Jaeger
displayName: Jaeger
description: A configuration file for a Jaeger custom resource.

0 comments on commit 509a481

Please sign in to comment.