Skip to content

Commit

Permalink
add puppet agent exporter deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
iminfinity committed Nov 13, 2024
1 parent 8142b39 commit 48a75a7
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "puppetserver.fullname" . }}-puppet-agent-exporter
spec:
selector:
matchLabels:
app.kubernetes.io/component: puppet-agent-exporter
app.kubernetes.io/name: puppetserver
template:
metadata:
labels:
app.kubernetes.io/component: puppet-agent-exporter
app.kubernetes.io/name: puppetserver
spec:
containers:
- name: puppet-agent-exporter
image: "{{ tpl .Values.puppetAgentExporter.image . }}:{{ tpl .Values.puppetAgentExporter.tag . }}"
imagePullPolicy: {{ tpl .Values.puppetAgentExporter.imagePullPolicy . }}
resources:
{{- toYaml .Values.puppetAgentExporter.resources | nindent 12 }}
env:
{{- range $key, $value := .Values.puppetAgentExporter.extraEnv }}
- name: {{ $key }}
value: "{{ $value }}"
{{- end }}
volumeMounts:
- name: puppet-code-storage
mountPath: /etc/puppetlabs/code/
readinessProbe:
httpGet:
path: /metrics
port: 8080
scheme: HTTP
ports:
- containerPort: 8080
name: http-metrics
protocol: TCP
volumes:
- name: puppet-code-storage
persistentVolumeClaim:
claimName: {{ .Release.Namespace }}-code-claim
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: puppet-agent-exporter
namespace: {{ .Release.Namespace | quote }}
labels:
app.kubernetes.io/component: puppet-agent-exporter
app.kubernetes.io/name: puppetserver
spec:
ports:
- name: http-metrics
port: 8080
targetPort: 8080
selector:
app.kubernetes.io/component: puppet-agent-exporter
app.kubernetes.io/name: puppetserver
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: puppet-agent-exporter
spec:
endpoints:
- interval: 30s
path: /metrics
port: http-metrics
namespaceSelector:
matchNames:
- {{ .Release.Namespace | quote }}
selector:
matchLabels:
app.kubernetes.io/component: puppet-agent-exporter
app.kubernetes.io/name: puppetserver
13 changes: 13 additions & 0 deletions argocd-helm-charts/puppetserver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,16 @@ postgresql:
requests:
memory: 256Mi
cpu: 100m

puppetAgentExporter:
image: harbor.obmondo.com/obmondo/dockerfiles/puppet-agent-exporter
tag: v0.0.1
imagePullPolicy: IfNotPresent
extraEnv:
METRICS_PATH: /etc/puppetlabs/code/prometheus-dropzone
resources:
limits:
memory: 50Mi
requests:
memory: 50Mi
cpu: 20m

0 comments on commit 48a75a7

Please sign in to comment.