diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 00b93a5a..32b8054c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -71,7 +71,6 @@ jobs: run: | go build -v ./cmd/oteldb go build -v ./cmd/otelproxy - go build -v ./cmd/otelfaker go build -v ./cmd/chotel - name: Base image @@ -94,16 +93,6 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max - - name: Faker image - uses: docker/build-push-action@v5 - with: - context: . - file: deploy.faker.Dockerfile - push: true - tags: "${{ env.IMAGE_TAG }}/faker:${{ env.sha }}" - cache-from: type=gha - cache-to: type=gha,mode=max - - name: ClickHouse OTEL Exporter Image uses: docker/build-push-action@v5 with: diff --git a/.k8s/deployment.yml b/.k8s/deployment.yml index 94e0b74d..ba1a89cb 100644 --- a/.k8s/deployment.yml +++ b/.k8s/deployment.yml @@ -155,63 +155,6 @@ spec: --- apiVersion: apps/v1 kind: Deployment -metadata: - namespace: faster - name: otelfaker - labels: - app: otelfaker -spec: - replicas: 0 - selector: - matchLabels: - app: otelfaker - template: - metadata: - labels: - app: otelfaker - service.opentelemetry.io/name: go-faster.otelfaker - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "8090" - spec: - containers: - - name: oteldb - image: ghcr.io/go-faster/oteldb/faker:main - ports: - - containerPort: 8090 - protocol: TCP - name: metrics - resources: - requests: - cpu: 500m - memory: 128M - limits: - cpu: 1500m - memory: 256M - env: - - name: GOMEMLIMIT - value: "256MiB" - - name: GOMAXPROCS - value: "2" - - name: OTEL_METRICS_EXPORTER - value: "otlp" - - name: OTEL_EXPORTER_PROMETHEUS_PORT - value: "8090" - - name: OTEL_EXPORTER_PROMETHEUS_HOST - value: "0.0.0.0" - - name: OTEL_RESOURCE_ATTRIBUTES - value: "service.name=go-faster.otelfaker" - - name: OTEL_LOG_LEVEL - value: "DEBUG" - - name: OTEL_EXPORTER_OTLP_PROTOCOL - value: "grpc" - - name: OTEL_TRACES_EXPORTER - value: "otlp" - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: "http://otel-collector.monitoring.svc.cluster.local:4317" ---- -apiVersion: apps/v1 -kind: Deployment metadata: namespace: faster name: chotel diff --git a/cmd/otelfaker/client.go b/cmd/oteldemo/client.go similarity index 100% rename from cmd/otelfaker/client.go rename to cmd/oteldemo/client.go diff --git a/cmd/otelfaker/main.go b/cmd/oteldemo/main.go similarity index 100% rename from cmd/otelfaker/main.go rename to cmd/oteldemo/main.go diff --git a/cmd/otelfaker/server.go b/cmd/oteldemo/server.go similarity index 100% rename from cmd/otelfaker/server.go rename to cmd/oteldemo/server.go diff --git a/deploy.faker.Dockerfile b/deploy.faker.Dockerfile deleted file mode 100644 index 1cdb2c2c..00000000 --- a/deploy.faker.Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM gcr.io/distroless/static - -ADD otelfaker /usr/local/bin/otelfaker - -ENTRYPOINT ["otelfaker"] diff --git a/deploy.oteldemo.Dockerfile b/deploy.oteldemo.Dockerfile new file mode 100644 index 00000000..d5e3e19c --- /dev/null +++ b/deploy.oteldemo.Dockerfile @@ -0,0 +1,5 @@ +FROM gcr.io/distroless/static + +ADD oteldemo /usr/local/bin/oteldemo + +ENTRYPOINT ["oteldemo"] diff --git a/dev/local/ch-demo/docker-compose.yml b/dev/local/ch-demo/docker-compose.yml index 5c429c8e..6f985610 100644 --- a/dev/local/ch-demo/docker-compose.yml +++ b/dev/local/ch-demo/docker-compose.yml @@ -37,7 +37,7 @@ services: restart: always build: context: ../../../ - dockerfile: otelfaker.Dockerfile + dockerfile: oteldemo.Dockerfile command: ["client"] environment: - OTEL_LOG_LEVEL=debug @@ -53,7 +53,7 @@ services: command: ["server"] build: context: ../../../ - dockerfile: otelfaker.Dockerfile + dockerfile: oteldemo.Dockerfile environment: - OTEL_LOG_LEVEL=debug - OTEL_METRICS_EXPORTER=otlp diff --git a/demo.Dockerfile b/oteldemo.Dockerfile similarity index 55% rename from demo.Dockerfile rename to oteldemo.Dockerfile index 2dc6d036..94a59857 100644 --- a/demo.Dockerfile +++ b/oteldemo.Dockerfile @@ -6,12 +6,12 @@ COPY go.mod go.sum ./ RUN go mod download COPY . ./ -RUN CGO_ENABLED=0 GOOS=linux go build -o /app/demo ./cmd/demo +RUN CGO_ENABLED=0 GOOS=linux go build -o /app/oteldemo ./cmd/oteldemo FROM alpine:latest RUN apk --no-cache add ca-certificates WORKDIR /app -COPY --from=builder /app/demo /demo +COPY --from=builder /app/oteldemo /oteldemo -ENTRYPOINT ["/demo"] +ENTRYPOINT ["/oteldemo"] diff --git a/otelfaker.Dockerfile b/otelfaker.Dockerfile deleted file mode 100644 index 7707687e..00000000 --- a/otelfaker.Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM golang:latest as builder - -WORKDIR /app - -COPY go.mod go.sum ./ -RUN go mod download - -COPY . ./ -RUN CGO_ENABLED=0 GOOS=linux go build -o /app/otelfaker ./cmd/otelfaker - -FROM alpine:latest -RUN apk --no-cache add ca-certificates - -WORKDIR /app -COPY --from=builder /app/otelfaker /otelfaker - -ENTRYPOINT ["/otelfaker"]