diff --git a/charts/docker-hub-rate-limit-exporter-chart/templates/daemonset.yaml b/charts/docker-hub-rate-limit-exporter-chart/templates/daemonset.yaml index f4783b4..02217ad 100644 --- a/charts/docker-hub-rate-limit-exporter-chart/templates/daemonset.yaml +++ b/charts/docker-hub-rate-limit-exporter-chart/templates/daemonset.yaml @@ -9,9 +9,9 @@ spec: selector: matchLabels: {{- include "docker-hub-rate-limit-exporter.selectorLabels" . | nindent 6 }} - {{- if .Values.daemonset.updateStrategy }} + {{- if .Values.updateStrategy }} updateStrategy: -{{ toYaml .Values.daemonset.updateStrategy | indent 4 }} +{{ toYaml .Values.updateStrategy | indent 4 }} {{- end }} template: metadata: @@ -20,8 +20,8 @@ spec: annotations: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} - {{- if .Values.daemonset.podAnnotations }} - {{- toYaml .Values.daemonset.podAnnotations | nindent 8 }} + {{- if .Values.podAnnotations }} + {{- toYaml .Values.podAnnotations | nindent 8 }} {{- end }} spec: {{- if .Values.imagePullSecrets }} @@ -81,17 +81,17 @@ spec: configMapKeyRef: name: {{ include "docker-hub-rate-limit-exporter.fullname" . }}-configmap key: exporter-port - {{- if .Values.daemonset.nodeSelector }} + {{- if .Values.nodeSelector }} nodeSelector: -{{ toYaml .Values.daemonset.nodeSelector | indent 8 }} +{{ toYaml .Values.nodeSelector | indent 8 }} {{- end }} - {{- if .Values.daemonset.affinity }} + {{- if .Values.affinity }} affinity: -{{ toYaml .Values.daemonset.affinity | indent 8 }} +{{ toYaml .Values.affinity | indent 8 }} {{- end }} - {{- if .Values.daemonset.tolerations }} + {{- if .Values.tolerations }} tolerations: -{{ toYaml .Values.daemonset.tolerations | indent 8 }} +{{ toYaml .Values.tolerations | indent 8 }} {{- end }} hostNetwork: {{ .Values.hostNetwork }} hostPID: {{ .Values.hostPID }} diff --git a/charts/docker-hub-rate-limit-exporter-chart/templates/deployment.yaml b/charts/docker-hub-rate-limit-exporter-chart/templates/deployment.yaml index f1f6cdc..305e630 100644 --- a/charts/docker-hub-rate-limit-exporter-chart/templates/deployment.yaml +++ b/charts/docker-hub-rate-limit-exporter-chart/templates/deployment.yaml @@ -7,7 +7,7 @@ metadata: labels: {{- include "docker-hub-rate-limit-exporter.labels" . | nindent 4 }} spec: - replicas: {{ hasKey .Values.deployment "replicaCount" | ternary .Values.deployment.replicaCount 1 }} + replicas: {{ hasKey .Values "replicaCount" | ternary .Values.replicaCount 1 }} selector: matchLabels: {{- include "docker-hub-rate-limit-exporter.selectorLabels" . | nindent 6 }} @@ -18,8 +18,8 @@ spec: annotations: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} - {{- if .Values.deployment.podAnnotations }} - {{- toYaml .Values.deployment.podAnnotations | nindent 8 }} + {{- if .Values.podAnnotations }} + {{- toYaml .Values.podAnnotations | nindent 8 }} {{- end }} spec: {{- if .Values.imagePullSecrets }} @@ -79,17 +79,17 @@ spec: configMapKeyRef: name: {{ include "docker-hub-rate-limit-exporter.fullname" . }}-configmap key: exporter-port - {{- if .Values.deployment.nodeSelector }} + {{- if .Values.nodeSelector }} nodeSelector: -{{ toYaml .Values.deployment.nodeSelector | indent 8 }} +{{ toYaml .Values.nodeSelector | indent 8 }} {{- end }} - {{- if .Values.deployment.affinity }} + {{- if .Values.affinity }} affinity: -{{ toYaml .Values.deployment.affinity | indent 8 }} +{{ toYaml .Values.affinity | indent 8 }} {{- end }} - {{- if .Values.deployment.tolerations }} + {{- if .Values.tolerations }} tolerations: -{{ toYaml .Values.deployment.tolerations | indent 8 }} +{{ toYaml .Values.tolerations | indent 8 }} {{- end }} {{- end }} diff --git a/charts/docker-hub-rate-limit-exporter-chart/values.schema.json b/charts/docker-hub-rate-limit-exporter-chart/values.schema.json new file mode 100644 index 0000000..01f8ee0 --- /dev/null +++ b/charts/docker-hub-rate-limit-exporter-chart/values.schema.json @@ -0,0 +1,246 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "affinity": { + "properties": {}, + "type": "object" + }, + "config": { + "properties": { + "dockerhub": { + "properties": { + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "type": "object" + }, + "verbosity": { + "type": "integer" + } + }, + "type": "object" + }, + "daemonset": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "type": "object", + "additionalProperties": false + }, + "deployment": { + "properties": { + "enabled": { + "type": "boolean" + } + }, + "type": "object", + "additionalProperties": false + }, + "fullnameOverride": { + "type": "string" + }, + "hostNetwork": { + "type": "boolean" + }, + "hostPID": { + "type": "boolean" + }, + "image": { + "properties": { + "pullPolicy": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "type": "object" + }, + "imagePullSecrets": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { "type": "string" } + } + } + }, + "livenessProbeTimeoutSeconds": { + "type": "integer" + }, + "nameOverride": { + "type": "string" + }, + "nodeSelector": { + "properties": {}, + "type": "object" + }, + "podAnnotations": { + "type": "array", + "items": { + "type": "object", + "properties": {} + } + }, + "podSecurityContext": { + "properties": {}, + "type": "object" + }, + "priorityClassName": { + "type": "string" + }, + "readinessProbeTimeoutSeconds": { + "type": "integer" + }, + "replicaCount": { + "type": "integer" + }, + "resources": { + "properties": { + "limits": { + "properties": { + "cpu": { + "type": "string" + }, + "memory": { + "type": "string" + } + }, + "type": "object" + }, + "requests": { + "properties": { + "cpu": { + "type": "string" + }, + "memory": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "securityContext": { + "properties": {}, + "type": "object" + }, + "service": { + "properties": { + "annotations": { + "properties": {}, + "type": "object" + }, + "nodePort": { + "type": "integer" + }, + "port": { + "type": "integer" + }, + "portName": { + "type": "string" + }, + "targetPort": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "serviceAccount": { + "properties": { + "annotations": { + "properties": {}, + "type": "object" + }, + "create": { + "type": "boolean" + }, + "imagePullSecrets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { "type": "string" } + } + } + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "serviceMonitor": { + "properties": { + "additionalLabels": { + "properties": {}, + "type": "object" + }, + "bearerTokenFile": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "interval": { + "type": "string" + }, + "jobLabel": { + "type": "string" + }, + "metricRelabelings": { + "type": "array" + }, + "namespace": { + "type": "string" + }, + "proxyUrl": { + "type": "string" + }, + "relabelings": { + "type": "array" + }, + "scheme": { + "type": "string" + }, + "scrapeTimeout": { + "type": "string" + }, + "selectorOverride": { + "properties": {}, + "type": "object" + }, + "tlsConfig": { + "properties": {}, + "type": "object" + } + }, + "type": "object" + }, + "tolerations": { + "type": "array", + "items": { + "type": "object", + "properties": {} + } + }, + "updateStrategy": { + "type": "string" + } + }, + "type": "object" +} diff --git a/charts/docker-hub-rate-limit-exporter-chart/values.yaml b/charts/docker-hub-rate-limit-exporter-chart/values.yaml index 075f0f6..acd3095 100644 --- a/charts/docker-hub-rate-limit-exporter-chart/values.yaml +++ b/charts/docker-hub-rate-limit-exporter-chart/values.yaml @@ -32,7 +32,7 @@ serviceMonitor: jobLabel: "" scheme: http - bearerTokenFile: + bearerTokenFile: "" tlsConfig: {} ## proxyUrl: URL of a proxy that should be used for scraping. @@ -73,9 +73,9 @@ service: type: ClusterIP port: 9100 targetPort: 9100 - nodePort: portName: metrics annotations: {} + # nodePort: livenessProbeTimeoutSeconds: 5 @@ -96,3 +96,14 @@ tolerations: [] priorityClassName: "" affinity: {} + +podAnnotations: [] + +# Only relevant for `deployment.enabled: true` +replicaCount: 1 + +# Only relevant for `daemonset.enabled: true` +updateStrategy: "" + +# hostNetwork: false +# hostPID: false