-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #234 from wigust/helm
Update Helm Chart patch series
- Loading branch information
Showing
7 changed files
with
125 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,58 @@ | ||
# Helm chart for helm v3 | ||
|
||
## How to use | ||
|
||
### Authentication | ||
|
||
#### SSH key authentication | ||
Add your ssh-keyfile and config.yml to values.yml | ||
|
||
> sshkey is the base64 encoded id_rsa you want to use for authentication | ||
> generate sshkey with `cat $HOME/.ssh/id_rsa | base64 -w0 && echo` | ||
`sshkey: QWRkIHlvdXIgb3duIGlkX3JzYSBoZXJl` | ||
|
||
#### Password authentication | ||
To use password authentication the following values.yaml configuration could | ||
be used with a `junos-exporter-ssh` secret object storing SSH secrets: | ||
|
||
``` yaml | ||
extraArgs: | ||
- "-ssh.targets=$(JUNOS_EXPORTER_SSH_TARGETS)" | ||
- "-ssh.user=$(JUNOS_EXPORTER_SSH_USER)" | ||
- "-ssh.password=$(JUNOS_EXPORTER_SSH_PASSWORD)" | ||
|
||
extraEnv: | ||
- name: JUNOS_EXPORTER_SSH_TARGETS | ||
valueFrom: | ||
secretKeyRef: | ||
name: junos-exporter-ssh | ||
key: targets | ||
- name: JUNOS_EXPORTER_SSH_USER | ||
valueFrom: | ||
secretKeyRef: | ||
name: junos-exporter-ssh | ||
key: username | ||
- name: JUNOS_EXPORTER_SSH_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: junos-exporter-ssh | ||
key: password | ||
``` | ||
``` yaml | ||
apiVersion: v1 | ||
kind: Secret | ||
type: Opaque | ||
data: | ||
password: BASE64_ENCODED_SSH_PASSWORD | ||
targets: BASE64_ENCODED_SSH_TARGETS | ||
username: BASE64_ENCODED_SSH_USERNAME | ||
``` | ||
### Devices configuration | ||
Add your devices to the devices in configyml in values.yml | ||
### Installation | ||
> cd helm | ||
> helm install junosexporter ./junosexporter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
{{- if .Values.configyml }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
data: | ||
config.yml: {{ toYaml .Values.configyml | indent 2 }} | ||
config.yml: | | ||
{{- toYaml .Values.configyml | nindent 4 }} | ||
metadata: | ||
name: {{ .Release.Name }}-configmap | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
{{- include "junos_exporter.labels" . | nindent 4 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters