mirror of https://git.rancher.io/charts
80 lines
3.2 KiB
Diff
80 lines
3.2 KiB
Diff
--- charts-original/templates/daemonset.yaml
|
|
+++ charts/templates/daemonset.yaml
|
|
@@ -4,7 +4,7 @@
|
|
name: {{ include "prometheus-windows-exporter.fullname" . }}
|
|
namespace: {{ include "prometheus-windows-exporter.namespace" . }}
|
|
labels:
|
|
- {{- include "prometheus-windows-exporter.labels" . | nindent 4 }}
|
|
+ {{- include "windowsExporter.labels" . | nindent 4 }}
|
|
{{- with .Values.daemonsetAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
@@ -12,7 +12,7 @@
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
- {{- include "prometheus-windows-exporter.selectorLabels" . | nindent 6 }}
|
|
+ {{- include "windowsExporter.labels" . | nindent 6 }}
|
|
{{- with .Values.updateStrategy }}
|
|
updateStrategy:
|
|
{{- toYaml . | nindent 4 }}
|
|
@@ -24,7 +24,7 @@
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
- {{- include "prometheus-windows-exporter.labels" . | nindent 8 }}
|
|
+ {{- include "windowsExporter.labels" . | nindent 8 }}
|
|
spec:
|
|
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
|
{{- with .Values.securityContext }}
|
|
@@ -37,12 +37,16 @@
|
|
initContainers:
|
|
- name: configure-firewall
|
|
image: {{ include "prometheus-windows-exporter.image" . }}
|
|
- command: [ "powershell" ]
|
|
- args: [ "New-NetFirewallRule", "-DisplayName", "'windows-exporter'", "-Direction", "inbound", "-Profile", "Any", "-Action", "Allow", "-LocalPort", "{{ .Values.service.port }}", "-Protocol", "TCP" ]
|
|
+ command:
|
|
+ - C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
|
|
+ args: ["-f", "scripts/configure-firewall.ps1"]
|
|
+ volumeMounts:
|
|
+ - mountPath: /scripts
|
|
+ name: exporter-scripts
|
|
{{- with .Values.extraInitContainers }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
- serviceAccountName: {{ include "prometheus-windows-exporter.serviceAccountName" . }}
|
|
+ serviceAccountName: {{ include "prometheus-windows-exporter.fullname" . }}
|
|
containers:
|
|
- name: windows-exporter
|
|
image: {{ include "prometheus-windows-exporter.image" . }}
|
|
@@ -54,7 +58,7 @@
|
|
{{- with .Values.extraArgs }}
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
- {{- with .Values.containerSecurityContext }}
|
|
+ {{- with .Values.securityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
@@ -64,8 +68,9 @@
|
|
value: {{ $value | quote }}
|
|
{{- end }}
|
|
ports:
|
|
- - name: {{ .Values.service.portName }}
|
|
+ - name: http
|
|
containerPort: {{ .Values.service.port }}
|
|
+ hostPort: {{ .Values.service.port }}
|
|
protocol: TCP
|
|
livenessProbe:
|
|
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
|
@@ -162,6 +167,9 @@
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
volumes:
|
|
+ - name: exporter-scripts
|
|
+ configMap:
|
|
+ name: {{ include "prometheus-windows-exporter.fullname" . }}-scripts
|
|
- name: config
|
|
configMap:
|
|
name: {{ include "prometheus-windows-exporter.fullname" . }}
|