Skip to content

Commit 099dce6

Browse files
committed
Drop metrics container
We never used it, so no point in keeping it around for now
1 parent 09a180e commit 099dce6

File tree

8 files changed

+6
-89
lines changed

8 files changed

+6
-89
lines changed

cmd/main.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import (
3838
"sigs.k8s.io/controller-runtime/pkg/healthz"
3939
"sigs.k8s.io/controller-runtime/pkg/log/zap"
4040
"sigs.k8s.io/controller-runtime/pkg/manager"
41-
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
4241

4342
argov1beta1api "github.com/argoproj-labs/argocd-operator/api/v1beta1"
4443
gitopsv1alpha1 "github.com/hybrid-cloud-patterns/patterns-operator/api/v1alpha1"
@@ -63,10 +62,8 @@ func init() {
6362
}
6463

6564
func main() {
66-
var metricsAddr string
6765
var enableLeaderElection bool
6866
var probeAddr string
69-
flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
7067
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
7168
flag.BoolVar(&enableLeaderElection, "leader-elect", false,
7269
"Enable leader election for controller manager. "+
@@ -88,10 +85,7 @@ func main() {
8885
}
8986

9087
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
91-
Scheme: scheme,
92-
Metrics: metricsserver.Options{
93-
BindAddress: metricsAddr,
94-
},
88+
Scheme: scheme,
9589
HealthProbeBindAddress: probeAddr,
9690
LeaderElection: enableLeaderElection,
9791
LeaderElectionID: "f2850479.hybrid-cloud-patterns.io",

config/default/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ patchesStrategicMerge:
2828
# Protect the /metrics endpoint by putting it behind auth.
2929
# If you want your controller-manager to expose the /metrics
3030
# endpoint w/o any authn/z, please comment the following line.
31-
- manager_auth_proxy_patch.yaml
31+
# - manager_auth_proxy_patch.yaml
3232

3333
# Mount the controller config file for loading manager configurations
3434
# through a ComponentConfig type

config/default/manager_auth_proxy_patch.yaml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,7 @@ spec:
99
template:
1010
spec:
1111
containers:
12-
- name: kube-rbac-proxy
13-
image: quay.io/hybridcloudpatterns/kube-rbac-proxy:v0.8.0
14-
args:
15-
- "--secure-listen-address=0.0.0.0:8443"
16-
- "--upstream=http://127.0.0.1:8080/"
17-
- "--logtostderr=true"
18-
- "--v=10"
19-
ports:
20-
- containerPort: 8443
21-
protocol: TCP
22-
name: https
23-
securityContext:
24-
allowPrivilegeEscalation: false
25-
capabilities:
26-
drop:
27-
- ALL
28-
resources:
29-
limits:
30-
cpu: 500m
31-
memory: 128Mi
32-
requests:
33-
cpu: 5m
34-
memory: 64Mi
3512
- name: manager
3613
args:
3714
- "--health-probe-bind-address=:8081"
38-
- "--metrics-bind-address=127.0.0.1:8080"
3915
- "--leader-elect"

config/rbac/auth_proxy_client_clusterrole.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

config/rbac/auth_proxy_role.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

config/rbac/auth_proxy_role_binding.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

config/rbac/auth_proxy_service.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

config/rbac/kustomization.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ resources:
1212
# Comment the following 4 lines if you want to disable
1313
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
1414
# which protects your /metrics endpoint.
15-
- auth_proxy_service.yaml
16-
- auth_proxy_role.yaml
17-
- auth_proxy_role_binding.yaml
18-
- auth_proxy_client_clusterrole.yaml
15+
#- auth_proxy_service.yaml
16+
#- auth_proxy_role.yaml
17+
#- auth_proxy_role_binding.yaml
18+
#- auth_proxy_client_clusterrole.yaml

0 commit comments

Comments
 (0)