Skip to content

Commit

Permalink
Temporarily disable metrics endpoint (#190)
Browse files Browse the repository at this point in the history
* Temporarily disable metrics endpoint

* Regenerate bundle config

* Comment out additional kube-rbac-proxy config

* Regenerate bundle manifests
  • Loading branch information
ebaron authored Apr 12, 2021
1 parent 71b1747 commit 563158e
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 119 deletions.
2 changes: 1 addition & 1 deletion bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=container-jfr-operator
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.4.0+git
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1

# Labels for testing.
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions bundle/manifests/container-jfr-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,19 +267,6 @@ spec:
spec:
containers:
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=10
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
resources: {}
- args:
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
command:
- /manager
Expand Down
4 changes: 1 addition & 3 deletions bundle/manifests/rhjmc.redhat.com_containerjfrs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spec:
description: ContainerJFRSpec defines the desired state of ContainerJFR
properties:
minimal:
description: Deploy a pared-down ContainerJFR instance with no Grafana dashboard or jfr-datasource and no web-client UI.
type: boolean
networkOptions:
description: Options to control how the operator exposes the application over a network
Expand Down Expand Up @@ -489,9 +490,6 @@ spec:
type: object
type: object
type: object
minimal:
description: Deploy a pared-down ContainerJFR instance with no Grafana dashboard or jfr-datasource and no web-client UI.
type: boolean
storageOptions:
description: Options to customize the storage for Flight Recordings and Templates
properties:
Expand Down
5 changes: 4 additions & 1 deletion config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ patchesStrategicMerge:
# Protect the /metrics endpoint by putting it behind auth.
# If you want your controller-manager to expose the /metrics
# endpoint w/o any authn/z, please comment the following line.
- manager_auth_proxy_patch.yaml
#
# FIXME uncomment when this issue is resolved:
# https://github.com/operator-framework/operator-sdk/issues/4684
#- manager_auth_proxy_patch.yaml

# Mount the controller config file for loading manager configurations
# through a ComponentConfig type
Expand Down
11 changes: 7 additions & 4 deletions config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ resources:
# Comment the following 4 lines if you want to disable
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
# which protects your /metrics endpoint.
- auth_proxy_service.yaml
- auth_proxy_role.yaml
- auth_proxy_role_binding.yaml
- auth_proxy_client_clusterrole.yaml
#
# FIXME uncomment when this issue is resolved:
# https://github.com/operator-framework/operator-sdk/issues/4684
#- auth_proxy_service.yaml
#- auth_proxy_role.yaml
#- auth_proxy_role_binding.yaml
#- auth_proxy_client_clusterrole.yaml
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ func main() {

ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts)))

// FIXME Disable metrics until this issue is resolved:
// https://github.com/operator-framework/operator-sdk/issues/4684
metricsAddr = "0"
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
MetricsBindAddress: metricsAddr,
Expand Down

0 comments on commit 563158e

Please sign in to comment.