Skip to content
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

feat(torch): v1 resources added #2

Merged
merged 45 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
2fad7fc
feat(torch): v1 resources added
tty47 Oct 23, 2023
e346102
feat(torch): add EOF
tty47 Oct 23, 2023
76749de
feat(torch): readme updaed
tty47 Oct 24, 2023
5e0ce53
feat(torch): metrics updates
tty47 Oct 24, 2023
781771b
feat(torch): new field added
tty47 Oct 24, 2023
6ae691b
feat(torch): refactor - comment endpoint
tty47 Oct 25, 2023
8e61ef6
feat(torch): ref error msg
tty47 Oct 25, 2023
1b5054a
feat(torch): fix error
tty47 Oct 25, 2023
55d3657
feat(torch): comment code - rename var
tty47 Oct 25, 2023
6b13c18
feat(torch): comment code - rename var
tty47 Oct 25, 2023
917e3bb
feat(torch): comment code - rename var
tty47 Oct 25, 2023
5be37ba
feat(torch): fix typos
tty47 Oct 25, 2023
9226395
feat(torch): fix typos
tty47 Oct 25, 2023
252b8f1
feat(torch): docs updated
tty47 Oct 25, 2023
493e1c5
feat(torch): add func to generate the metrics if we already have them…
tty47 Oct 25, 2023
f5d298e
feat(torch): split some files and rename
tty47 Oct 25, 2023
c853f95
Update Dockerfile
tty47 Oct 26, 2023
e831624
feat(torch): update typos in Dockerfiles
tty47 Oct 26, 2023
01f62a2
feat(torch): update typos in Dockerfiles
tty47 Oct 26, 2023
9011bdb
feat(torch): add namespace field to the config
tty47 Oct 26, 2023
47f6d0c
feat(torch): add queue to process the nodes when torch detects a even…
tty47 Oct 26, 2023
5b5cdb3
feat(torch): node consumer, it will check if the node is in the db, o…
tty47 Oct 26, 2023
b88eaf8
feat(torch): flag parse
tty47 Oct 26, 2023
d5d0d80
feat(torch): add libraries
tty47 Oct 26, 2023
163b985
feat(torch): change context to context.WithTimeout
tty47 Oct 26, 2023
236626c
feat(torch): reorder imports
tty47 Oct 26, 2023
7153aeb
feat(torch): reorder imports
tty47 Oct 26, 2023
3e32287
feat(torch): reorder imports
tty47 Oct 26, 2023
59df79f
feat(torch): add sts events to the queue
tty47 Oct 26, 2023
5a05043
feat(torch): reorder imports - add defaults
tty47 Oct 26, 2023
b6ab3df
feat(torch): reorder imports - add defaults
tty47 Oct 26, 2023
bfd39da
feat(torch): dockerfiles fixed comments
tty47 Oct 26, 2023
072bd1c
feat(torch): add a comment
tty47 Oct 26, 2023
ed82092
feat(torch): update readme
tty47 Oct 26, 2023
1cadb74
feat(torch): update image arch
tty47 Oct 26, 2023
58ca283
feat(torch): remove commented func
tty47 Oct 27, 2023
34bd11c
feat(torch): fix context usage
tty47 Oct 27, 2023
5d90aa4
feat(torch): update comment
tty47 Oct 27, 2023
64b4f24
feat(torch): use errGroup to handle the errors
tty47 Oct 27, 2023
5e66f19
feat(torch): update function comment
tty47 Oct 27, 2023
0be1462
feat(torch): fix goroutines execution
tty47 Oct 28, 2023
8606336
feat(torch): returns sts
tty47 Oct 28, 2023
d87a637
feat(torch): add validations - fix issues
tty47 Oct 28, 2023
d4b7a25
feat(torch): fix goroutines issue
tty47 Oct 28, 2023
76b8f07
feat(torch): increase timeouts
tty47 Oct 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ torch
.DS_Store
.idea

*otel-agent-celestia.yaml
*otel-agent-*.yaml
32 changes: 29 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,38 @@
FROM golang:1.21.0-bullseye AS builder
# stage 1 Generate torch Binary
FROM --platform=$BUILDPLATFORM docker.io/golang:1.21.3-alpine3.18 as builder

ARG TARGETOS
ARG TARGETARCH
ENV CGO_ENABLED=0
ENV GO111MODULE=on

WORKDIR /

COPY go.mod go.sum ./
# Download dependencies
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /go/bin/torch ./cmd/main.go
RUN CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /go/bin/torch ./cmd/main.go

FROM alpine:latest
# stage 2
FROM docker.io/alpine:3.18.4
WORKDIR /
# Read here why UID 10001: https://github.com/hexops/dockerfile/blob/main/README.md#do-not-use-a-uid-below-10000
ARG UID=10001
ARG USER_NAME=torch

ENV USR_HOME=/home/${USER_NAME}

# hadolint ignore=DL3018
RUN adduser ${USER_NAME} \
-D \
-g ${USER_NAME} \
-h ${USR_HOME} \
-s /sbin/nologin \
-u ${UID}

COPY --from=builder /go/bin/torch .

EXPOSE 8080

ENTRYPOINT ["./torch"]
30 changes: 28 additions & 2 deletions Dockerfile_local
Original file line number Diff line number Diff line change
@@ -1,11 +1,37 @@
FROM golang:1.21.0-bullseye AS builder
# stage 1 Generate torch Binary
FROM --platform=$BUILDPLATFORM docker.io/golang:1.21.3-alpine3.18 as builder

ARG TARGETOS
ARG TARGETARCH
ENV CGO_ENABLED=0
ENV GO111MODULE=on

WORKDIR /

COPY go.mod go.sum ./
# Download dependencies
RUN go mod download
COPY torch /go/bin/torch

FROM alpine:latest
# stage 2
FROM docker.io/alpine:3.18.4
WORKDIR /
# Read here why UID 10001: https://github.com/hexops/dockerfile/blob/main/README.md#do-not-use-a-uid-below-10000
ARG UID=10001
ARG USER_NAME=torch

ENV USR_HOME=/home/${USER_NAME}

# hadolint ignore=DL3018
RUN adduser ${USER_NAME} \
-D \
-g ${USER_NAME} \
-h ${USR_HOME} \
-s /sbin/nologin \
-u ${UID}

COPY --from=builder /go/bin/torch .

EXPOSE 8080

ENTRYPOINT ["./torch"]
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PROJECT_NAME := $(shell basename `pwd`)
REPOSITORY_NAME := $(shell basename `pwd`)
REGISTRY_NAME=ghcr.io/jrmanes
REGISTRY_NAME=ghcr.io/celestiaorg
LOCAL_DEV=local

# Go
Expand Down Expand Up @@ -69,4 +69,4 @@ kubectl_deploy: docker_build_local_push kubectl_apply
.PHYONY: kubectl_deploy

kubectl_remote_kustomize_deploy: docker_build_local_push_gh kubectl_kustomize
.PHYONY: kubectl_remote_kustomize_deploys
.PHYONY: kubectl_remote_kustomize_deploy
Loading
Loading