Skip to content

Commit a642729

Browse files
committed
Renamed "OpenTelemetry Service" to "OpenTelemetry Collector"
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
1 parent c34c7a5 commit a642729

37 files changed

+291
-298
lines changed

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ Once minikube has finished starting, get the Operator running:
3838
make run
3939
```
4040

41-
At this point, an OpenTelemetry Service instance can be installed:
41+
At this point, an OpenTelemetry Collector instance can be installed:
4242

4343
```
4444
kubectl apply -f deploy/examples/simplest.yaml
45-
kubectl get otelsvcs
45+
kubectl get otelcols
4646
kubectl get pods
4747
```
4848

@@ -54,7 +54,7 @@ kubectl delete -f deploy/examples/simplest.yaml
5454

5555
#### Model changes
5656

57-
The Operator SDK generates the `pkg/apis/opentelemetry/v1alpha1//zz_generated.*.go` files via the command `make generate`. This should be executed whenever there's a model change (`pkg/apis/opentelemetry/v1alpha1//opentelemetryservice_types.go`)
57+
The Operator SDK generates the `pkg/apis/opentelemetry/v1alpha1//zz_generated.*.go` files via the command `make generate`. This should be executed whenever there's a model change (`pkg/apis/opentelemetry/v1alpha1//opentelemetrycollector_types.go`)
5858

5959
#### Tests
6060

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ NAMESPACE ?= "${USER}"
1212
BUILD_IMAGE ?= "${NAMESPACE}/${OPERATOR_NAME}:latest"
1313
OUTPUT_BINARY ?= "${BIN_DIR}/${OPERATOR_NAME}"
1414
VERSION_PKG ?= "github.com/open-telemetry/opentelemetry-operator/pkg/version"
15-
LD_FLAGS ?= "-X ${VERSION_PKG}.version=${OPERATOR_VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelSvc=${OTELSVC_VERSION}"
15+
LD_FLAGS ?= "-X ${VERSION_PKG}.version=${OPERATOR_VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELSVC_VERSION}"
1616

17-
OTELSVC_VERSION ?= "$(shell grep -v '\#' opentelemetry.version | grep opentelemetry-service | awk -F= '{print $$2}')"
17+
OTELSVC_VERSION ?= "$(shell grep -v '\#' opentelemetry.version | grep opentelemetry-collector | awk -F= '{print $$2}')"
1818

1919
PACKAGES := $(shell go list ./cmd/... ./pkg/...)
2020

@@ -69,7 +69,7 @@ clean:
6969

7070
.PHONY: crd
7171
crd:
72-
@kubectl create -f deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml 2>&1 | grep -v "already exists" || true
72+
@kubectl create -f deploy/crds/opentelemetry_v1alpha1_opentelemetrycollector_crd.yaml 2>&1 | grep -v "already exists" || true
7373

7474
.PHONY: generate
7575
generate:

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@
44

