Skip to content

Commit

Permalink
Merge pull request #425 from suleymanakbas91/remove-metrics-exporter
Browse files Browse the repository at this point in the history
OCPVE-352: Remove unused metrics-exporter
  • Loading branch information
suleymanakbas91 committed Sep 18, 2023
2 parents 3b83b72 + d6b0894 commit 8dd5aa6
Show file tree
Hide file tree
Showing 16 changed files with 7 additions and 546 deletions.
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ COPY pkg/ pkg/
# Build
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build --ldflags "-s -w" -a -o manager main.go
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build --ldflags "-s -w" -a -o vgmanager cmd/vgmanager/main.go
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build --ldflags "-s -w" -a -o metricsexporter cmd/metricsexporter/main.go

# vgmanager needs 'nsenter' and other basic linux utils to correctly function
FROM --platform=$TARGETPLATFORM registry.access.redhat.com/ubi9/ubi-minimal:9.2
Expand All @@ -37,8 +36,6 @@ RUN microdnf update -y && \
WORKDIR /
COPY --from=builder /workspace/manager .
COPY --from=builder /workspace/vgmanager .
COPY --from=builder /workspace/metricsexporter .
EXPOSE 23532
USER 65532:65532

# '/manager' is lvm-operator entrypoint
Expand Down
18 changes: 0 additions & 18 deletions bundle/manifests/lvms-node-metrics_v1_service.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ spec:
insecureSkipVerify: true
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
path: /metrics
port: lvms-metrics
scheme: http
port: https
scheme: https
tlsConfig:
insecureSkipVerify: true
selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Service
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/compose: metrics
app.kubernetes.io/name: lvms-operator
name: lvms-operator-metrics-service
spec:
Expand Down
9 changes: 0 additions & 9 deletions bundle/manifests/lvms-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,6 @@ spec:
app.kubernetes.io/component: lvms-operator
app.kubernetes.io/name: lvms-operator
app.kubernetes.io/part-of: lvms-provisioner
exporter: lvms-operator
spec:
containers:
- args:
Expand Down Expand Up @@ -659,14 +658,6 @@ spec:
requests:
cpu: 1m
memory: 20Mi
- command:
- /metricsexporter
image: quay.io/lvms_dev/lvms-operator:latest
name: metricsexporter
resources:
requests:
cpu: 1m
memory: 20Mi
securityContext:
runAsNonRoot: true
serviceAccountName: lvms-operator
Expand Down
97 changes: 0 additions & 97 deletions cmd/metricsexporter/main.go

This file was deleted.

9 changes: 0 additions & 9 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ spec:
app.kubernetes.io/name: lvms-operator
app.kubernetes.io/part-of: lvms-provisioner
app.kubernetes.io/component: lvms-operator
exporter: lvms-operator
spec:
securityContext:
runAsNonRoot: true
Expand Down Expand Up @@ -74,13 +73,5 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
- command:
- /metricsexporter
image: controller:latest
name: metricsexporter
resources:
requests:
cpu: 1m
memory: 20Mi
serviceAccountName: lvms-operator
terminationGracePeriodSeconds: 10
4 changes: 2 additions & 2 deletions config/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ spec:
tlsConfig:
insecureSkipVerify: true
- path: /metrics
port: lvms-metrics
scheme: http
port: https
scheme: https
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
tlsConfig:
insecureSkipVerify: true
Expand Down
1 change: 1 addition & 0 deletions config/rbac/auth_proxy_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Service
metadata:
labels:
app.kubernetes.io/name: lvms-operator
app.kubernetes.io/compose: metrics
name: lvms-operator-metrics-service
namespace: system
spec:
Expand Down
1 change: 0 additions & 1 deletion config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ resources:
- topolvm_controller_role.yaml
- topolvm_controller_role_bindings.yaml
# lvm-node metric rbac
- lvms_metric_service_config.yaml
- lvms_node_role_n_rolebindings.yaml
# topolvm-node metric rbac
- topolvm_metric_service_config.yaml
Expand Down
16 changes: 0 additions & 16 deletions config/rbac/lvms_metric_service_config.yaml

This file was deleted.

1 change: 0 additions & 1 deletion docs/design/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ The following table provides a view of the containers in these components:
|----------------------|------------|-----------------------------------------------------------------------------------------------------|
| LVM Operator | Deployment | [manager](lvm-operator-manager.md) |
| | | [kube-rbac-proxy](https://github.com/brancz/kube-rbac-proxy#kube-rbac-proxy) |
| | | [metricsexporter](../../README.md#metrics) |
| Volume Group Manager | DaemonSet | [vg-manager](vg-manager.md) |
| TopoLVM Controller | Deployment | [topolvm-controller](https://github.com/topolvm/topolvm/blob/main/docs/topolvm-controller.md) |
| | | [csi-provisioner](https://github.com/kubernetes-csi/external-provisioner/blob/master/doc/design.md) |
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ require (
github.com/openshift/library-go v0.0.0-20230908101047-d058c695f677
github.com/operator-framework/api v0.17.7
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.16.0
github.com/stretchr/testify v1.8.4
github.com/topolvm/topolvm v0.20.0
go.uber.org/zap v1.25.0
Expand Down Expand Up @@ -69,6 +68,7 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.16.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
Expand Down
10 changes: 0 additions & 10 deletions test/performance/operf.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,16 +422,6 @@ func (unit *LvmUnitMetrics) parseMetrics(metricsResult string) map[string]Metric
[1654680112, "0.005354719799999981"]
]
},
{
"metric": {
"container": "metricsexporter"
},
"values": [
[1654680100, "9.652999999998358e-07"],
[1654680106, "0"],
[1654680112, "0"]
]
}
]
}
}
Expand Down
Loading

0 comments on commit 8dd5aa6

Please sign in to comment.