Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
system-charts
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rancher商店
system-charts
Commits
12e82e39
Commit
12e82e39
authored
Sep 11, 2019
by
Frank Mai
Committed by
Alena Prokharchyk
Sep 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support new Windows node-exporter image
Copy the binary to the host before wins cli prc run
parent
1e0304e9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
2 deletions
+79
-2
configmap.yaml
...0.4/charts/exporter-node-windows/templates/configmap.yaml
+51
-0
daemonset.yaml
...0.4/charts/exporter-node-windows/templates/daemonset.yaml
+26
-1
values.yaml
charts/rancher-monitoring/v0.0.4/values.yaml
+2
-1
No files found.
charts/rancher-monitoring/v0.0.4/charts/exporter-node-windows/templates/configmap.yaml
0 → 100644
View file @
12e82e39
apiVersion
:
v1
kind
:
ConfigMap
metadata
:
name
:
{{
template "app.fullname" .
}}
labels
:
app
:
{{
template "app.name" .
}}
chart
:
{{
template "app.version" .
}}
heritage
:
{{
.Release.Service
}}
release
:
{{
.Release.Name
}}
data
:
copy-binary.ps1
:
|-
$ErrorActionPreference = 'Stop'
function Create-Directory
{
param (
[parameter(Mandatory = $false, ValueFromPipeline = $true)] [string]$Path
)
if (Test-Path -Path $Path) {
if (-not (Test-Path -Path $Path -PathType Container)) {
# clean the same path file
Remove-Item -Recurse -Force -Path $Path -ErrorAction Ignore | Out-Null
}
return
}
New-Item -Force -ItemType Directory -Path $Path | Out-Null
}
function Transfer-File
{
param (
[parameter(Mandatory = $true)] [string]$Src,
[parameter(Mandatory = $true)] [string]$Dst
)
if (Test-Path -PathType leaf -Path $Dst) {
$dstHasher = Get-FileHash -Path $Dst
$srcHasher = Get-FileHash -Path $Src
if ($dstHasher.Hash -eq $srcHasher.Hash) {
return
}
}
$null = Copy-Item -Force -Path $Src -Destination $Dst
}
Create-Directory -Path "c:\host\etc\wmi-exporter"
Transfer-File -Src "c:\etc\wmi-exporter\wmi-exporter.exe" -Dst "c:\host\etc\wmi-exporter\wmi-exporter.exe"
charts/rancher-monitoring/v0.0.4/charts/exporter-node-windows/templates/daemonset.yaml
View file @
12e82e39
...
@@ -20,6 +20,22 @@ spec:
...
@@ -20,6 +20,22 @@ spec:
chart
:
{{
template "app.version" .
}}
chart
:
{{
template "app.version" .
}}
release
:
{{
.Release.Name
}}
release
:
{{
.Release.Name
}}
spec
:
spec
:
initContainers
:
-
name
:
exporter-node-binary-copy
image
:
{{
template "system_default_registry" .
}}{{
.Values.image.repository
}}
:{{ .Values.image.tag }}
command
:
-
pwsh
-
-f
-
c:/scripts/copy-binary.ps1
{{
- if and .Values.resources .Values.resources.inits
}}
resources
:
{{
toYaml .Values.resources.inits | indent 10
}}
{{
- end
}}
volumeMounts
:
-
name
:
binary-host-path
mountPath
:
c:/host/etc/wmi-exporter
-
name
:
exporter-scripts
mountPath
:
c:/scripts/
containers
:
containers
:
-
name
:
exporter-node
-
name
:
exporter-node
image
:
{{
template "system_default_registry" .
}}{{
.Values.image.repository
}}
:{{ .Values.image.tag }}
image
:
{{
template "system_default_registry" .
}}{{
.Values.image.repository
}}
:{{ .Values.image.tag }}
...
@@ -39,8 +55,10 @@ spec:
...
@@ -39,8 +55,10 @@ spec:
{{
- if .Values.extraEnv
}}
{{
- if .Values.extraEnv
}}
{{
toYaml .Values.extraEnv | indent 10
}}
{{
toYaml .Values.extraEnv | indent 10
}}
{{
- end
}}
{{
- end
}}
{{
- if and .Values.resources .Values.resources.core
}}
resources
:
resources
:
{{
toYaml .Values.resources | indent 10
}}
{{
toYaml .Values.resources.core | indent 10
}}
{{
- end
}}
volumeMounts
:
volumeMounts
:
-
name
:
wins-pipe
-
name
:
wins-pipe
mountPath
:
\\.\pipe\rancher_wins
mountPath
:
\\.\pipe\rancher_wins
...
@@ -67,3 +85,10 @@ spec:
...
@@ -67,3 +85,10 @@ spec:
-
name
:
wins-pipe
-
name
:
wins-pipe
hostPath
:
hostPath
:
path
:
\\.\pipe\rancher_wins
path
:
\\.\pipe\rancher_wins
-
name
:
binary-host-path
hostPath
:
path
:
c:/etc/wmi-exporter
type
:
DirectoryOrCreate
-
name
:
exporter-scripts
configMap
:
name
:
{{
template "app.fullname" .
}}
charts/rancher-monitoring/v0.0.4/values.yaml
View file @
12e82e39
...
@@ -172,7 +172,8 @@ exporter-node-windows:
...
@@ -172,7 +172,8 @@ exporter-node-windows:
image
:
image
:
os
:
windows
os
:
windows
repository
:
rancher/wmi_exporter-package
repository
:
rancher/wmi_exporter-package
tag
:
v0.0.2
tag
:
v0.0.3
resources
:
{}
ports
:
ports
:
metrics
:
metrics
:
name
:
windows-metrics
name
:
windows-metrics
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment