Skip to content

Commit 4763d9f

Browse files
[provider/s3] Use mdatagen, promote to alpha (#38227)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Officially promotes the s3 provider to alpha and records this with mdatagen. Requires #38226. Unblocks open-telemetry/opentelemetry-collector-releases#546. --------- Co-authored-by: Antoine Toulme <[email protected]>
1 parent 2098453 commit 4763d9f

File tree

6 files changed

+58
-3
lines changed

6 files changed

+58
-3
lines changed

.chloggen/s3provider-mdatagen.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: confmap/provider/s3
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Promote to alpha stability
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [38227]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []

confmap/provider/s3provider/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,31 @@
1+
# S3 Confmap Provider
2+
3+
<!-- status autogenerated section -->
4+
| Status | |
5+
| ------------- |-----------|
6+
| Stability | [alpha] |
7+
| Distributions | [contrib] |
8+
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprovider%2Fs3provider%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprovider%2Fs3provider) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprovider%2Fs3provider%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprovider%2Fs3provider) |
9+
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9) |
10+
11+
[alpha]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#alpha
12+
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
13+
<!-- end autogenerated section -->
14+
115
## Summary
16+
217
This package provides a `ConfigMapProvider` implementation for Amazon S3 (`s3provider`) that allows the Collector the ability to load configuration by fetching and reading config objects stored in Amazon S3.
18+
319
## How it works
20+
421
- It will be called by `ConfigMapResolver` to load configuration for the Collector.
522
- By giving a config URI starting with prefix `s3://`, this `s3provider` will be used to download config objects from the given S3 URIs, and then use the downloaded configuration during Collector initialization.
623

724
Expected URI format:
25+
826
- s3://[BUCKET].s3.[REGION].amazonaws.com/[KEY]
927

1028
Prerequistes:
29+
1130
- Need to setup access keys from IAM console (aws_access_key_id and aws_secret_access_key) with permission to access Amazon S3
1231
- For details, can take a look at https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/

confmap/provider/s3provider/package_test.go confmap/provider/s3provider/generated_package_test.go

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+7-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
type: s3
2+
13
status:
4+
class: provider
5+
stability:
6+
alpha: [provider]
7+
distributions: [contrib]
28
codeowners:
3-
active: [Aneurysm9]
9+
active: [Aneurysm9]

confmap/provider/s3provider/provider.go

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright The OpenTelemetry Authors
22
// SPDX-License-Identifier: Apache-2.0
33

4+
//go:generate mdatagen metadata.yaml
5+
46
package s3provider // import "github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider"
57

68
import (

reports/distributions/contrib.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ components:
109109
- sumologic
110110
- tail_sampling
111111
- transform
112+
provider:
113+
- s3
112114
receiver:
113115
- active_directory_ds
114116
- aerospike

0 commit comments

Comments
 (0)