Skip to content

Commit

Permalink
feat: use alloy for new backend (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
theSuess authored May 2, 2024
1 parent 5721135 commit 8a559f3
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 3,447 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: "backend/go.mod"
go-version-file: "backend/alloy/go.mod"
cache: true
- uses: ko-build/[email protected]
with:
Expand All @@ -42,13 +42,15 @@ jobs:
- name: Prepare
run: |
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
mkdir backend/alloy/convert-web
cp backend/main.go backend/alloy/convert-web
- name: Build and push
working-directory: backend
working-directory: backend/alloy/convert-web
run: |
export KO_DOCKER_REPO=ghcr.io/grafana/alloy-configurator-backend
export KO_DOCKER_REPO=ghcr.io/grafana/agent-configurator-backend
ko build --sbom=none --bare --platform linux/arm64,linux/arm/v7,linux/amd64 -t ${{ github.ref_name }} \
--image-label org.opencontainers.image.title=alloy-configurator-backend \
--image-label org.opencontainers.image.description="Backend for the alloy-configurator" \
--image-label org.opencontainers.image.title=agent-configurator-backend \
--image-label org.opencontainers.image.description="Backend for the agent-configurator" \
--image-label org.opencontainers.image.url=${{ github.server_url }}/${{ github.repository }} \
--image-label org.opencontainers.image.revision=${{ github.sha }} \
--image-label org.opencontainers.image.version=${{ github.ref_name }} \
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "backend/alloy"]
path = backend/alloy
url = https://github.com/grafana/alloy
6 changes: 6 additions & 0 deletions backend/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
alloy/converter-web/main.go: main.go
mkdir -p alloy/converter-web
cp main.go alloy/converter-web

converter-web: alloy/converter-web/main.go
cd alloy && go build -o ../converter-web ./converter-web
1 change: 1 addition & 0 deletions backend/alloy
Submodule alloy added at a7f11d
642 changes: 0 additions & 642 deletions backend/go.mod

This file was deleted.

2,797 changes: 0 additions & 2,797 deletions backend/go.sum

This file was deleted.

6 changes: 3 additions & 3 deletions src/components/Converter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { useModelContext } from "../../state";
import { Controller, FormProvider, useForm } from "react-hook-form";
import { useMemo, useState } from "react";

type InputType = "prometheus" | "promtail" | "static" | "static integrations-next";
type InputType = "otelcol" | "promtail" | "static" | "prometheus";

interface Diagnostic {
Severity: number;
Expand Down Expand Up @@ -117,8 +117,8 @@ const Converter = ({ dismiss }: { dismiss: () => void }) => {
value: "static",
},
{
label: "Grafana Agent Static Integrations Next",
value: "static integrations-next",
label: "OpenTelemetry Collector",
value: "otelcol",
},
{
label: "Prometheus",
Expand Down

0 comments on commit 8a559f3

Please sign in to comment.