Skip to content

Commit

Permalink
fix(inspector): Typescript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
isala404 committed Mar 30, 2022
1 parent db10b66 commit 41f1195
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 235 deletions.
3 changes: 1 addition & 2 deletions inspector/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o inspector main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
FROM alpine:latest
COPY --from=go-builder /workspace/inspector /usr/local/bin/inspector
USER 65532:65532

ENTRYPOINT ["/inspector"]
41 changes: 41 additions & 0 deletions inspector/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: inspector
namespace: lazy-koala
spec:
selector:
matchLabels:
app: inspector
replicas: 1
template:
metadata:
labels:
app: inspector
spec:
serviceAccountName: gazer
containers:
- name: inspector
# command: ["/bin/sh"]
# args: ["-c", "while true; do echo hello; sleep 10;done"]
imagePullPolicy: Always
image: ghcr.io/mrsupiri/lazy-koala/inspector:latest
ports:
- containerPort: 8090
name: http
env:
- name: PROMETHEUS_END_POINT
value: "http://prometheus.lazy-koala.svc.cluster.local"
---
apiVersion: v1
kind: Service
metadata:
name: inspector
namespace: lazy-koala
spec:
selector:
app: inspector
ports:
- protocol: TCP
port: 80
targetPort: 8090
2 changes: 1 addition & 1 deletion inspector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func main() {

kube_endpoint, _ := url.Parse("https://" + net.JoinHostPort(os.Getenv("KUBERNETES_SERVICE_HOST"), os.Getenv("KUBERNETES_SERVICE_PORT")))

prom_endpoint, _ := url.Parse(os.Getenv("PROMETHEUS_ENDPOINT"))
prom_endpoint, _ := url.Parse(os.Getenv("PROMETHEUS_END_POINT"))
r := mux.NewRouter()

r.PathPrefix("/k8s").HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand Down
Loading

0 comments on commit 41f1195

Please sign in to comment.