ソースを参照

Update catalog information

sonicaj 2 年 前
コミット
48548d885f

+ 20 - 1
catalog.json

@@ -49,7 +49,7 @@
             "latest_version": "1.0.1",
             "latest_app_version": "8.7.0",
             "latest_human_version": "8.7.0_1.0.1",
-            "last_update": "2023-04-11 15:33:26",
+            "last_update": "2023-04-12 13:31:20",
             "name": "elastic-search",
             "recommended": false,
             "title": "Elastic Search",
@@ -149,6 +149,25 @@
             "title": "Pi-hole",
             "icon_url": "https://github.com/pi-hole/graphics/raw/master/Vortex/Vortex_Vertical_wordmark_lightmode.png?raw=true)"
         },
+        "prometheus": {
+            "app_readme": "<h1>Prometheus</h1>\n<p><a href=\"https://prometheus.io/\">Prometheus</a> - Monitoring system and time series database.</p>\n<blockquote>\n<p>When application is installed, a container will be launched with <strong>root</strong> privileges.\nThis is required in order to apply the correct permissions to the <code>prometheus</code> directories.\nAfterward, the <code>prometheus</code> container will run as a <strong>non</strong>-root user (Default: <code>568</code>).\nAlso an empty configuration file will be created.</p>\n</blockquote>\n<p>The configuration file is located at <code>/config/prometheus.yml</code> inside the container.\nData is stored at <code>/data</code> inside the container.</p>",
+            "categories": [
+                "metrics",
+                "prometheus"
+            ],
+            "description": "The Prometheus monitoring system and time series database.",
+            "healthy": true,
+            "healthy_error": null,
+            "location": "/__w/charts/charts/charts/prometheus",
+            "latest_version": "1.0.0",
+            "latest_app_version": "v2.43.0",
+            "latest_human_version": "v2.43.0_1.0.0",
+            "last_update": null,
+            "name": "prometheus",
+            "recommended": false,
+            "title": "Prometheus",
+            "icon_url": "https://avatars.githubusercontent.com/u/3380462"
+        },
         "wg-easy": {
             "app_readme": "<h1>WG-Easy</h1>\n<p><a href=\"https://github.com/WeeJeWel/wg-easy\">WG-Easy (WireGuard Easy)</a> is the easiest way to install &amp; manage WireGuard!</p>",
             "categories": [

+ 6 - 0
charts/prometheus/1.0.0/Chart.lock

@@ -0,0 +1,6 @@
+dependencies:
+- name: common
+  repository: file://../../../common
+  version: 1.0.3
+digest: sha256:1a090020cfa582aff29906320874ffe9b543fcc6c2423c281f434514f2653e02
+generated: "2023-04-06T18:56:51.017765304+03:00"

+ 25 - 0
charts/prometheus/1.0.0/Chart.yaml

@@ -0,0 +1,25 @@
+name: prometheus
+description: The Prometheus monitoring system and time series database.
+annotations:
+  title: Prometheus
+type: application
+version: 1.0.0
+apiVersion: v2
+appVersion: v2.43.0
+kubeVersion: '>=1.16.0-0'
+maintainers:
+  - name: truenas
+    url: https://www.truenas.com/
+dependencies:
+  - name: common
+    repository: file://../../../common
+    version: 1.0.3
+home: https://prometheus.io
+icon: https://avatars.githubusercontent.com/u/3380462
+sources:
+  - https://github.com/prometheus/prometheus
+  - https://github.com/truenas/charts/tree/master/charts/prometheus
+  - https://prometheus.io
+keywords:
+  - metrics
+  - prometheus

+ 11 - 0
charts/prometheus/1.0.0/README.md

@@ -0,0 +1,11 @@
+# Prometheus
+
+[Prometheus](https://prometheus.io/) - Monitoring system and time series database.
+
+> When application is installed, a container will be launched with **root** privileges.
+> This is required in order to apply the correct permissions to the `prometheus` directories.
+> Afterward, the `prometheus` container will run as a **non**-root user (Default: `568`).
+> Also an empty configuration file will be created.
+
+The configuration file is located at `/config/prometheus.yml` inside the container.
+Data is stored at `/data` inside the container.

+ 11 - 0
charts/prometheus/1.0.0/app-readme.md

@@ -0,0 +1,11 @@
+# Prometheus
+
+[Prometheus](https://prometheus.io/) - Monitoring system and time series database.
+
+> When application is installed, a container will be launched with **root** privileges.
+> This is required in order to apply the correct permissions to the `prometheus` directories.
+> Afterward, the `prometheus` container will run as a **non**-root user (Default: `568`).
+> Also an empty configuration file will be created.
+
+The configuration file is located at `/config/prometheus.yml` inside the container.
+Data is stored at `/data` inside the container.

BIN
charts/prometheus/1.0.0/charts/common-1.0.3.tgz


+ 7 - 0
charts/prometheus/1.0.0/ci/basic-values.yaml

@@ -0,0 +1,7 @@
+prometheusStorage:
+  data:
+    type: hostPath
+    hostPath: /mnt/{{ .Release.Name }}/data
+  config:
+    type: hostPath
+    hostPath: /mnt/{{ .Release.Name }}/config

+ 34 - 0
charts/prometheus/1.0.0/ix_values.yaml

@@ -0,0 +1,34 @@
+image:
+  repository: prom/prometheus
+  pullPolicy: IfNotPresent
+  tag: v2.43.0
+
+resources:
+  limits:
+    cpu: 4000m
+    memory: 8Gi
+
+prometheusConfig:
+  retentionTime: 15d
+  retentionSize: ""
+  walCompression: true
+  additionalEnvs: []
+  additionalArgs: []
+
+prometheusNetwork:
+  apiPort: 30000
+  hostNetwork: false
+
+prometheusRunAs:
+  user: 568
+  group: 568
+
+prometheusStorage:
+  data:
+    type: ixVolume
+    hostPath: ''
+    datasetName: data
+  config:
+    type: ixVolume
+    hostPath: ''
+    datasetName: config

+ 239 - 0
charts/prometheus/1.0.0/questions.yaml

@@ -0,0 +1,239 @@
+groups:
+  - name: Prometheus Configuration
+    description: Configure Prometheus
+  - name: User and Group Configuration
+    description: Configure User and Group for Prometheus
+  - name: Network Configuration
+    description: Configure Network for Prometheus
+  - name: Storage Configuration
+    description: Configure Storage for Prometheus
+  - name: Resources Configuration
+    description: Configure Resources for Prometheus
+
+portals:
+  web_portal:
+    protocols:
+      - "$kubernetes-resource_configmap_portal_protocol"
+    host:
+      - "$kubernetes-resource_configmap_portal_host"
+    ports:
+      - "$kubernetes-resource_configmap_portal_port"
+    path: "$kubernetes-resource_configmap_portal_path"
+
+questions:
+
+  - variable: prometheusConfig
+    label: ""
+    group: Prometheus Configuration
+    schema:
+      type: dict
+      attrs:
+        - variable: retentionTime
+          label: Retention Time
+          description: The time to retain data for. Use the format 15d, 6w, 10y, etc.
+          schema:
+            type: string
+            default: "15d"
+            required: true
+        - variable: retentionSize
+          label: Retention Size
+          description: The size to retain data for. Use the format 100MB, 10GB, etc.
+          schema:
+            type: string
+            default: ""
+        - variable: walCompression
+          label: WAL Compression
+          description: Compress the time series database write-ahead log.
+          schema:
+            type: boolean
+            default: true
+        - variable: additionalArgs
+          label: Additional Arguments
+          description: Configure additional arguments for Prometheus.
+          schema:
+            type: list
+            default: []
+            items:
+              - variable: arg
+                label: Argument
+                schema:
+                  type: string
+                  required: true
+                  default: ""
+        - variable: additionalEnvs
+          label: Additional Environment Variables
+          description: Configure additional environment variables for Prometheus.
+          schema:
+            type: list
+            default: []
+            items:
+              - variable: env
+                label: Environment Variable
+                schema:
+                  type: dict
+                  attrs:
+                    - variable: name
+                      label: Name
+                      schema:
+                        type: string
+                        required: true
+                    - variable: value
+                      label: Value
+                      schema:
+                        type: string
+                        required: true
+
+  - variable: prometheusRunAs
+    label: ""
+    group: User and Group Configuration
+    schema:
+      type: dict
+      attrs:
+        - variable: user
+          label: User ID
+          description: The user id that Prometheus will run as.
+          schema:
+            type: int
+            min: 1
+            default: 568
+            required: true
+        - variable: group
+          label: Group ID
+          description: The group id that Prometheus will run as.
+          schema:
+            type: int
+            min: 1
+            default: 568
+            required: true
+
+  - variable: prometheusNetwork
+    label: ""
+    group: Network Configuration
+    schema:
+      type: dict
+      attrs:
+        - variable: apiPort
+          label: API Port
+          description: The port for the Prometheus API (And WebUI).
+          schema:
+            type: int
+            default: 30000
+            min: 9000
+            max: 65535
+            required: true
+        - variable: hostNetwork
+          label: Host Network
+          description: |
+            Bind to the host network. It's recommended to keep this disabled.
+          schema:
+            type: boolean
+            default: false
+
+  - variable: prometheusStorage
+    label: ""
+    group: Storage Configuration
+    schema:
+      type: dict
+      attrs:
+        - variable: data
+          label: Prometheus Data Storage
+          description: The path to store Prometheus data/metrics.
+          schema:
+            type: dict
+            attrs:
+              - variable: type
+                label: Type
+                description: |
+                  ixVolume: Is dataset created automatically by the system.</br>
+                  Host Path: Is a path that already exists on the system.
+                schema:
+                  type: string
+                  required: true
+                  default: ixVolume
+                  enum:
+                    - value: hostPath
+                      description: Host Path (Path that already exists on the system)
+                    - value: ixVolume
+                      description: ixVolume (Dataset created automatically by the system)
+              - variable: datasetName
+                label: Dataset Name
+                schema:
+                  type: string
+                  show_if: [["type", "=", "ixVolume"]]
+                  required: true
+                  hidden: true
+                  immutable: true
+                  default: data
+                  $ref:
+                    - "normalize/ixVolume"
+              - variable: hostPath
+                label: Host Path
+                schema:
+                  type: hostpath
+                  show_if: [["type", "=", "hostPath"]]
+                  immutable: true
+                  required: true
+        - variable: config
+          label: Prometheus Config Storage
+          description: The path to store Prometheus config storage.
+          schema:
+            type: dict
+            attrs:
+              - variable: type
+                label: Type
+                description: |
+                  ixVolume: Is dataset created automatically by the system.</br>
+                  Host Path: Is a path that already exists on the system.
+                schema:
+                  type: string
+                  required: true
+                  default: ixVolume
+                  enum:
+                    - value: hostPath
+                      description: Host Path (Path that already exists on the system)
+                    - value: ixVolume
+                      description: ixVolume (Dataset created automatically by the system)
+              - variable: datasetName
+                label: Dataset Name
+                schema:
+                  type: string
+                  show_if: [["type", "=", "ixVolume"]]
+                  required: true
+                  hidden: true
+                  immutable: true
+                  default: config
+                  $ref:
+                    - "normalize/ixVolume"
+              - variable: hostPath
+                label: Host Path
+                schema:
+                  type: hostpath
+                  show_if: [["type", "=", "hostPath"]]
+                  immutable: true
+                  required: true
+
+  - variable: resources
+    label: ""
+    group: Resources Configuration
+    schema:
+      type: dict
+      attrs:
+        - variable: limits
+          label: Limits
+          schema:
+            type: dict
+            attrs:
+              - variable: cpu
+                label: CPU
+                description: CPU limit for Prometheus.
+                schema:
+                  type: string
+                  default: 4000m
+                  required: true
+              - variable: memory
+                label: Memory
+                description: Memory limit for Prometheus.
+                schema:
+                  type: string
+                  default: 8Gi
+                  required: true

+ 1 - 0
charts/prometheus/1.0.0/templates/NOTES.txt

@@ -0,0 +1 @@
+{{ include "ix.v1.common.lib.chart.notes" $ }}

+ 12 - 0
charts/prometheus/1.0.0/templates/_portal.tpl

@@ -0,0 +1,12 @@
+{{- define "prometheus.portal" -}}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: portal
+data:
+  path: /
+  port: {{ .Values.prometheusNetwork.apiPort | quote }}
+  protocol: http
+  host: $node_ip
+{{- end -}}

+ 120 - 0
charts/prometheus/1.0.0/templates/_prometheus.tpl

@@ -0,0 +1,120 @@
+{{- define "prometheus.workload" -}}
+workload:
+  prometheus:
+    enabled: true
+    primary: true
+    type: Deployment
+    podSpec:
+      hostNetwork: {{ .Values.prometheusNetwork.hostNetwork }}
+      containers:
+        prometheus:
+          enabled: true
+          primary: true
+          imageSelector: image
+          securityContext:
+            runAsUser: {{ .Values.prometheusRunAs.user }}
+            runAsGroup: {{ .Values.prometheusRunAs.group }}
+          args:
+            - --web.listen-address=0.0.0.0:{{ .Values.prometheusNetwork.apiPort }}
+            - --storage.tsdb.path=/data
+            - --config.file=/config/prometheus.yml
+            - --storage.tsdb.retention.time={{ .Values.prometheusConfig.retentionTime }}
+            {{ with .Values.prometheusConfig.retentionSize }}
+            - --storage.tsdb.retention.size={{ . }}
+            {{ end }}
+            {{ if .Values.prometheusConfig.walCompression }}
+            - --storage.tsdb.wal-compression
+            {{ end }}
+          {{ with .Values.prometheusConfig.additionalArgs }}
+          extraArgs:
+            {{ range $arg := . }}
+            - {{ $arg | quote }}
+            {{ end }}
+          {{ end }}
+          {{ with .Values.prometheusConfig.additionalEnvs }}
+          env:
+            {{ range $env := . }}
+            {{ $env.name }}: {{ $env.value }}
+            {{ end }}
+          {{ end }}
+          probes:
+            liveness:
+              enabled: true
+              type: http
+              port: {{ .Values.prometheusNetwork.apiPort }}
+              path: /-/healthy
+            readiness:
+              enabled: true
+              type: http
+              port: {{ .Values.prometheusNetwork.apiPort }}
+              path: /-/ready
+            startup:
+              enabled: true
+              type: http
+              port: {{ .Values.prometheusNetwork.apiPort }}
+              path: /-/ready
+      initContainers:
+      {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
+                                                        "UID" .Values.prometheusRunAs.user
+                                                        "GID" .Values.prometheusRunAs.group
+                                                        "type" "install") | nindent 8 }}
+        init-config:
+          enabled: true
+          type: init
+          imageSelector: image
+          resources:
+            limits:
+              cpu: 500m
+              memory: 256Mi
+          securityContext:
+            runAsUser: {{ .Values.prometheusRunAs.user }}
+            runAsGroup: {{ .Values.prometheusRunAs.group }}
+          command: sh
+          args:
+            - -c
+            - |
+              if [ ! -f /config/prometheus.yml ]; then
+                touch /config/prometheus.yml
+              fi
+{{/* Service */}}
+service:
+  prometheus:
+    enabled: true
+    primary: true
+    type: NodePort
+    targetSelector: prometheus
+    ports:
+      prometheus:
+        enabled: true
+        primary: true
+        port: {{ .Values.prometheusNetwork.apiPort }}
+        nodePort: {{ .Values.prometheusNetwork.apiPort }}
+        targetSelector: prometheus
+
+{{/* Persistence */}}
+persistence:
+  data:
+    enabled: true
+    type: {{ .Values.prometheusStorage.data.type }}
+    datasetName: {{ .Values.prometheusStorage.data.datasetName | default "" }}
+    hostPath: {{ .Values.prometheusStorage.data.hostPath | default "" }}
+    targetSelector:
+      prometheus:
+        prometheus:
+          mountPath: /data
+        01-permissions:
+          mountPath: /mnt/directories/data
+  config:
+    enabled: true
+    type: {{ .Values.prometheusStorage.config.type }}
+    datasetName: {{ .Values.prometheusStorage.config.datasetName | default "" }}
+    hostPath: {{ .Values.prometheusStorage.config.hostPath | default "" }}
+    targetSelector:
+      prometheus:
+        prometheus:
+          mountPath: /config
+        01-permissions:
+          mountPath: /mnt/directories/export
+        init-config:
+          mountPath: /config
+{{- end -}}

+ 9 - 0
charts/prometheus/1.0.0/templates/common.yaml

@@ -0,0 +1,9 @@
+{{- include "ix.v1.common.loader.init" . -}}
+
+{{/* Merge the templates with Values */}}
+{{- $_ := mustMergeOverwrite .Values (include "prometheus.workload" $ | fromYaml) -}}
+
+{{/* Create the configmap for portal manually*/}}
+{{- include "prometheus.portal" $ -}}
+
+{{- include "ix.v1.common.loader.apply" . -}}

+ 4 - 0
charts/prometheus/item.yaml

@@ -0,0 +1,4 @@
+icon_url: https://avatars.githubusercontent.com/u/3380462
+categories:
+  - metrics
+  - prometheus