55
The OpenTelemetry Operator is an implementation of a [Kubernetes Operator](https://coreos.com/operators/).
66

7-
At this point, it has [OpenTelemetry Service](https://github.com/open-telemetry/opentelemetry-service) as the only managed component.
7+
At this point, it has [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-service) as the only managed component.
88

99
## Getting started
1010

1111
To install the operator, run:
1212
```
13-
kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml
13+
kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/crds/opentelemetry_v1alpha1_opentelemetrycollector_crd.yaml
1414
kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/service_account.yaml
1515
kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/role.yaml
1616
kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/role_binding.yaml
1717
kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/operator.yaml
1818
```
1919

20-
Once the `opentelemetry-operator` deployment is ready, create an OpenTelemetry Service (otelsvc) instance, like:
20+
Once the `opentelemetry-operator` deployment is ready, create an OpenTelemetry Collector (otelcol) instance, like:
2121

2222
```
2323
kubectl apply -f - <<EOF
2424
apiVersion: opentelemetry.io/v1alpha1
25-
kind: OpenTelemetryService
25+
kind: OpenTelemetryCollector
2626
metadata:
2727
name: simplest
2828
spec:
@@ -43,11 +43,11 @@ spec:
4343
exporters: [logging]
4444
```
4545

46-
This will create an OpenTelemetry Service instance named `simplest`, exposing a `jaeger-grpc` port to consume spans from your instrumented applications and exporting those spans via `jaeger-grpc` to a remote Jaeger collector.
46+
This will create an OpenTelemetry Collector instance named `simplest`, exposing a `jaeger-grpc` port to consume spans from your instrumented applications and exporting those spans via `jaeger-grpc` to a remote Jaeger collector.
4747

48-
The `config` node holds the `YAML` that should be passed down as-is to the underlying OpenTelemetry Service instances. Refer to the [OpenTelemetry Service](https://github.com/open-telemetry/opentelemetry-service) documentation for a reference of the possible entries.
48+
The `config` node holds the `YAML` that should be passed down as-is to the underlying OpenTelemetry Collector instances. Refer to the [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-service) documentation for a reference of the possible entries.
4949

50-
At this point, the Operator does *not* validate the contents of the configuration file: if the configuration is invalid, the instance will still be created but the underlying OpenTelemetry Service might crash.
50+
At this point, the Operator does *not* validate the contents of the configuration file: if the configuration is invalid, the instance will still be created but the underlying OpenTelemetry Collector might crash.
5151

5252
## Contributing and Developing
5353

@@ -62,7 +62,7 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md).
6262
[goreport-img]: https://goreportcard.com/badge/github.com/jpkrohling/opentelemetry-operator
6363
[goreport]: https://goreportcard.com/report/github.com/jpkrohling/opentelemetry-operator
6464
[godoc-img]: https://godoc.org/github.com/jpkrohling/opentelemetry-operator?status.svg
65-
[godoc]: https://godoc.org/github.com/jpkrohling/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1#OpenTelemetryService
65+
[godoc]: https://godoc.org/github.com/jpkrohling/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1#OpenTelemetryCollector
6666
[code-climate]: https://codeclimate.com/github/jpkrohling/opentelemetry-operator/maintainability
6767
[code-climate-img]: https://api.codeclimate.com/v1/badges/7bb215eea77fc9c24484/maintainability
6868
[codecov]: https://codecov.io/gh/jpkrohling/opentelemetry-operator

cmd/manager/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func printVersion() {
4444
v := version.Get()
4545
log.Info("Starting the OpenTelemetry Operator",
4646
"opentelemetry-operator", v.Operator,
47-
"opentelemetry-service", v.OpenTelemetryService,
47+
"opentelemetry-collector", v.OpenTelemetryCollector,
4848
"build-date", v.BuildDate,
4949
"go-version", v.Go,
5050
"go-arch", runtime.GOARCH,
@@ -119,7 +119,7 @@ func main() {
119119
os.Exit(1)
120120
}
121121

122-
ctxUpgrade := context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("upgrade_opentelemetryservice"))
122+
ctxUpgrade := context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("upgrade_opentelemetrycollector"))
123123
if err := upgrade.ManagedInstances(ctxUpgrade, mgr.GetClient()); err != nil {
124124
log.Error(err, "failed to upgrade managed instances")
125125
}

deploy/crds/opentelemetry.io_opentelemetryservices_crd.yaml

-71
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: opentelemetrycollectors.opentelemetry.io
5+
spec:
6+
group: opentelemetry.io
7+
names:
8+
kind: OpenTelemetryCollector
9+
listKind: OpenTelemetryCollectorList
10+
plural: opentelemetrycollectors
11+
shortNames:
12+
- otelcol
13+
- otelcols
14+
singular: opentelemetrycollector
15+
scope: Namespaced
16+
subresources:
17+
scale:
18+
specReplicasPath: .spec.replicas
19+
statusReplicasPath: .status.replicas
20+
status: {}
21+
validation:
22+
openAPIV3Schema:
23+
properties:
24+
apiVersion:
25+
description: 'APIVersion defines the versioned schema of this representation
26+
of an object. Servers should convert recognized schemas to the latest
27+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
28+
type: string
29+
kind:
30+
description: 'Kind is a string value representing the REST resource this
31+
object represents. Servers may infer this from the endpoint the client
32+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
33+
type: string
34+
metadata:
35+
type: object
36+
spec:
37+
properties:
38+
args:
39+
additionalProperties:
40+
type: string
41+
type: object
42+
config:
43+
description: +required
44+
type: string
45+
image:
46+
type: string
47+
replicas:
48+
format: int32
49+
type: integer
50+
type: object
51+
status:
52+
properties:
53+
replicas:
54+
format: int32
55+
type: integer
56+
version:
57+
type: string
58+
required:
59+
- replicas
60+
- version
61+
type: object
62+
version: v1alpha1
63+
versions:
64+
- name: v1alpha1
65+
served: true
66+
storage: true

deploy/crds/simplest.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: opentelemetry.io/v1alpha1
2-
kind: OpenTelemetryService
2+
kind: OpenTelemetryCollector
33
metadata:
44
name: simplest
55
spec:

deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry-operator.v0.0.1.clusterserviceversion.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: operators.coreos.com/v1alpha1
22
kind: ClusterServiceVersion
33
metadata:
44
annotations:
5-
alm-examples: '[{"apiVersion":"opentelemetry.io/v1alpha1","kind":"OpenTelemetryService","metadata":{"name":"example-opentelemetryservice"},"spec":{"size":3}}]'
5+
alm-examples: '[{"apiVersion":"opentelemetry.io/v1alpha1","kind":"OpenTelemetryCollector","metadata":{"name":"example-opentelemetrycollector"},"spec":{"size":3}}]'
66
capabilities: Basic Install
77
name: opentelemetry-operator.v0.0.1
88
namespace: placeholder

deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
apiVersion: apiextensions.k8s.io/v1beta1
22
kind: CustomResourceDefinition
33
metadata:
4-
name: opentelemetryservices.opentelemetry.io
4+
name: opentelemetrycollectors.opentelemetry.io
55
spec:
66
group: opentelemetry.io
77
names:
8-
kind: OpenTelemetryService
9-
listKind: OpenTelemetryServiceList
10-
plural: opentelemetryservices
11-
singular: opentelemetryservice
8+
kind: OpenTelemetryCollector
9+
listKind: OpenTelemetryCollectorList
10+
plural: opentelemetrycollectors
11+
singular: opentelemetrycollector
1212
scope: Namespaced
1313
subresources:
1414
status: {}

examples/business-application.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# when `simplest.yaml` is deployed, this is how an application containing the Jaeger client can be configured to use otelsvc
2-
# in this case, we make use of the jaeger-agent as a sidecar, and the jaeger-agent connects to otelsvc via gRPC
1+
# when `simplest.yaml` is deployed, this is how an application containing the Jaeger client can be configured to use otelcol
2+
# in this case, we make use of the jaeger-agent as a sidecar, and the jaeger-agent connects to otelcol via gRPC
33
# this is suitable when the application is already configured to talk to Jaeger via UDP
44
# for greenfield applications, the OpenTelemetry client should be preferred
55
apiVersion: apps/v1

examples/simplest.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: opentelemetry.io/v1alpha1
2-
kind: OpenTelemetryService
2+
kind: OpenTelemetryCollector
33
metadata:
44
name: simplest
55
spec:

pkg/apis/opentelemetry/const.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type (
66
)
77

88
const (
9-
// ContextInstance is the OpenTelemetryService CR (instance) that is the current target of the reconciliation
9+
// ContextInstance is the OpenTelemetryCollector CR (instance) that is the current target of the reconciliation
1010
ContextInstance ContextEntry = "__instance"
1111

1212
// ContextLogger represents the context entry for the logger instance to be used for context-dependent log entries
@@ -15,6 +15,6 @@ const (
1515
// CollectorConfigMapEntry represents the configuration file name for the collector
1616
CollectorConfigMapEntry = "collector.yaml"
1717

18-
// OtelSvcImageConfigKey represents the key to override the OpenTelemetry Service container image
19-
OtelSvcImageConfigKey = "otelsvc-image"
18+
// OtelColImageConfigKey represents the key to override the OpenTelemetry Collector container image
19+
OtelColImageConfigKey = "otelcol-image"
2020
)

pkg/apis/opentelemetry/flagset.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ func FlagSet() *pflag.FlagSet {
2020

2121
fs = pflag.NewFlagSet("opentelemetry-operator", pflag.ExitOnError)
2222
fs.String(
23-
OtelSvcImageConfigKey,
24-
"quay.io/opentelemetry/opentelemetry-service:v0.0.2",
25-
"The default image to use for OpenTelemetry Service when not specified in the individual custom resource (CR)",
23+
OtelColImageConfigKey,
24+
"quay.io/opentelemetry/opentelemetry-collector:v0.0.2",
25+
"The default image to use for OpenTelemetry Collector when not specified in the individual custom resource (CR)",
2626
)
27-
viper.BindPFlag(OtelSvcImageConfigKey, fs.Lookup(OtelSvcImageConfigKey))
27+
viper.BindPFlag(OtelColImageConfigKey, fs.Lookup(OtelColImageConfigKey))
2828
}
2929

3030
return fs

0 commit comments

Comments
 (0)