Skip to content

Commit c3a14a2

Browse files
Add package godoc from CONTRIBUTING.md (#109)
This PR is for issue #104 Add the package descriptions from [CONTRIBUTING.md](https://github.com/open-telemetry/opentelemetry-operator/blob/master/CONTRIBUTING.md) to the per-package godoc. Some packages do not contain any Go files, so they are not modified in this PR.
1 parent d866a54 commit c3a14a2

File tree

16 files changed

+34
-39
lines changed

16 files changed

+34
-39
lines changed

CONTRIBUTING.md

+1-38
Original file line numberDiff line numberDiff line change
@@ -71,44 +71,7 @@ Tests can also be run without an existing cluster. For that, install [`kubebuild
7171

7272
## Project Structure
7373

74-
Here's a general overview of the directories from this operator and what to expect in each one of them:
75-
76-
```
77-
.
78-
├── api # the CRDs that are handled by this operator
79-
│   └── v1alpha1 # the (currently) only CRD version we have
80-
├── build # where the binaries are placed after `make manager`
81-
├── config # the Kustomize resources that are used to assemble the operator's deployment units
82-
│   ├── certmanager # Kustomize options dealing with cert-manager
83-
│   ├── crd # Kustomize options for our CRDs
84-
│   │   ├── bases # auto generated based on the code annotations (`make manifests`)
85-
│   │   └── patches # patches to apply to the generated CRD
86-
│   ├── default # Kustomize's "entry point", generating the distribution YAML file
87-
│   ├── manager # the operator's Deployment
88-
│   ├── manifests # the resulting CSV
89-
│   │   └── bases
90-
│   ├── prometheus # ServiceMonitor that exposes our operator's metrics
91-
│   ├── rbac # RBAC rules
92-
│   ├── samples # Set of examples of how to accomplish specific scenarios. Those are bundled in the final CSV
93-
│   └── webhook # Webhook configuration and service
94-
├── controllers # our main controller, where the reconciliation starts
95-
├── hack # utility scripts
96-
├── internal # code shared with our internal packages
97-
│   ├── config # our operator's runtime configuration
98-
│   ├── podinjector # the webhook that injects sidecars into pods
99-
│   └── version # our version, as well as versions of underlying components
100-
├── local # local resources that shouldn't be added to the version control, like CRs used for dev/testing
101-
└── pkg # packages that are exporter and are part of the public API for this module
102-
├── autodetect # auto detect traits from the environment (platform, APIs, ...)
103-
├── collector # code that handles OpenTelemetry Collector
104-
│   ├── adapters # data conversion
105-
│   ├── parser # parses the OpenTelemetry Collector configuration
106-
│   ├── reconcile # reconciliation logic for OpenTelemetry Collector components
107-
│   └── upgrade # handles the upgrade routine from one OpenTelemetry Collector to the next
108-
├── naming # determines the names for components (containers, services, ...)
109-
├── platform # target platforms this operator might run
110-
└── sidecar # operations related to sidecar manipulation (add, update, remove)
111-
```
74+
For a general overview of the directories from this operator and what to expect in each one of them, please check out the [official GoDoc](https://godoc.org/github.com/open-telemetry/opentelemetry-operator) or the [locally-hosted GoDoc](http://localhost:6060/pkg/github.com/open-telemetry/opentelemetry-operator/)
11275

11376
## Contributing
11477

api/v1alpha1/groupversion_info.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
// Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group
15+
// Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group.
1616
// +kubebuilder:object:generate=true
1717
// +groupName=opentelemetry.io
1818
package v1alpha1

config/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Structure
2+
3+
The `config` folder contains the Kustomize resources that are used to assemble the operator's deployment units
4+
5+
```
6+
.
7+
├── certmanager # Kustomize options dealing with cert-manager
8+
├── crd # Kustomize options for our CRDs
9+
│   ├── bases # auto generated based on the code annotations (`make manifests`)
10+
│   └── patches # patches to apply to the generated CRD
11+
├── default # Kustomize's "entry point", generating the distribution YAML file
12+
├── manager # the operator's Deployment
13+
├── manifests # the resulting CSV
14+
│   └── bases
15+
├── prometheus # ServiceMonitor that exposes our operator's metrics
16+
├── rbac # RBAC rules
17+
├── samples # Set of examples of how to accomplish specific scenarios. Those are bundled in the final CSV
18+
└── webhook # Webhook configuration and service
19+
```

controllers/opentelemetrycollector_controller.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// Package controllers contains the main controller, where the reconciliation starts.
1516
package controllers
1617

1718
import (

internal/config/main.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// Package config contains the operator's runtime configuration.
1516
package config
1617

1718
import (

internal/podinjector/main.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// Package podinjector contains the webhook that injects sidecars into pods.
1516
package podinjector
1617

1718
import (

internal/version/main.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package version contains the operator's version, as well as versions of underlying components.
12
package version
23

34
import (

pkg/autodetect/main.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// Package autodetect is for auto-detecting traits from the environment (platform, APIs, ...).
1516
package autodetect
1617

1718
import (

pkg/collector/adapters/config_from.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package adapters is for data conversion.
12
package adapters
23

34
import (

pkg/collector/parser/receiver.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package parser is for parsing the OpenTelemetry Collector configuration.
12
package parser
23

34
import (

pkg/collector/reconcile/opentelemetry.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package reconcile contains reconciliation logic for OpenTelemetry Collector components.
12
package reconcile
23

34
import (

pkg/collector/upgrade/upgrade.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package upgrade handles the upgrade routine from one OpenTelemetry Collector to the next.
12
package upgrade
23

34
import (

pkg/collector/volume.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// Package collector handles the OpenTelemetry Collector.
1516
package collector
1617

1718
import (

pkg/naming/main.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package naming is for determining the names for components (containers, services, ...).
12
package naming
23

34
import (

pkg/platform/main.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// Package platform contains target platforms this operator might run on.
1516
package platform
1617

1718
// Platform holds the auto-detected platform type

pkg/sidecar/pod.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
// Package sidecar contains operations related to sidecar manipulation (add, update, remove).
1516
package sidecar
1617

1718
import (

0 commit comments

Comments
 (0)