Skip to content

Commit

Permalink
Use pod monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinBisson committed Mar 30, 2024
1 parent a3594d5 commit c3245d9
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion helm/etcd-backup-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ home: "https://github.com/giantswarm/etcd-backup-operator"
version: "[[ .Version ]]"
appVersion: "[[ .AppVersion ]]"
annotations:
application.giantswarm.io/team: team-turtles
application.giantswarm.io/team: turtles
config.giantswarm.io/version: 1.x.x
1 change: 1 addition & 0 deletions helm/etcd-backup-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ app: {{ include "name" . | quote }}
{{ include "labels.selector" . }}
application.giantswarm.io/branch: {{ .Values.project.branch | quote }}
application.giantswarm.io/commit: {{ .Values.project.commit | quote }}
application.giantswarm.io/team: {{ index .Chart.Annotations "application.giantswarm.io/team" | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
helm.sh/chart: {{ include "chart" . | quote }}
Expand Down
2 changes: 1 addition & 1 deletion helm/etcd-backup-operator/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ data:
debug:
server: true
listen:
address: "http://0.0.0.0:{{ .Values.service.port }}"
address: "http://0.0.0.0:{{ .Values.port }}"
service:
kubernetes:
address: ''
Expand Down
6 changes: 5 additions & 1 deletion helm/etcd-backup-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ spec:
- daemon
- --config.dirs=/var/run/{{ include "name" . }}/configmap/
- --config.files=config
ports:
- name: metrics
containerPort: {{ .Values.port }}
protocol: TCP
volumeMounts:
- mountPath: /var/lib/etcd
name: etcd-datadir
Expand All @@ -99,7 +103,7 @@ spec:
livenessProbe:
httpGet:
path: /healthz
port: {{ .Values.service.port }}
port: {{ .Values.port }}
initialDelaySeconds: 30
timeoutSeconds: 1
securityContext:
Expand Down
2 changes: 1 addition & 1 deletion helm/etcd-backup-operator/templates/network-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
{{- include "labels.selector" . | nindent 6 }}
ingress:
- ports:
- port: {{ .Values.service.port }}
- port: {{ .Values.port }}
protocol: TCP
egress:
- {}
Expand Down
16 changes: 16 additions & 0 deletions helm/etcd-backup-operator/templates/podmonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
labels:
{{- include "labels.common" . | nindent 4 }}
name: {{ include "resource.default.name" . }}
namespace: {{ include "resource.default.namespace" . }}
spec:
namespaceSelector:
matchNames:
- {{ include "resource.default.namespace" . }}
podMetricsEndpoints:
- port: metrics
selector:
matchLabels:
{{- include "labels.selector" . | nindent 6}}
16 changes: 0 additions & 16 deletions helm/etcd-backup-operator/templates/service.yaml

This file was deleted.

11 changes: 3 additions & 8 deletions helm/etcd-backup-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@
}
}
},
"port": {
"type": "integer"
},
"priorityClassName": {
"type": "string"
},
Expand Down Expand Up @@ -179,14 +182,6 @@
}
}
},
"service": {
"type": "object",
"properties": {
"port": {
"type": "integer"
}
}
},
"skipManagementClusterBackup": {
"type": "boolean"
},
Expand Down
4 changes: 2 additions & 2 deletions helm/etcd-backup-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ pod:
id: 1000
group:
id: 1000
service:
port: 8050
project:
branch: "[[ .Branch ]]"
commit: "[[ .SHA ]]"

port: 8050

registry:
domain: gsoci.azurecr.io

Expand Down

0 comments on commit c3245d9

Please sign in to comment.