Skip to content

Commit 1d0ad83

Browse files
committed
Expose Metrics port
This PR exposes the Metrics port of the CAPA main controller.
1 parent 6799fef commit 1d0ad83

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

config/default/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ commonLabels:
77
resources:
88
- namespace.yaml
99
- credentials.yaml
10+
- metrics_service.yaml
1011

1112
bases:
1213
- ../rbac

config/default/metrics_service.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: metrics-service
5+
namespace: system
6+
spec:
7+
selector:
8+
cluster.x-k8s.io/provider: infrastructure-aws
9+
ports:
10+
- port: 8080
11+
targetPort: metrics
12+
protocol: TCP
13+
type: ClusterIP

config/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spec:
2121
- "--leader-elect"
2222
- "--feature-gates=EKS=${CAPA_EKS:=true},EKSEnableIAM=${CAPA_EKS_IAM:=false},EKSAllowAddRoles=${CAPA_EKS_ADD_ROLES:=false},EKSFargate=${EXP_EKS_FARGATE:=false},MachinePool=${EXP_MACHINE_POOL:=false},EventBridgeInstanceState=${EVENT_BRIDGE_INSTANCE_STATE:=false},AutoControllerIdentityCreator=${AUTO_CONTROLLER_IDENTITY_CREATOR:=true},BootstrapFormatIgnition=${EXP_BOOTSTRAP_FORMAT_IGNITION:=false},ExternalResourceGC=${EXP_EXTERNAL_RESOURCE_GC:=false}"
2323
- "--v=${CAPA_LOGLEVEL:=0}"
24-
- "--metrics-bind-addr=127.0.0.1:8080"
24+
- "--metrics-bind-addr=0.0.0.0:8080"
2525
image: controller:latest
2626
imagePullPolicy: Always
2727
name: manager

pkg/cloud/logs/logs.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ func (l *logrWrapper) Log(msgs ...interface{}) {
5757
case 1:
5858
l.log.Info(msgs[0].(string))
5959
default:
60-
// Even the previous implementation had this problem but because it wasn't a direct
61-
// logr.Logger thing, it didn't say this...
62-
//nolint: logrlint
6360
l.log.Info(msgs[0].(string), msgs[:1]...)
6461
}
6562
}

0 commit comments

Comments
 (0)