Skip to content

Commit

Permalink
add metrics service
Browse files Browse the repository at this point in the history
  • Loading branch information
k15r committed May 10, 2024
1 parent 27517b5 commit 7589afe
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 36 deletions.
3 changes: 2 additions & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
resources:
- manager.yaml
- priority-class.yaml
- service.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: op-skr-registry.localhost:8888/unsigned/manager-images/nats-manager
newTag: 0.1.1
newTag: 1.0.2
10 changes: 8 additions & 2 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@ metadata:
spec:
selector:
matchLabels:
control-plane: manager
control-plane: nats-manager
app.kubernetes.io/name: nats-manager
app.kubernetes.io/instance: nats-manager
app.kubernetes.io/component: nats-manager
replicas: 1
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
control-plane: manager
control-plane: nats-manager
app.kubernetes.io/name: nats-manager
app.kubernetes.io/instance: nats-manager
app.kubernetes.io/component: nats-manager
spec:
# TODO(user): Uncomment the following code to configure the nodeAffinity expression
# according to the platforms which are supported by your solution.
Expand Down
25 changes: 25 additions & 0 deletions config/manager/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: v1
kind: Service
metadata:
name: manager-metrics
labels:
control-plane: nats-manager
app.kubernetes.io/name: nats-manager
app.kubernetes.io/instance: nats-manager
app.kubernetes.io/component: nats-manager
annotations:
prometheus.io/scrape: "true"
prometheus.io/scheme: http
prometheus.io/port: "8080"
spec:
type: ClusterIP
selector:
control-plane: nats-manager
app.kubernetes.io/name: nats-manager
app.kubernetes.io/instance: nats-manager
app.kubernetes.io/component: nats-manager
ports:
- name: http-metrics
protocol: TCP
port: 80
targetPort: 8080
1 change: 0 additions & 1 deletion config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
Expand Down
Loading

0 comments on commit 7589afe

Please sign in to comment.