-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding the needed configs for LVM Operator Metrics
Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
- Loading branch information
Showing
6 changed files
with
66 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Build the manager binary | ||
FROM golang:1.16 as builder | ||
|
||
WORKDIR /workspace | ||
# Copy the Go Modules manifests | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
# cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
RUN go mod download | ||
|
||
# Copy the go source | ||
COPY api/ api/ | ||
COPY controllers/ controllers/ | ||
COPY cmd/ cmd/ | ||
COPY pkg/ pkg/ | ||
|
||
# Build | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o metricsexporter cmd/metricsexporter/metrics_exporter.go | ||
|
||
# vgmanager needs 'nsenter' and other basic linux utils to correctly function | ||
# FROM centos:8 | ||
FROM alpine:edge | ||
# get ca-cert package | ||
RUN apk add --no-cache ca-certificates | ||
WORKDIR / | ||
COPY --from=builder /workspace/metricsexporter . | ||
EXPOSE 23532 | ||
|
||
# '/metricsexporter' is lvm-operator's metric exporter entrypoint | ||
ENTRYPOINT ["/metricsexporter"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: lvm-node-metrics | ||
namespace: system | ||
labels: | ||
app.kubernetes.io/compose: metrics | ||
spec: | ||
selector: | ||
exporter: lvm-operator | ||
ports: | ||
- name: lvm-metrics | ||
protocol: TCP | ||
port: 23532 | ||
targetPort: 23532 |