Skip to content

Commit

Permalink
Remove loadbalancer version, not officially supported (#5)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu committed Sep 1, 2021
1 parent 6cbaed4 commit 54b03e2
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 234 deletions.
70 changes: 0 additions & 70 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ archives:
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
builds:
- "opentelemetry-collector"
- id: "opentelemetry-collector-loadbalancer"
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}"
builds:
- "opentelemetry-collector-loadbalancer"
builds:
- id: "opentelemetry-collector"
dir: "opentelemetry-collector/_build"
Expand All @@ -36,38 +32,10 @@ builds:
ignore:
- goos: windows
goarch: arm
- id: "opentelemetry-collector-loadbalancer"
dir: "opentelemetry-collector-loadbalancer/_build"
binary: "opentelemetry-collector-loadbalancer"
env:
- CGO_ENABLED=0
goos:
- darwin
- linux
- windows
goarch:
- 386
- amd64
- arm
- arm64
- s390x
goarm:
- 6
- 7
flags:
- -trimpath
ldflags:
- -s -w
ignore:
- goos: windows
goarch: arm
docker_manifests:
- name_template: quay.io/jpkroehling/opentelemetry-collector:{{ .Tag }}
image_templates:
- quay.io/jpkroehling/opentelemetry-collector:{{ .Tag }}-amd64
- name_template: quay.io/jpkroehling/opentelemetry-collector-loadbalancer:{{ .Tag }}
image_templates:
- quay.io/jpkroehling/opentelemetry-collector-loadbalancer:{{ .Tag }}-amd64
dockers:
- image_templates:
- "quay.io/jpkroehling/opentelemetry-collector:{{ .Tag }}-amd64"
Expand All @@ -84,45 +52,7 @@ dockers:
extra_files:
- "configs/opentelemetry-collector.yaml"
goarch: amd64
- image_templates:
- "quay.io/jpkroehling/opentelemetry-collector-loadbalancer:{{ .Tag }}-amd64"
dockerfile: "opentelemetry-collector-loadbalancer/Dockerfile"
use: buildx
build_flag_templates:
- "--pull"
- "--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}}"
- "--platform=linux/amd64"
extra_files:
- "configs/opentelemetry-collector-loadbalancer.yaml"
goarch: amd64
nfpms:
- id: "opentelemetry-collector-loadbalancer"
package_name: "opentelemetry-collector-loadbalancer"
license: Apache 2.0
description: "OpenTelemetry Collector - opentelemetry-collector-loadbalancer"
formats:
- apk
- deb
- rpm
scripts:
preinstall: "opentelemetry-collector-loadbalancer/preinstall.sh"
postinstall: "opentelemetry-collector-loadbalancer/postinstall.sh"
preremove: "opentelemetry-collector-loadbalancer/preremove.sh"
builds:
- "opentelemetry-collector-loadbalancer"
contents:
- src: "opentelemetry-collector-loadbalancer/opentelemetry-collector-loadbalancer.service"
dst: "/lib/systemd/system/opentelemetry-collector-loadbalancer.service"
- src: "opentelemetry-collector-loadbalancer/opentelemetry-collector-loadbalancer.conf"
dst: "/etc/opentelemetry-collector-loadbalancer/opentelemetry-collector-loadbalancer.conf"
type: "config|noreplace"
- src: "configs/opentelemetry-collector-loadbalancer.yaml"
dst: "/etc/opentelemetry-collector-loadbalancer/config.yaml"
type: config
- id: "opentelemetry-collector"
package_name: "opentelemetry-collector"
license: Apache 2.0
Expand Down
19 changes: 13 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,28 @@ This repository contains a set of resources that ultimately results in OpenTelem

### Distribution directory

Each distribution has its own directory at the root of this repository, such as `opentelemetry-collector` or `opentelemetry-collector-loadbalancer`. Within each one of those, you'll find at least two files:
Each distribution has its own directory at the root of this repository, such as `opentelemetry-collector`. Within each one of those, you'll find at least two files:

- `Dockerfile`, determining how to build the container image for this distribution
- `manifest.yaml`, which is used with the [opentelemetry-collector-builder](https://github.com/open-telemetry/opentelemetry-collector-builder) to generate the sources for the distribution.

Within each distribution, you are expected to be able to build it using the builder, like:

$ opentelemetry-collector-builder --config manifest.yaml
```shell
opentelemetry-collector-builder --config manifest.yaml
```

You can build all distributions by running:

$ make build
```shell
make build
```

If you only interested in generating the sources for the distributions, use:

$ make generate
```shell
make generate
```

### Distribution configurations

Expand All @@ -37,5 +43,6 @@ The main `Makefile` is mostly a wrapper around scripts under the [./scripts](./s

Once there's a change either to the templates or to the list of distributions, a new `.goreleaser` file can be generated with:

$ make generate-goreleaser

```shell
make generate-goreleaser
```
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ YQ_VERSION ?= 4.11.1
YQ_DIR ?= ${OTELCOL_BUILDER_DIR}
YQ ?= ${YQ_DIR}/yq

DISTRIBUTIONS ?= "opentelemetry-collector,opentelemetry-collector-loadbalancer"
DISTRIBUTIONS ?= "opentelemetry-collector"

ci: check build
check: ensure-goreleaser-up-to-date
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ More details about each individual distribution can be seen in its own readme fi
Current list of distributions:

- [OpenTelemetry Collector (also known as "core")](./opentelemetry-collector)
- [Load balancer](./opentelemetry-collector-loadbalancer)
35 changes: 0 additions & 35 deletions configs/opentelemetry-collector-loadbalancer.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions opentelemetry-collector-loadbalancer/Dockerfile

This file was deleted.

20 changes: 0 additions & 20 deletions opentelemetry-collector-loadbalancer/manifest.yaml

This file was deleted.

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions opentelemetry-collector-loadbalancer/postinstall.sh

This file was deleted.

17 changes: 0 additions & 17 deletions opentelemetry-collector-loadbalancer/preinstall.sh

This file was deleted.

20 changes: 0 additions & 20 deletions opentelemetry-collector-loadbalancer/preremove.sh

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ done

if [ -z $distributions ]; then
echo "List of distributions to build not provided. Use '-d' to specify the names of the distributions to build. Ex.:"
echo "$0 -d opentelemetry-collector,opentelemetry-collector-loadbalancer"
echo "$0 -d opentelemetry-collector"
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-goreleaser-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ done

if [ -z $distributions ]; then
echo "List of distributions to use with goreleaser not provided. Use '-d' to specify the names of the distributions. Ex.:"
echo "$0 -d opentelemetry-collector,opentelemetry-collector-loadbalancer"
echo "$0 -d opentelemetry-collector"
exit 1
fi

Expand Down

0 comments on commit 54b03e2

Please sign in to comment.