Skip to content

Commit

Permalink
Merge pull request #104 from sustainable-computing-io/service-monitor…
Browse files Browse the repository at this point in the history
…-handle

monitor port update
  • Loading branch information
mamy-CS authored May 21, 2024
2 parents a27a670 + bc8c720 commit ad6ac4e
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ metadata:
name: susql-operator-susql-controller-manager-metrics-monitor
spec:
endpoints:
- port: metrics
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
path: /metrics
port: https
scheme: https
tlsConfig:
insecureSkipVerify: true
selector:
matchLabels:
control-plane: susql-controller-manager
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ metadata:
name: susql-operator-susql-controller-manager-metrics-service
spec:
ports:
- name: metrics
port: 8082
- name: https
port: 8443
protocol: TCP
targetPort: metrics
targetPort: https
selector:
control-plane: susql-controller-manager
status:
Expand Down
31 changes: 9 additions & 22 deletions bundle/manifests/susql-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ metadata:
capabilities: Basic Install
categories: Monitoring
containerImage: quay.io/sustainable_computing_io/susql_operator:0.0.15
createdAt: "2024-05-21T16:53:43Z"
createdAt: "2024-05-21T17:03:15Z"
description: 'Aggregates energy data from pods tagged with SusQL labels '
operators.operatorframework.io/builder: operator-sdk-v1.34.1
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
Expand Down Expand Up @@ -170,22 +170,6 @@ spec:
labels:
control-plane: susql-controller-manager
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- amd64
- arm64
- ppc64le
- s390x
- key: kubernetes.io/os
operator: In
values:
- linux
containers:
- args:
- --secure-listen-address=0.0.0.0:8443
Expand Down Expand Up @@ -218,7 +202,7 @@ spec:
- --susql-prometheus-metrics-url=$(SUSQL-PROMETHEUS-METRICS-URL)
- --sampling-rate=$(SAMPLING-RATE)
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8082
- --metrics-bind-address=127.0.0.1:9999
command:
- /manager
env:
Expand All @@ -238,19 +222,22 @@ spec:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 20
initialDelaySeconds: 15
periodSeconds: 20
name: manager
ports:
- containerPort: 8082
name: metrics
name: metric
protocol: TCP
- containerPort: 9999
name: autometric
protocol: TCP
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 20
periodSeconds: 20
initialDelaySeconds: 5
periodSeconds: 10
resources:
limits:
cpu: 500m
Expand Down
16 changes: 0 additions & 16 deletions config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,6 @@ metadata:
spec:
template:
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- amd64
- arm64
- ppc64le
- s390x
- key: kubernetes.io/os
operator: In
values:
- linux
containers:
- name: kube-rbac-proxy
securityContext:
Expand Down
19 changes: 11 additions & 8 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ spec:
- --susql-prometheus-metrics-url=$(SUSQL-PROMETHEUS-METRICS-URL)
- --sampling-rate=$(SAMPLING-RATE)
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8082
- --metrics-bind-address=127.0.0.1:9999
image: '<OPERATOR_IMG>'
imagePullPolicy: IfNotPresent
name: manager
Expand All @@ -101,26 +101,29 @@ spec:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 20
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 20
periodSeconds: 20
initialDelaySeconds: 5
periodSeconds: 10
# TODO(user): Configure the resources accordingly based on the project requirements.
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
ports:
- containerPort: 8082
protocol: TCP
name: metric
- containerPort: 9999
protocol: TCP
name: autometric
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 10m
memory: 64Mi
ports:
- containerPort: 8082
protocol: TCP
name: metrics
serviceAccountName: susql-controller-manager
terminationGracePeriodSeconds: 10
7 changes: 6 additions & 1 deletion config/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ metadata:
namespace: system
spec:
endpoints:
- port: metrics
- path: /metrics
port: https
scheme: https
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
tlsConfig:
insecureSkipVerify: true
selector:
matchLabels:
control-plane: susql-controller-manager
6 changes: 3 additions & 3 deletions config/rbac/auth_proxy_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ metadata:
namespace: system
spec:
ports:
- name: metrics
port: 8082
- name: https
port: 8443
protocol: TCP
targetPort: metrics
targetPort: https
selector:
control-plane: susql-controller-manager

0 comments on commit ad6ac4e

Please sign in to comment.