-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated nomad-monitor helm chart with nomad-agent-monitor (#48)
- Loading branch information
Arnaud Delabarre
authored
Jul 25, 2022
1 parent
720bd7d
commit 78d09fb
Showing
7 changed files
with
194 additions
and
82 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
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
47 changes: 0 additions & 47 deletions
47
charts/nomad-monitor/templates/bridge-health-monitor-deployment.yaml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{{- if .Values.monitor.enabled }} | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: {{ include "monitor.fullname" . }} | ||
labels: {{- include "monitor.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: monitor | ||
spec: | ||
selector: | ||
matchLabels: {{- include "monitor.selectorLabels" . | nindent 6 }} | ||
app.kubernetes.io/component: monitor | ||
replicas: {{ .Values.monitor.replicas }} | ||
serviceName: {{ include "monitor.fullname" . }}-monitor-svc | ||
template: | ||
metadata: | ||
annotations: | ||
{{- with .Values.commonAnnotations }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.monitor.podAnnotations }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
labels: {{- include "monitor.labels" . | nindent 8 }} | ||
app.kubernetes.io/component: monitor | ||
{{- with .Values.commonLabels }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.monitor.podLabels }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
terminationGracePeriodSeconds: 10 | ||
{{- if .Values.podSecurityContext.enabled }} | ||
securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
image: "{{ .Values.monitor.image.registry }}/{{ .Values.monitor.image.repository }}:{{ .Values.monitor.image.tag }}" | ||
imagePullPolicy: {{ .Values.monitor.image.pullPolicy }} | ||
{{- if .Values.containerSecurityContext.enabled }} | ||
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }} | ||
{{- end }} | ||
command: ["./monitor"] | ||
envFrom: | ||
{{- with .Values.commonEnvFrom }} | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- with .Values.monitor.envFrom }} | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
env: | ||
{{- with .Values.commonEnvVars }} | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- with .Values.monitor.envVars }} | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.monitor.resources }} | ||
resources: {{- toYaml .Values.monitor.resources | nindent 12 }} | ||
{{- end }} | ||
ports: | ||
- name: metrics | ||
containerPort: {{ .Values.metrics.port }} | ||
{{- if .Values.serviceAccount.create }} | ||
serviceAccountName: {{ include "monitor.serviceAccountName" . }} | ||
{{- end }} | ||
{{- with .Values.monitor.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.monitor.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.monitor.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{- if .Values.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "monitor.serviceAccountName" . }} | ||
labels: {{- include "monitor.labels" . | nindent 4 }} | ||
{{- with .Values.commonLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.commonAnnotations }} | ||
annotations: {{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,95 @@ | ||
replicaCount: 1 | ||
|
||
image: | ||
repository: gcr.io/nomad-xyz/nomad-monitor | ||
pullPolicy: Always | ||
# Overrides the image tag whose default is the chart appVersion. | ||
tag: 'latest' | ||
# nameOverride -- String to partially override monitor.fullname template with a string (will prepend the release name) | ||
# | ||
nameOverride: "" | ||
|
||
monitor: | ||
networks: ["kovan", "moonbasealpha"] | ||
config: # Contents of .env file | ||
# fullnameOverride -- String to fully override monitor.fullname template with a string | ||
# | ||
fullnameOverride: "" | ||
|
||
# serviceAccount -- ServiceAccount configuration | ||
# | ||
serviceAccount: | ||
# serviceAccount.create -- Create service account | ||
create: true | ||
# serviceAccount.name -- Name of service account to use if create is true | ||
name: "" | ||
|
||
# -- Configure Pods Security Context | ||
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod | ||
# | ||
podSecurityContext: | ||
# podSecurityContext.enabled -- Enable pod security context | ||
enabled: true | ||
# podSecurityContext.fsGroup -- fsGroup ID for the pod | ||
fsGroup: 1001 | ||
|
||
# -- Configure Container Security Context (only main container) | ||
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container | ||
# | ||
containerSecurityContext: | ||
# containerSecurityContext.enabled -- Enable container security context | ||
enabled: true | ||
# containerSecurityContext.runAsUser -- User ID for the container | ||
runAsUser: 1001 | ||
|
||
imagePullSecrets: [] | ||
nameOverride: '' | ||
fullnameOverride: '' | ||
# commonLabels -- Add extra labels to all pods | ||
# | ||
commonLabels: {} | ||
|
||
podAnnotations: | ||
# commonAnnotations -- Add extra annotations to all pods | ||
# | ||
commonAnnotations: | ||
prometheus.io/scrape: 'true' | ||
prometheus.io/port: '9090' | ||
|
||
resources: | ||
{} | ||
# We usually recommend not to specify default resources and to leave this as a conscious | ||
# choice for the user. This also increases chances charts run on environments with little | ||
# resources, such as Minikube. If you do want to specify resources, uncomment the following | ||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'. | ||
# limits: | ||
# cpu: 100m | ||
# memory: 128Mi | ||
# requests: | ||
# cpu: 100m | ||
# memory: 128Mi | ||
# commonEnvFrom -- Common environment variables from a config/secret file | ||
commonEnvFrom: [] | ||
|
||
# commonEnvVars -- Common environment variables to add all pods | ||
# | ||
commonEnvVars: [] | ||
|
||
# metrics -- Container port exposing Nomad Monitor metrics | ||
# | ||
metrics: | ||
port: '9090' | ||
|
||
# Monitoring Agent configuration | ||
# | ||
monitor: | ||
|
||
# monitor.enabled -- Enable Nomad agent monitor | ||
enabled: true | ||
|
||
# monitor.replicas -- Number of instances of monitor | ||
replicas: 1 | ||
|
||
# monitor.image -- Nomad agent monitor docker image configuration (immutable image tags are recommended) | ||
image: | ||
registry: gcr.io | ||
repository: nomad-xyz/nomad-agent | ||
# tag: latest | ||
pullPolicy: Always | ||
|
||
# monitor.envFrom -- Environment variables from a config/secret file | ||
envFrom: [] | ||
|
||
# monitor.envVars -- Environment variables to add Nomad agent monitor pod | ||
envVars: [] | ||
|
||
# monitor.resources -- monitor container's resource requests and limits | ||
# ref: https://kubernetes.io/docs/user-guide/compute-resources/ | ||
resources: | ||
# limits: | ||
# cpu: 100m | ||
# memory: 100Mb | ||
# requests: | ||
# cpu: 50m | ||
# memory: 50Mb | ||
|
||
# monitor.podLabels -- Add extra labels to the pods | ||
podLabels: {} | ||
|
||
# monitor.podAnnotations -- Add extra annotations to the pod | ||
podAnnotations: {} |