-
Notifications
You must be signed in to change notification settings - Fork 162
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
Add a Kubernetes Distribution #507
Merged
TylerHelmuth
merged 20 commits into
open-telemetry:main
from
TylerHelmuth:add-kubernetes-distribution
Apr 10, 2024
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
00dc944
Add a k8s distribution
TylerHelmuth dee0f7c
Remove logging exporter
TylerHelmuth 22bb539
Update ports
TylerHelmuth 37f1b35
Remove prometheus scrape from default config
TylerHelmuth 0aad454
Add the fileexporter
TylerHelmuth d3feb25
Remove httpforwarderextension
TylerHelmuth 3f6cea9
Explain docker ports
TylerHelmuth bd05cce
Reduce k8s distro artifacts
TylerHelmuth 0e941a0
Fix makefile
TylerHelmuth 1940768
Update manifest to be v0.97.0
TylerHelmuth 70b0536
Update when CI runs
TylerHelmuth c9c9dcf
Allow matrix to by dynamic
TylerHelmuth f48433f
remove unneeded file
TylerHelmuth e9326b9
Remove default config
TylerHelmuth f5f1dfc
Fix dockerfile
TylerHelmuth 5eb908d
Add additional code owners for k8s distro
TylerHelmuth 82033ca
Apply feedback
TylerHelmuth 0ae3eb7
Merge remote-tracking branch 'upstream/main' into add-kubernetes-dist…
TylerHelmuth 78358ae
Merge remote-tracking branch 'upstream/main' into add-kubernetes-dist…
TylerHelmuth 8f2cbb5
Apply feedback
TylerHelmuth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,19 @@ on: | |
distribution: | ||
required: true | ||
type: string | ||
goos: | ||
required: true | ||
type: string | ||
goarch: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
check-goreleaser: | ||
strategy: | ||
matrix: | ||
GOOS: [ linux, windows, darwin ] | ||
GOARCH: [ "386", amd64, arm64, ppc64le, arm, s390x ] | ||
GOOS: ${{ fromJSON( inputs.goos) }} | ||
GOARCH: ${{ fromJSON( inputs.goarch) }} | ||
Comment on lines
+20
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change (and the one in base-release), could be done in a separate PR if desired. |
||
exclude: | ||
- GOOS: darwin | ||
GOARCH: "386" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Continuous Integration - k8s - GoReleaser | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- "distributions/otelcol-k8s/**" | ||
- "cmd/**" | ||
- ".github/**" | ||
- "scripts/**" | ||
- "Makefile" | ||
- "go.mod" | ||
- "go.sum" | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- "distributions/otelcol-k8s/**" | ||
- "cmd/**" | ||
- ".github/**" | ||
- "scripts/**" | ||
- "Makefile" | ||
- "go.mod" | ||
- "go.sum" | ||
|
||
jobs: | ||
check-goreleaser: | ||
name: Continuous Integration - k8s - GoReleaser | ||
uses: ./.github/workflows/base-ci-goreleaser.yaml | ||
with: | ||
distribution: otelcol-k8s | ||
goos: '[ "linux" ]' | ||
goarch: '[ "amd64", "arm64", "ppc64le", "s390x" ]' | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Release k8s | ||
|
||
on: | ||
push: | ||
tags: ["v*"] | ||
|
||
jobs: | ||
release: | ||
name: Release Contrib | ||
uses: ./.github/workflows/base-release.yaml | ||
with: | ||
distribution: otelcol-k8s | ||
goos: '[ "linux" ]' | ||
goarch: '[ "amd64", "arm64", "ppc64le", "s390x" ]' | ||
secrets: inherit | ||
permissions: write-all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
partial: | ||
by: target | ||
project_name: opentelemetry-collector-releases | ||
env: | ||
- COSIGN_YES=true | ||
builds: | ||
- id: otelcol-k8s | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
- ppc64le | ||
- s390x | ||
dir: _build | ||
binary: otelcol-k8s | ||
ldflags: | ||
- -s | ||
- -w | ||
flags: | ||
- -trimpath | ||
env: | ||
- CGO_ENABLED=0 | ||
archives: | ||
- id: otelcol-k8s | ||
builds: | ||
- otelcol-k8s | ||
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}' | ||
checksum: | ||
name_template: '{{ .ProjectName }}_otelcol-k8s_checksums.txt' | ||
dockers: | ||
- goos: linux | ||
goarch: amd64 | ||
dockerfile: Dockerfile | ||
image_templates: | ||
- otel/opentelemetry-collector-k8s:{{ .Version }}-amd64 | ||
- otel/opentelemetry-collector-k8s:latest-amd64 | ||
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:{{ .Version }}-amd64 | ||
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:latest-amd64 | ||
build_flag_templates: | ||
- --pull | ||
- --platform=linux/amd64 | ||
- --label=org.opencontainers.image.created={{.Date}} | ||
- --label=org.opencontainers.image.name={{.ProjectName}} | ||
- --label=org.opencontainers.image.revision={{.FullCommit}} | ||
- --label=org.opencontainers.image.version={{.Version}} | ||
- --label=org.opencontainers.image.source={{.GitURL}} | ||
use: buildx | ||
- goos: linux | ||
goarch: arm64 | ||
dockerfile: Dockerfile | ||
image_templates: | ||
- otel/opentelemetry-collector-k8s:{{ .Version }}-arm64 | ||
- otel/opentelemetry-collector-k8s:latest-arm64 | ||
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:{{ .Version }}-arm64 | ||
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:latest-arm64 | ||
build_flag_templates: | ||
- --pull | ||
- --platform=linux/arm64 | ||
- --label=org.opencontainers.image.created={{.Date}} | ||
- --label=org.opencontainers.image.name={{.ProjectName}} | ||
- --label=org.opencontainers.image.revision={{.FullCommit}} | ||
- --label=org.opencontainers.image.version={{.Version}} | ||
- --label=org.opencontainers.image.source={{.GitURL}} | ||
use: buildx | ||
- goos: linux | ||
goarch: ppc64le | ||
dockerfile: Dockerfile | ||
image_templates: | ||
- otel/opentelemetry-collector-k8s:{{ .Version }}-ppc64le | ||
- otel/opentelemetry-collector-k8s:latest-ppc64le | ||
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:{{ .Version }}-ppc64le | ||
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:latest-ppc64le | ||
build_flag_templates: | ||
- --pull | ||
- --platform=linux/ppc64le | ||
- --label=org.opencontainers.image.created={{.Date}} | ||
- --label=org.opencontainers.image.name={{.ProjectName}} | ||
- --label=org.opencontainers.image.revision={{.FullCommit}} | ||
- --label=org.opencontainers.image.version={{.Version}} | ||
- --label=org.opencontainers.image.source={{.GitURL}} | ||
use: buildx | ||
- goos: linux | ||
goarch: s390x | ||
dockerfile: Dockerfile | ||
image_templates: | ||
- otel/opentelemetry-collector-k8s:{{ .Version }}-s390x | ||
- otel/opentelemetry-collector-k8s:latest-s390x | ||
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:{{ .Version }}-s390x | ||
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:latest-s390x | ||
build_flag_templates: | ||
- --pull | ||
- --platform=linux/s390x | ||
- --label=org.opencontainers.image.created={{.Date}} | ||
- --label=org.opencontainers.image.name={{.ProjectName}} | ||
- --label=org.opencontainers.image.revision={{.FullCommit}} | ||
- --label=org.opencontainers.image.version={{.Version}} | ||
- --label=org.opencontainers.image.source={{.GitURL}} | ||
use: buildx | ||
docker_manifests: | ||
- name_template: otel/opentelemetry-collector-k8s:{{ .Version }} | ||
image_templates: | ||
- otel/opentelemetry-collector-k8s:{{ .Version }}-amd64 | ||
- otel/opentelemetry-collector-k8s:{{ .Version }}-arm64 | ||
- otel/opentelemetry-collector-k8s:{{ .Version }}-ppc64le | ||
- otel/opentelemetry-collector-k8s:{{ .Version }}-s390x | ||
- name_template: otel/opentelemetry-collector-k8s:latest | ||
image_templates: | ||
- otel/opentelemetry-collector-k8s:latest-amd64 | ||
- otel/opentelemetry-collector-k8s:latest-arm64 | ||
- otel/opentelemetry-collector-k8s:latest-ppc64le | ||
- otel/opentelemetry-collector-k8s:latest-s390x | ||
- name_template: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:{{ .Version }} | ||
image_templates: | ||
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:{{ .Version }}-amd64 | ||
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:{{ .Version }}-arm64 | ||
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:{{ .Version }}-ppc64le | ||
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:{{ .Version }}-s390x | ||
- name_template: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:latest | ||
image_templates: | ||
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:latest-amd64 | ||
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:latest-arm64 | ||
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:latest-ppc64le | ||
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s:latest-s390x | ||
signs: | ||
- cmd: cosign | ||
args: | ||
- sign-blob | ||
- --output-signature | ||
- ${artifact}.sig | ||
- --output-certificate | ||
- ${artifact}.pem | ||
- ${artifact} | ||
signature: ${artifact}.sig | ||
artifacts: all | ||
certificate: ${artifact}.pem | ||
docker_signs: | ||
- args: | ||
- sign | ||
- ${artifact} | ||
artifacts: all | ||
sboms: | ||
- id: archive | ||
artifacts: archive | ||
- id: package | ||
artifacts: package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM alpine:3.19 as certs | ||
RUN apk --update add ca-certificates | ||
|
||
FROM scratch | ||
|
||
ARG USER_UID=10001 | ||
USER ${USER_UID} | ||
|
||
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||
COPY --chmod=755 otelcol-k8s /otelcol-k8s | ||
ENTRYPOINT ["/otelcol-k8s"] | ||
# `4137` and `4318`: OTLP | ||
# `55678`: OpenCensus | ||
# `55679`: zpages | ||
# `6831`, `14268`, and `14250`: Jaeger | ||
# `9411`: Zipkin | ||
EXPOSE 4317 4318 55678 55679 6831 14268 14250 9411 | ||
TylerHelmuth marked this conversation as resolved.
Show resolved
Hide resolved
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't here be as well the operator maintainers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't @open-telemetry/operator-approvers include the maintainers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. I went with
-approvers
instead of maintainers because thats how we do our own code owners file and its how the otel site handles adding other teams as code owners. In my opinion helm and operator Approvers are totally qualified to review PRs for this distro.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TylerHelmuth is there anything we need to do to resolve the error message github is giving us here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya, we need to give those groups access to this repo. I'll open a community issue for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created open-telemetry/community#2039