Skip to content

Commit f752a48

Browse files
authored
Merge pull request #7 from ansh-devs/master
added support for arm based systems
2 parents 81a4514 + 87b97f8 commit f752a48

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/publish-to-ghcr.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
steps:
1212
- name: Checkout repository
1313
uses: actions/checkout@v4
14+
- name: Set up Docker Buildx
15+
uses: docker/setup-buildx-action@v3
1416
- name: Log in to the Container registry
1517
uses: docker/login-action@v3
1618
with:
@@ -30,6 +32,7 @@ jobs:
3032
with:
3133
context: .
3234
file: Dockerfile
35+
platforms: linux/amd64,linux/arm64
3336
push: true
3437
tags: ${{ steps.meta.outputs.tags }}
3538
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ WORKDIR /app
66
# build arguments for version information
77
ARG VERSION=dev
88
ARG COMMIT_SHA=unknown
9-
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-X 'main.version=$VERSION' -X 'main.commit=$COMMIT_SHA'" -o polylang-detector ./cmd/main.go
9+
ARG TARGETARCH=amd64
10+
RUN GOOS=linux GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -ldflags="-X 'main.version=$VERSION' -X 'main.commit=$COMMIT_SHA'" -o polylang-detector ./cmd/main.go
1011

1112
FROM alpine:latest
1213
COPY --from=buildstage /app/polylang-detector ./polylang-detector

workload/workload_analyzer.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ func ScanPods(ctx context.Context, clientset *kubernetes.Clientset, pd *detector
5454

5555
containerInfos, err := pd.DetectLanguageWithRuntimeInfo(pod.Namespace, pod.Name)
5656
if err != nil {
57-
log.Fatalf("Error detecting language: %v", err)
57+
log.Errorf("Error detecting language for pod %s/%s: %v", pod.Namespace, pod.Name, err)
58+
continue
5859
}
5960
for _, info := range containerInfos {
6061
pd.Logger.Sugar().Infow("workload analyzer",

0 commit comments

Comments
 (0)