Skip to content

Commit

Permalink
feat: extend charts with additional parameters (promitor#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3mi authored Feb 11, 2021
1 parent 953d628 commit c4a570b
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 3 deletions.
11 changes: 11 additions & 0 deletions promitor-agent-resource-discovery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,22 @@ their default values.
| `health.readiness.verifyDependencies` | Indication if readiness probes should verify if Promitor can interat with external dependencies. Do note that this will contact all dependencies which can have performance impact, cause throttling or cascading failures when consumed very often. | `false` | |
| `health.readiness.delay` | Amount of seconds to wait before probing the container to verify if it's ready | `5` | |
| `health.readiness.interval` | Amount of seconds to wait before probing the container again to verify if it's ready after the last attempt | `5` | |
| `health.readiness.thresholds.failure` | Number of retries after first failed check before container will be marked `Unready` | `3` |
| `health.readiness.thresholds.success` | Minimum consecutive successes for the probe to be considered successful after having failed | `1` |
| `health.readiness.timeoutSeconds` | Amount of seconds after which the probe times out | `1` |
| `health.liveness.enabled` | Indication if liveness probes should be used | `true` | |
| `health.liveness.verifyDependencies` | Indication if liveness probes should verify if Promitor can interat with external dependencies. Do note that this will contact all dependencies which can have performance impact, cause throttling or cascading failures when consumed very often. | `false` | |
| `health.liveness.delay` | Amount of seconds to wait before probing the container to verify if it's still alive | `5` | |
| `health.liveness.interval` | Amount of seconds to wait before probing the container again to verify if it's still alive after the last attempt | `30` | |
| `health.liveness.thresholds.failure` | Number of retries after first failed check before container restart | `3` |
| `health.liveness.thresholds.success` | Minimum consecutive successes for the probe to be considered successful after having failed | `1` |
| `health.liveness.timeoutSeconds` | Amount of seconds after which the probe times out | `1` |
| `affinity` | Affinity settings ([docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity)) | `{}` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `podLabels` | Additional pod labels to include | `{}` |
| `priorityClassName` | Priority class to be used by pod ([docs](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/)) | `""` |
| `securityContext.*` | Custom security context object for pod ([docs](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/)) | `{}` |
| `securityContext.enabled` | Whether to include custom security context for pod or not | `false` |
| `tolerations` | Tolerations for pod assignment | `[]` |
| `resources` | Pod resource requests & limits | `{}` |
| `secrets.createSecret` | Indication if you want to bring your own secret level of logging | `true` | |
Expand Down
18 changes: 18 additions & 0 deletions promitor-agent-resource-discovery/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ spec:
metadata:
labels:
{{- include "promitor-agent-resource-discovery.selectorLabels" . | nindent 8 }}
{{- if .Values.podLabels }}
{{- toYaml .Values.podLabels | nindent 8 }}
{{- end }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- if .Values.secrets.createSecret }}
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- end }}
spec:
{{- if .Values.securityContext.enabled }}
securityContext: {{- omit .Values.securityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.rbac.create }}
serviceAccountName: {{ template "promitor-agent-resource-discovery.serviceaccountname" . }}
{{- end }}
Expand Down Expand Up @@ -59,20 +65,32 @@ spec:
mountPath: /config/
{{- if .Values.health.liveness.enabled }}
livenessProbe:
failureThreshold: {{ .Values.health.liveness.thresholds.failure }}
httpGet:
path: /api/v1/health?includeDependencies={{ .Values.health.liveness.verifyDependencies }}
port: http
initialDelaySeconds: {{ .Values.health.liveness.delay }}
periodSeconds: {{ .Values.health.liveness.interval }}
successThreshold: {{ .Values.health.liveness.thresholds.success }}
timeoutSeconds: {{ .Values.health.liveness.timeoutSeconds }}
{{- end }}
{{- if .Values.health.readiness.enabled }}
readinessProbe:
failureThreshold: {{ .Values.health.readiness.thresholds.failure }}
httpGet:
path: /api/v1/health?includeDependencies={{ .Values.health.readiness.verifyDependencies }}
port: http
initialDelaySeconds: {{ .Values.health.readiness.delay }}
periodSeconds: {{ .Values.health.readiness.interval }}
successThreshold: {{ .Values.health.readiness.thresholds.success }}
timeoutSeconds: {{ .Values.health.readiness.timeoutSeconds }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- end }}
{{- with .Values.affinity }}
affinity: {{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
volumes:
- name: config-volume-{{ template "promitor-agent-resource-discovery.name" . }}
configMap:
Expand Down
18 changes: 18 additions & 0 deletions promitor-agent-resource-discovery/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,25 @@ health:
verifyDependencies: false
delay: 5
interval: 5
timeoutSeconds: 1
thresholds:
failure: 3
success: 1
liveness:
enabled: true
verifyDependencies: false
delay: 5
interval: 30
timeoutSeconds: 1
thresholds:
failure: 3
success: 1

affinity: {}

podLabels: {}

priorityClassName: ""

resources: {}
# limits:
Expand Down Expand Up @@ -112,4 +126,8 @@ rbac:
annotations: {}

nodeSelector: {}

securityContext:
enabled: false

tolerations: []
17 changes: 14 additions & 3 deletions promitor-agent-scraper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,24 @@ their default values.
| `rbac.serviceAccount.annotations` | Service account annotations| `{}` |
| `health.readiness.enabled` | Indication if readiness probes should be used | `true` | |
| `health.readiness.verifyDependencies` | Indication if readiness probes should verify if Promitor can interat with external dependencies. Do note that this will contact all dependencies which can have performance impact, cause throttling or cascading failures when consumed very often. | `false` | |
| `health.readiness.delay` | Amount of seconds to wait before probing the container to verify if it's ready | `5` | |
| `health.readiness.interval` | Amount of seconds to wait before probing the container again to verify if it's ready after the last attempt | `5` | |
| `health.readiness.delay` | Amount of seconds to wait before probing the container to verify if it's ready | `5` |
| `health.readiness.interval` | Amount of seconds to wait before probing the container again to verify if it's ready after the last attempt | `5` |
| `health.readiness.thresholds.failure` | Number of retries after first failed check before container will be marked `Unready` | `3` |
| `health.readiness.thresholds.success` | Minimum consecutive successes for the probe to be considered successful after having failed | `1` |
| `health.readiness.timeoutSeconds` | Amount of seconds after which the probe times out | `1` |
| `health.liveness.enabled` | Indication if liveness probes should be used | `true` | |
| `health.liveness.verifyDependencies` | Indication if liveness probes should verify if Promitor can interat with external dependencies. Do note that this will contact all dependencies which can have performance impact, cause throttling or cascading failures when consumed very often. | `false` | |
| `health.liveness.delay` | Amount of seconds to wait before probing the container to verify if it's still alive | `5` | |
| `health.liveness.interval` | Amount of seconds to wait before probing the container again to verify if it's still alive after the last attempt | `30` | |
| `health.liveness.interval` | Amount of seconds to wait before probing the container again to verify if it's still alive after the last attempt | `30` |
| `health.liveness.thresholds.failure` | Number of retries after first failed check before container restart | `3` |
| `health.liveness.thresholds.success` | Minimum consecutive successes for the probe to be considered successful after having failed | `1` |
| `health.liveness.timeoutSeconds` | Amount of seconds after which the probe times out | `1` |
| `affinity` | Affinity settings ([docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity)) | `{}` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `podLabels` | Additional pod labels to include | `{}` |
| `priorityClassName` | Priority class to be used by pod ([docs](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/)) | `""` |
| `securityContext.*` | Custom security context object for pod ([docs](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/)) | `{}` |
| `securityContext.enabled` | Whether to include custom security context for pod or not | `false` |
| `tolerations` | Tolerations for pod assignment | `[]` |
| `resources` | Pod resource requests & limits | `{}` |
| `secrets.createSecret` | Indication if you want to bring your own secret level of logging | `true` |
Expand Down
18 changes: 18 additions & 0 deletions promitor-agent-scraper/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@ spec:
metadata:
labels:
{{- include "promitor-agent-scraper.selectorLabels" . | nindent 8 }}
{{- if .Values.podLabels }}
{{- toYaml .Values.podLabels | nindent 8 }}
{{- end }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- if .Values.secrets.createSecret }}
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- end }}
spec:
{{- if .Values.securityContext.enabled }}
securityContext: {{- omit .Values.securityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.rbac.create }}
serviceAccountName: {{ template "promitor-agent-scraper.serviceaccountname" . }}
{{- end }}
Expand Down Expand Up @@ -73,20 +79,32 @@ spec:
mountPath: /config/
{{- if .Values.health.liveness.enabled }}
livenessProbe:
failureThreshold: {{ .Values.health.liveness.thresholds.failure }}
httpGet:
path: /api/v1/health?includeDependencies={{ .Values.health.liveness.verifyDependencies }}
port: http
initialDelaySeconds: {{ .Values.health.liveness.delay }}
periodSeconds: {{ .Values.health.liveness.interval }}
successThreshold: {{ .Values.health.liveness.thresholds.success }}
timeoutSeconds: {{ .Values.health.liveness.timeoutSeconds }}
{{- end }}
{{- if .Values.health.readiness.enabled }}
readinessProbe:
failureThreshold: {{ .Values.health.readiness.thresholds.failure }}
httpGet:
path: /api/v1/health?includeDependencies={{ .Values.health.readiness.verifyDependencies }}
port: http
initialDelaySeconds: {{ .Values.health.readiness.delay }}
periodSeconds: {{ .Values.health.readiness.interval }}
successThreshold: {{ .Values.health.readiness.thresholds.success }}
timeoutSeconds: {{ .Values.health.readiness.timeoutSeconds }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- end }}
{{- with .Values.affinity }}
affinity: {{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
volumes:
- name: config-volume-{{ template "promitor-agent-scraper.name" . }}
configMap:
Expand Down
18 changes: 18 additions & 0 deletions promitor-agent-scraper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,25 @@ health:
verifyDependencies: false
delay: 5
interval: 5
timeoutSeconds: 1
thresholds:
failure: 3
success: 1
liveness:
enabled: true
verifyDependencies: false
delay: 5
interval: 30
timeoutSeconds: 1
thresholds:
failure: 3
success: 1

affinity: {}

podLabels: {}

priorityClassName: ""

resources: {}
# limits:
Expand Down Expand Up @@ -131,4 +145,8 @@ rbac:
annotations: {}

nodeSelector: {}

securityContext:
enabled: false

tolerations: []

0 comments on commit c4a570b

Please sign in to comment.