From fc5caa4ec469388f2301282abb1eb64ecb2ea9ec Mon Sep 17 00:00:00 2001 From: sonicaj Date: Fri, 24 Mar 2023 21:32:53 +0000 Subject: [PATCH] Update catalog information --- catalog.json | 10 +- charts/diskoverdata/1.0.5/Chart.lock | 6 + charts/diskoverdata/1.0.5/Chart.yaml | 25 ++ charts/diskoverdata/1.0.5/README.md | 14 + charts/diskoverdata/1.0.5/app-readme.md | 1 + .../1.0.5/charts/common-2207.0.0.tgz | Bin 0 -> 4975 bytes charts/diskoverdata/1.0.5/ci/test-values.yaml | 30 ++ charts/diskoverdata/1.0.5/ix_values.yaml | 18 + charts/diskoverdata/1.0.5/questions.yaml | 322 ++++++++++++++++++ .../1.0.5/templates/_diskover.tpl | 35 ++ .../1.0.5/templates/deployment.yaml | 160 +++++++++ .../1.0.5/templates/diskover-secrets.yaml | 9 + .../templates/elastic_search_deployment.yaml | 46 +++ .../templates/elastic_search_service.yaml | 6 + .../1.0.5/templates/elasticsearch-secret.yaml | 9 + .../1.0.5/templates/initial_scripts.yaml | 270 +++++++++++++++ .../1.0.5/templates/pre-install-job.yaml | 31 ++ .../diskoverdata/1.0.5/templates/service.yaml | 10 + .../templates/tests/deployment-check.yaml | 21 ++ charts/diskoverdata/item.yaml | 5 + 20 files changed, 1023 insertions(+), 5 deletions(-) create mode 100644 charts/diskoverdata/1.0.5/Chart.lock create mode 100644 charts/diskoverdata/1.0.5/Chart.yaml create mode 100644 charts/diskoverdata/1.0.5/README.md create mode 100644 charts/diskoverdata/1.0.5/app-readme.md create mode 100644 charts/diskoverdata/1.0.5/charts/common-2207.0.0.tgz create mode 100644 charts/diskoverdata/1.0.5/ci/test-values.yaml create mode 100644 charts/diskoverdata/1.0.5/ix_values.yaml create mode 100644 charts/diskoverdata/1.0.5/questions.yaml create mode 100644 charts/diskoverdata/1.0.5/templates/_diskover.tpl create mode 100644 charts/diskoverdata/1.0.5/templates/deployment.yaml create mode 100644 charts/diskoverdata/1.0.5/templates/diskover-secrets.yaml create mode 100644 charts/diskoverdata/1.0.5/templates/elastic_search_deployment.yaml create mode 100644 charts/diskoverdata/1.0.5/templates/elastic_search_service.yaml create mode 100644 charts/diskoverdata/1.0.5/templates/elasticsearch-secret.yaml create mode 100644 charts/diskoverdata/1.0.5/templates/initial_scripts.yaml create mode 100644 charts/diskoverdata/1.0.5/templates/pre-install-job.yaml create mode 100644 charts/diskoverdata/1.0.5/templates/service.yaml create mode 100644 charts/diskoverdata/1.0.5/templates/tests/deployment-check.yaml create mode 100644 charts/diskoverdata/item.yaml diff --git a/catalog.json b/catalog.json index 7a9bbb6f37..649285719c 100644 --- a/catalog.json +++ b/catalog.json @@ -50,13 +50,13 @@ "healthy": true, "healthy_error": null, "location": "/__w/charts/charts/charts/diskoverdata", - "latest_version": "1.0.4", + "latest_version": "1.0.5", "latest_app_version": "2.0.1", - "latest_human_version": "2.0.1_1.0.4", - "last_update": "2022-07-28 21:12:09", + "latest_human_version": "2.0.1_1.0.5", + "last_update": "2023-03-24 21:32:23", "name": "diskoverdata", "recommended": false, - "title": "Diskoverdata", + "title": "Diskover Data", "icon_url": "http://www.diskoverdata.com/wp-content/uploads/2019/09/diskover.png" }, "plex": { @@ -125,7 +125,7 @@ "latest_version": "1.6.19", "latest_app_version": "25.0.4", "latest_human_version": "25.0.4_1.6.19", - "last_update": "2023-03-24 21:27:53", + "last_update": "2023-03-24 21:28:28", "name": "nextcloud", "recommended": false, "title": "Nextcloud", diff --git a/charts/diskoverdata/1.0.5/Chart.lock b/charts/diskoverdata/1.0.5/Chart.lock new file mode 100644 index 0000000000..e93f891ac9 --- /dev/null +++ b/charts/diskoverdata/1.0.5/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: file://../../../common/2207.0.0 + version: 2207.0.0 +digest: sha256:a301ba0f99ec1e08a60a7f0a0320aa02d225993572f2f056f09520f06df88b37 +generated: "2023-03-22T16:30:35.212843915Z" diff --git a/charts/diskoverdata/1.0.5/Chart.yaml b/charts/diskoverdata/1.0.5/Chart.yaml new file mode 100644 index 0000000000..6b3d4a9b9a --- /dev/null +++ b/charts/diskoverdata/1.0.5/Chart.yaml @@ -0,0 +1,25 @@ +name: diskoverdata +description: Diskover is used to monitor size/volumes of distributed dataset. +annotations: + title: Diskover Data +type: application +version: 1.0.5 +apiVersion: v2 +appVersion: "2.0.1" +kubeVersion: '>=1.16.0-0' +maintainers: + - name: truenas + url: https://www.truenas.com/ +dependencies: + - name: common + repository: file://../../../common/2207.0.0 + version: 2207.0.0 +home: https://github.com/diskoverdata/diskover-community +icon: http://www.diskoverdata.com/wp-content/uploads/2019/09/diskover.png +sources: + - https://github.com/diskoverdata/diskover-community + - https://github.com/truenas/charts/tree/master/library/ix-dev/charts/diskoverdata +keywords: + - storage + - monitoring + - management diff --git a/charts/diskoverdata/1.0.5/README.md b/charts/diskoverdata/1.0.5/README.md new file mode 100644 index 0000000000..efc6e80942 --- /dev/null +++ b/charts/diskoverdata/1.0.5/README.md @@ -0,0 +1,14 @@ +# DiskOverData + +DiskOver App for TrueNAS SCALE + +[Diskover](https://www.diskoverdata.com/) is a sustainable file management solution for your distributed data. + +# Introduction + +This chart is based on [diskoverdata](https://hub.docker.com/r/linuxserver/diskover) and +deployed on kubernetes via helm chart + +## Configuration + +Please refer to questions.yaml for a detailed overview on supported configurable values. diff --git a/charts/diskoverdata/1.0.5/app-readme.md b/charts/diskoverdata/1.0.5/app-readme.md new file mode 100644 index 0000000000..189190698d --- /dev/null +++ b/charts/diskoverdata/1.0.5/app-readme.md @@ -0,0 +1 @@ +DiskOver App for TrueNAS SCALE diff --git a/charts/diskoverdata/1.0.5/charts/common-2207.0.0.tgz b/charts/diskoverdata/1.0.5/charts/common-2207.0.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..9eeedab9cf14f032bab144fc0c6af29a4753ee90 GIT binary patch literal 4975 zcmV-#6Oim5iwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PH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fF}BtW0vKSQErV5-9Lz@hh=UcTwJkbRV86|drNqErK`U5YIGsV4Ne zCi11Y6_MGhG(T4@UAyC$THTF0gOpY3?-A|8=7^|GvNFN5kg+kL~&I8!6S?q|)!x>rCWhApm0}a14xs zjV&xsR$4D=P>W}+R4~uIz=eBJjfMO2pQ3Or1yZi}J+DMc9IoOecuia_-^=-S-bStb zhcld{WJ(#wpTCWj@_%qx|Ni&!V0-@SM#?kwt|Bp~dZE{FfO_AcFwRL56FP+qMK@@Q zMc8`=`fxn^K|ldwhLZ%Q2^*WeNQ6#*0FDzR$s8L!Qr<^2?mYvFr$(N4GL9$YBaY3N z9{+7O1idi8sII9%Z>CY}!|U+@+Y)eu-#|qMJN}3DL*>gyJ^qy$HwXruQP0srt=0nf6}%U+)>bN1U)+ zz{UAX(F-%qe#epQg(SwPZ@@YGy%)|!#A4k4%0*unEB|j_o}T~mGEC#AXk%sm&!8dy zgYEZUHdCI#EBjIZvt=LkSNAkPulM4`KTqFYUR?g;1m690aRp~ToxXhs7guok`W^i8 z^7Qf@yn7A*^%5>Fuil-$diC-g&M)4+JbU-**B38(=6Fpa0KtF%gp;(|{QvCCq|C%g zzwf>z5VJ`1CCf;pT~h^mt&eXN{bvehH-ro2m}fc9n9zCZstZ%j@=Pf&_X%P)B@v9V zyv5jj{N(08#DC6MYR`=oA@q7zghm(;Buodv%mbJ(^*XNW2<09)<)n{Twj{wV5?WzO zrA0Z8^9VzV2$h&3g*0M17F0HGk?XG~=R%*htdHR43qa9KJ7Wl@3?+(^F;-nUfBS3L z>pgo07gTZ<=Q?G_4yZZ&)@J4i*Xv@l;0z}j<^pbKB$`2lXmP5uWDw&yPFMyM-#W5# too=Kjs4*qG&LDvKECLU|1wFSd+p;a&vMtr}{{a91|NqRG7=Zwa006n_xwZfR literal 0 HcmV?d00001 diff --git a/charts/diskoverdata/1.0.5/ci/test-values.yaml b/charts/diskoverdata/1.0.5/ci/test-values.yaml new file mode 100644 index 0000000000..f0a9f45ca7 --- /dev/null +++ b/charts/diskoverdata/1.0.5/ci/test-values.yaml @@ -0,0 +1,30 @@ +environmentVariables: [] +extraAppVolumeMounts: [] +extraDataVolumeMounts: [] +web_port: 32000 +dnsConfig: + options: [] +emptyDirVolumes: true +appVolumeMounts: + config: + emptyDir: true + mountPath: /config + data: + emptyDir: true + mountPath: /data +elasticSearchAppVolumeMounts: + esdata: + emptyDir: true + mountPath: /usr/share/elasticsearch/data +ownerUID: 568 +ownerGID: 568 +username: "admin" +password: "admin" +host: "192.169.0.156" +hostNetwork: false +timezone: "America/Los_Angeles" +diskoverCredentials: + username: admin + password: admin +cronjobSchedule: "0 3 * * *" +es_user: elasticsearch diff --git a/charts/diskoverdata/1.0.5/ix_values.yaml b/charts/diskoverdata/1.0.5/ix_values.yaml new file mode 100644 index 0000000000..c79cb3020f --- /dev/null +++ b/charts/diskoverdata/1.0.5/ix_values.yaml @@ -0,0 +1,18 @@ +image: + pullPolicy: IfNotPresent + repository: linuxserver/diskover + tag: "2.0.1" + +elasticsearch: + image: + pullPolicy: IfNotPresent + repository: docker.elastic.co/elasticsearch/elasticsearch + tag: "7.5.2" + +python: + image: + pullPolicy: IfNotPresent + repository: python + tag: "3.10" + +es_user: elasticsearch diff --git a/charts/diskoverdata/1.0.5/questions.yaml b/charts/diskoverdata/1.0.5/questions.yaml new file mode 100644 index 0000000000..c30285208f --- /dev/null +++ b/charts/diskoverdata/1.0.5/questions.yaml @@ -0,0 +1,322 @@ +groups: + - name: "Configuration" + description: "Diskover application configuration" + - name: "Storage" + description: "Configure storage for Diskover" + - name: "Networking" + description: "Networking Configuration for Diskover" + - name: "Advanced DNS Settings" + description: "Configure DNS settings" + - name: "Resource Limits" + description: "Set CPU/memory limits for Kubernetes Pod" + +portals: + web_portal: + protocols: + - "http" + host: + - "$node_ip" + ports: + - "$variable-web_port" + path: "/" + +questions: + - variable: web_port + label: "Web Port for Diskover" + group: Networking + schema: + type: int + min: 8000 + max: 65535 + default: 22510 + required: true + + - variable: timezone + label: "Configure timezone" + group: "Configuration" + description: "Configure timezone for Diskover" + schema: + type: string + $ref: + - "definitions/timezone" + + - variable: dnsConfig + label: "DNS Configuration" + group: "Advanced DNS Settings" + schema: + type: dict + attrs: + - variable: options + label: "DNS Options" + schema: + type: list + items: + - variable: optionsEntry + label: "Option Entry Configuration" + schema: + type: dict + attrs: + - variable: name + label: "Option Name" + schema: + type: string + required: true + - variable: value + label: "Option Value" + schema: + type: string + required: true + + - variable: ownerUID + label: "Config folder's user id" + description: "Linuxserver uses this user id to configure config's folders permissions" + group: Configuration + schema: + type: int + default: 568 + min: 1 + max: 65535 + + - variable: ownerGID + label: "Config folder's group id" + description: "Linuxserver uses this group id to configure config's folders permissions" + group: Configuration + schema: + type: int + default: 568 + min: 1 + max: 65535 + + - variable: diskoverCredentials + description: "Configure Diskover Initial Password" + label: "Configure Diskover Initial Username and password" + group: "Configuration" + schema: + type: dict + required: true + additional_attrs: true + attrs: + - variable: username + label: "Username" + description: "UserName for Diskover User" + schema: + type: string + default: "admin" + required: true + - variable: password + label: "Password" + description: "Initial Password for Diskover User" + schema: + type: string + private: true + default: "changeme" + required: true + + - variable: environmentVariables + label: "Diskover Extra Environment" + group: "Configuration" + schema: + type: list + default: [] + items: + - variable: environmentVariable + label: "Environment Variable" + schema: + type: dict + attrs: + - variable: name + label: "Name" + schema: + type: string + - variable: value + label: "Value" + schema: + type: string + + - variable: cronjobSchedule + description: "Cronjobs Consist on 5 values in this specific format 'Minute Hour Day Month Week'" + label: "Define cronjob schedule for diskover" + group: "Configuration" + schema: + type: string + default: "0 3 * * *" + + - variable: appVolumeMounts + label: "Diskover Storage" + group: "Storage" + schema: + type: dict + attrs: + - variable: config + label: "Storage Volume for Configuration" + schema: + type: dict + attrs: + - variable: datasetName + label: "Configuration Storage Volume Dataset Name" + schema: + type: string + hidden: true + $ref: + - "normalize/ixVolume" + show_if: [["hostPathEnabled", "=", false]] + default: "ix-config" + editable: false + - variable: mountPath + label: "Configuration Storage Mount Path" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + hidden: true + editable: true + default: "/config" + - variable: hostPathEnabled + label: "Enable Custom Host Path for Diskover Configuration Storage Volume" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hostPath + label: "Host Path for Diskover Configuration Storage Volume" + schema: + type: hostpath + required: true + - variable: data + label: "Storage Volume for Data" + schema: + type: dict + attrs: + - variable: datasetName + label: "Configuration Storage Volume Dataset Name" + schema: + type: string + hidden: true + $ref: + - "normalize/ixVolume" + show_if: [["hostPathEnabled", "=", false]] + default: "ix-data" + editable: false + - variable: mountPath + label: "Configuration Storage Mount Path" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + hidden: true + editable: true + default: "/data" + - variable: hostPathEnabled + label: "Enable Custom Host Path for Diskover Data folder to monitor" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hostPath + label: "Host Path for Diskover Data folder to monitor" + schema: + type: hostpath + required: true + + - variable: extraDataVolumeMounts + label: "Add Extra Host Paths For Diskover To Monitor" + group: "Storage" + schema: + type: list + items: + - variable: dataAppVolume + label: "Host Path Volume" + description: "Add extra Data Volumes for diskover to monitor" + schema: + type: dict + attrs: + - variable: mountPath + label: "Mount Path in Pod" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + required: true + - variable: hostPath + label: "Host Path" + description: "Host path" + schema: + type: hostpath + required: true + + - variable: extraAppVolumeMounts + label: "Extra Host Path Volumes" + group: "Storage" + schema: + type: list + items: + - variable: extraAppVolume + label: "Host Path Volume" + description: "Add an extra host path volume for Diskover application" + schema: + type: dict + attrs: + - variable: mountPath + label: "Mount Path in Pod" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + required: true + - variable: hostPath + label: "Host Path" + description: "Host path" + schema: + type: hostpath + required: true + + - variable: elasticSearchAppVolumeMounts + label: "elastic search Storage" + group: "Storage" + schema: + type: dict + hidden: true + attrs: + - variable: esdata + label: "Storage Volume for Configuration" + schema: + type: dict + attrs: + - variable: datasetName + label: "Configuration Storage Volume Dataset Name" + schema: + type: string + $ref: + - "normalize/ixVolume" + default: "ix-elasticsearch-data" + editable: false + - variable: mountPath + label: "Configuration Storage Mount Path" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + editable: false + default: "/usr/share/elasticsearch/data" + + - variable: enableResourceLimits + label: "Enable Pod resource limits" + group: "Resource Limits" + schema: + type: boolean + default: false + - variable: cpuLimit + label: "CPU Limit" + description: "CPU resource limit allow plain integer values with suffix m(milli) e.g 1000m, 100." + group: "Resource Limits" + schema: + type: string + show_if: [["enableResourceLimits", "=", true]] + valid_chars: "^\\d+(?:\\.\\d+(?!.*m$)|m?$)" + default: "4000m" + - variable: memLimit + label: "Memory Limit" + group: "Resource Limits" + description: "Memory limits is specified by number of bytes. Followed by quantity suffix like E,P,T,G,M,k and Ei,Pi,Ti,Mi,Gi,Ki can also be used. e.g 129e6, 129M, 128974848000m, 123Mi" + schema: + type: string + show_if: [["enableResourceLimits", "=", true]] + valid_chars: "^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$" + default: "8Gi" diff --git a/charts/diskoverdata/1.0.5/templates/_diskover.tpl b/charts/diskoverdata/1.0.5/templates/_diskover.tpl new file mode 100644 index 0000000000..12efc486ab --- /dev/null +++ b/charts/diskoverdata/1.0.5/templates/_diskover.tpl @@ -0,0 +1,35 @@ +{{- define "add.user" -}} + {{- $user := .Values.es_user -}} + {{- printf "adduser %s -D;" $user -}} +{{- end -}} + + +{{- define "change.user.permissions" -}} + {{- $user := .Values.es_user -}} + {{- $mountPath := .Values.elasticSearchAppVolumeMounts.esdata.mountPath -}} + {{- printf "chown -R %s:%s %s;" $user $user $mountPath -}} +{{- end -}} + + +{{- define "elasticsearch.IP" -}} + {{ $envList := (default list) }} + {{ $envList = mustAppend $envList (dict "name" "ES_HOST" "value" (printf "%s" (include "common.names.fullname" .))) }} + {{ $envList = mustAppend $envList (dict "name" "ES_PORT" "value" "9200") }} + {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) }} +{{- end -}} + + +{{- define "elasticsearch.credentials" -}} + {{ $envList := (default list) }} + {{ $envList = mustAppend $envList (dict "name" "ES_USER" "valueFromSecret" true "secretName" "elastic-search-credentials" "secretKey" "es-username") }} + {{ $envList = mustAppend $envList (dict "name" "ES_PASS" "valueFromSecret" true "secretName" "elastic-search-credentials" "secretKey" "es-password") }} + {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) }} +{{- end -}} + + +{{- define "config.file.path" -}} + {{ $envList := (default list) }} + {{ $envList = mustAppend $envList (dict "name" "DEST" "value" .mountPath) }} + {{ $envList = mustAppend $envList (dict "name" "FILE" "value" .configFile) }} + {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) }} +{{- end -}} diff --git a/charts/diskoverdata/1.0.5/templates/deployment.yaml b/charts/diskoverdata/1.0.5/templates/deployment.yaml new file mode 100644 index 0000000000..1069180497 --- /dev/null +++ b/charts/diskoverdata/1.0.5/templates/deployment.yaml @@ -0,0 +1,160 @@ +{{ include "common.storage.hostPathValidate" .Values }} +{{ $elastic_search := (. | mustDeepCopy) }} +{{ $_ := set $elastic_search "common" (dict "nameSuffix" "elasticsearch") }} + +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: {{ template "common.names.fullname" . }} + labels: + app: {{ template "common.names.name" . }} + chart: {{ template "common.names.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + rollme: {{ randAlphaNum 5 | quote }} +spec: + replicas: {{ (default 1 .Values.replicas) }} + strategy: + type: "Recreate" + selector: + matchLabels: + app: {{ template "common.names.name" . }} + release: {{ .Release.Name }} + template: + metadata: + name: {{ template "common.names.fullname" . }} + labels: + app: {{ template "common.names.name" . }} + release: {{ .Release.Name }} + {{- include "common.labels.selectorLabels" . | nindent 8 }} + annotations: {{ include "common.annotations" . | nindent 8 }} + spec: + initContainers: + - name: init-config + {{ include "common.containers.imageConfig" .Values.python.image | nindent 10 }} + command: ["python3", "/init_scripts/init_config.py"] + env: + {{ $envList := (default list .Values.environmentVariables) }} + {{ $envList = mustAppend $envList (dict "name" "TZ" "value" .Values.timezone) }} + {{ $envList = mustAppend $envList (dict "name" "DS_USER" "valueFromSecret" true "secretName" "diskover-credentials" "secretKey" "username") }} + {{ $envList = mustAppend $envList (dict "name" "DS_PASS" "valueFromSecret" true "secretName" "diskover-credentials" "secretKey" "password") }} + {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }} + {{ include "elasticsearch.IP" $elastic_search | nindent 12 }} + {{ include "elasticsearch.credentials" . | nindent 12 }} + {{ $configPath := (dict "mountPath" (printf "%s/diskover-web.conf.d/" .Values.appVolumeMounts.config.mountPath) "configFile" "Constants.php") }} + {{ include "config.file.path" $configPath | nindent 12 }} + + volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }} + - name: diskover-initial-scripts + mountPath: /init_scripts/ + - name: wait-es-search + {{ include "common.containers.imageConfig" .Values.image | nindent 10 }} + env: + {{ include "elasticsearch.IP" $elastic_search | nindent 12 }} + command: ["python3", "/init_scripts/wait_for_elastic_search.py"] + + volumeMounts: + - name: diskover-initial-scripts + mountPath: /init_scripts/ + - name: init-es-config + {{ include "common.containers.imageConfig" .Values.python.image | nindent 10 }} + command: ["python3", "/init_scripts/initial_es_config.py"] + env: + {{ $envListConfig := (default list .Values.environmentVariables) }} + {{ include "elasticsearch.IP" $elastic_search | nindent 12 }} + {{ include "elasticsearch.credentials" . | nindent 12 }} + {{ $configPathES := (dict "mountPath" (printf "%s/diskover.conf.d/diskover/" .Values.appVolumeMounts.config.mountPath) "configFile" "config.yaml") }} + {{ include "config.file.path" $configPathES | nindent 12 }} + {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envListConfig) | nindent 12 }} + + volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }} + - name: diskover-initial-scripts + mountPath: /init_scripts/ + + containers: + - name: {{ .Chart.Name }} + {{ include "common.resources.limitation" . | nindent 10 }} + {{ include "common.containers.imageConfig" .Values.image | nindent 10 }} + volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }} + - name: diskover-initial-scripts + mountPath: /init_scripts/ + {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} + - name: extrappvolume-{{ $index }} + mountPath: {{ $hostPathConfiguration.mountPath }} + {{ end }} + {{ range $index, $hostPathConfiguration := .Values.extraDataVolumeMounts }} + - name: extradatavolume-{{ $index }} + mountPath: {{ $hostPathConfiguration.mountPath }} + {{ end }} + + ports: + - name: web + containerPort: 80 + {{ $cronjobSchedule := .Values.cronjobSchedule }} + lifecycle: + postStart: + exec: + command: + - /bin/sh + - -c + - | + ./init_scripts/.default_crawler.sh /app/diskover/diskover.py /data; + {{ range $index, $hostPathConfiguration := .Values.extraDataVolumeMounts }} + ./init_scripts/.default_crawler.sh /app/diskover/diskover.py {{ $hostPathConfiguration.mountPath }}; + {{ end }} + {{ range $index, $hostPathConfiguration := .Values.extraDataVolumeMounts }} + echo "{{$cronjobSchedule}} python3 /app/diskover/diskover.py {{ $hostPathConfiguration.mountPath }}" >> /config/crontab; + {{ end }} + echo "{{.Values.cronjobSchedule}} python3 /app/diskover/diskover.py /data" >> /config/crontab; + crontab /config/crontab; + env: + {{ $envListDiskover := (default list .Values.environmentVariables) }} + {{ $envListDiskover = mustAppend $envListDiskover (dict "name" "PUID" "value" .Values.ownerUID) }} + {{ $envListDiskover = mustAppend $envListDiskover (dict "name" "PGID" "value" .Values.ownerGID) }} + {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envListDiskover) | nindent 12 }} + livenessProbe: + httpGet: + path: /login.php + port: 80 + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + successThreshold: 1 + readinessProbe: + httpGet: + path: /login.php + port: 80 + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + successThreshold: 2 + startupProbe: + httpGet: + path: /login.php + port: 80 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 2 + failureThreshold: 60 + successThreshold: 1 + +{{ include "common.networking.dnsConfiguration" .Values | nindent 6 }} + volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }} + {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} + - name: extrappvolume-{{ $index }} + hostPath: + path: {{ $hostPathConfiguration.hostPath }} + {{ end }} + {{ range $index, $hostPathConfiguration := .Values.extraDataVolumeMounts }} + - name: extradatavolume-{{ $index }} + hostPath: + path: {{ $hostPathConfiguration.hostPath }} + {{ end }} + + - name: diskover-initial-scripts + configMap: + defaultMode: 0700 + name: "diskover-initial-scripts" diff --git a/charts/diskoverdata/1.0.5/templates/diskover-secrets.yaml b/charts/diskoverdata/1.0.5/templates/diskover-secrets.yaml new file mode 100644 index 0000000000..e1dfb1010b --- /dev/null +++ b/charts/diskoverdata/1.0.5/templates/diskover-secrets.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Secret +metadata: + name: diskover-credentials + labels: {{ include "common.labels" . | nindent 4 }} +type: Opaque +data: + username: {{ .Values.diskoverCredentials.username | b64enc | quote }} + password: {{ .Values.diskoverCredentials.password | b64enc | quote }} diff --git a/charts/diskoverdata/1.0.5/templates/elastic_search_deployment.yaml b/charts/diskoverdata/1.0.5/templates/elastic_search_deployment.yaml new file mode 100644 index 0000000000..183225eabf --- /dev/null +++ b/charts/diskoverdata/1.0.5/templates/elastic_search_deployment.yaml @@ -0,0 +1,46 @@ +{{ $values := (. | mustDeepCopy) }} +{{ $_ := set $values "common" (dict "nameSuffix" "elasticsearch") }} +{{ include "common.deployment.common_config" $values | nindent 0 }} +spec: {{ include "common.deployment.common_spec" $values | nindent 2 }} + template: {{ include "common.deployment.pod.metadata" $values | nindent 4 }} + spec: + containers: + - name: {{ .Chart.Name }} + {{ include "common.containers.imageConfig" .Values.elasticsearch.image | nindent 10 }} + volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" (dict "appVolumeMounts" .Values.elasticSearchAppVolumeMounts ) | nindent 12 }} + ports: + - name: es-port + containerPort: 9200 + env: + {{ $envList := (default list .Values.environmentVariables) }} + {{ $envList = mustAppend $envList (dict "name" "discovery.type" "value" "single-node") }} + {{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 12 }} + livenessProbe: + httpGet: + path: / + port: 9200 + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + successThreshold: 1 + readinessProbe: + httpGet: + path: / + port: 9200 + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + successThreshold: 2 + startupProbe: + httpGet: + path: / + port: 9200 + initialDelaySeconds: 10 + periodSeconds: 5 + timeoutSeconds: 2 + failureThreshold: 60 + successThreshold: 1 +{{ include "common.networking.dnsConfiguration" .Values | nindent 6 }} + volumes: {{ include "common.storage.configureAppVolumes" (dict "appVolumeMounts" .Values.elasticSearchAppVolumeMounts "emptyDirVolumes" .Values.emptyDirVolumes "ixVolumes" .Values.ixVolumes) | nindent 8 }} diff --git a/charts/diskoverdata/1.0.5/templates/elastic_search_service.yaml b/charts/diskoverdata/1.0.5/templates/elastic_search_service.yaml new file mode 100644 index 0000000000..99a33d28bf --- /dev/null +++ b/charts/diskoverdata/1.0.5/templates/elastic_search_service.yaml @@ -0,0 +1,6 @@ +{{ $ports := list }} +{{ $ports = mustAppend $ports (dict "name" "es-port" "port" 9200 "targetPort" 9200) }} +{{ $values := (. | mustDeepCopy) }} +{{ $_ := set $values "common" (dict "nameSuffix" "elasticsearch") }} +{{ $_1 := set $values "commonService" (dict "type" "ClusterIP" "ports" $ports ) }} +{{ include "common.classes.service" $values }} diff --git a/charts/diskoverdata/1.0.5/templates/elasticsearch-secret.yaml b/charts/diskoverdata/1.0.5/templates/elasticsearch-secret.yaml new file mode 100644 index 0000000000..bb82255889 --- /dev/null +++ b/charts/diskoverdata/1.0.5/templates/elasticsearch-secret.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Secret +metadata: + name: elastic-search-credentials + labels: {{ include "common.labels" . | nindent 4 }} +type: Opaque +data: + es-username: {{ "elastic" | b64enc | quote }} + es-password: {{ "changeme" | b64enc | quote }} diff --git a/charts/diskoverdata/1.0.5/templates/initial_scripts.yaml b/charts/diskoverdata/1.0.5/templates/initial_scripts.yaml new file mode 100644 index 0000000000..f5edb47ea4 --- /dev/null +++ b/charts/diskoverdata/1.0.5/templates/initial_scripts.yaml @@ -0,0 +1,270 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: "diskover-initial-scripts" + annotations: + rollme: {{ randAlphaNum 5 | quote }} + +data: + wait_for_elastic_search.py: |- + # This Script Wait for elastic search to setup completely + import requests + import os + import time + timeout = 100 + while True: + try: + if timeout < 0: + print("timeout") + raise requests.exceptions.ConnectTimeout("Elasticsearch is not responding") + timeout -= 1 + response = requests.get(f"http://{os.environ['ES_HOST']}:{os.environ['ES_PORT']}") + if response.status_code == 200: + break + except requests.exceptions.ConnectTimeout as e: + print(e) + break + except requests.exceptions.ConnectionError: + print("Trying to connect to elastic search") + time.sleep(3) + + + .default_crawler.sh: |- + #!/bin/sh + while : + do + # this condition wait for the script to copy into the container . + if test -f "$1"; then + # Empty folders don't generate indices . if folder is empty a default file is generated + if ! [ "$(ls -A $2)" ]; then + echo "Dummy file created as empty dirs are rejected" > $2/diskover_test.txt; + fi + python3 $1 $2/; + break; + fi + sleep 5 + + done + + init_config.py: |- + import os + Config = f""" ['doc', 'docx', 'odt', 'pdf', 'tex', 'wpd', 'wks', 'txt', 'rtf', 'key', 'odp', 'pps', 'ppt', 'pptx', 'ods', 'xls', 'xlsm', 'xlsx'], + 'images' => ['ai', 'bmp', 'gif', 'ico', 'jpeg', 'jpg', 'png', 'ps', 'psd', 'psp', 'svg', 'tif', 'tiff', 'exr', 'tga'], + 'video' => ['3g2', '3gp', 'avi', 'flv', 'h264', 'm4v', 'mkv', 'qt', 'mov', 'mp4', 'mpg', 'mpeg', 'rm', 'swf', 'vob', 'wmv', 'ogg', 'ogv', 'webm'], + 'audio' => ['au', 'aif', 'aiff', 'cda', 'mid', 'midi', 'mp3', 'm4a', 'mpa', 'ogg', 'wav', 'wma', 'wpl'], + 'apps' => ['apk', 'exe', 'bat', 'bin', 'cgi', 'pl', 'gadget', 'com', 'jar', 'msi', 'py', 'wsf'], + 'programming' => ['c', 'cgi', 'pl', 'class', 'cpp', 'cs', 'h', 'java', 'php', 'py', 'sh', 'swift', 'vb'], + 'internet' => ['asp', 'aspx', 'cer', 'cfm', 'cgi', 'pl', 'css', 'htm', 'html', 'js', 'jsp', 'part', 'php', 'py', 'rss', 'xhtml'], + 'system' => ['bak', 'cab', 'cfg', 'cpl', 'cur', 'dll', 'dmp', 'drv', 'icns', 'ico', 'ini', 'lnk', 'msi', 'sys', 'tmp', 'vdi', 'raw'], + 'data' => ['csv', 'dat', 'db', 'dbf', 'log', 'mdb', 'sav', 'sql', 'tar', 'xml'], + 'disc' => ['bin', 'dmg', 'iso', 'toast', 'vcd', 'img'], + 'compressed' => ['7z', 'arj', 'deb', 'pkg', 'rar', 'rpm', 'tar', 'gz', 'z', 'zip'], + 'trash' => ['old', 'trash', 'tmp', 'temp', 'junk', 'recycle', 'delete', 'deleteme', 'clean', 'remove'] + ]; + + // extra fields for search results and view file/dir info pages + // key is description for field and value is ES field name + // Example: + //const EXTRA_FIELDS = [ + // 'Date Changed' => 'ctime' + //]; + const EXTRA_FIELDS = []; + + // Maximum number of indices to load by default, indices are loaded in order by creation date + // setting this too high can cause slow logins and other timeout issues + // This setting can bo overridden on indices page per user and stored in maxindex cookie + // If MAX_INDEX is set higher than maxindex browser cookie, the cookie will be set to this value + const MAX_INDEX = 250; + + // time in seconds for index info to be cached, clicking reload indices forces update + const INDEXINFO_CACHETIME = 600; + + // time in seconds to check Elasticsearch for new index info + const NEWINDEX_CHECKTIME = 10; + + // sqlite database file path + const DATABASE = '../diskoverdb.sqlite3'; + }}`}} + + """ + + os.makedirs(os.environ['DEST'], exist_ok=True) + path = os.path.join(os.environ['DEST'], os.environ['FILE']) + with open(path, 'w') as w: + w.write(Config) + + + initial_es_config.py: |- + import os + Config = f"""# diskover default/sample config file + # + # default search paths for config + # macOS: ~/.config/diskover and ~/Library/Application Support/diskover + # Other Unix: ~/.config/diskover and /etc/diskover + # Windows: %APPDATA%\diskover where the APPDATA environment variable falls back to %HOME%\AppData\Roaming if undefined + # + appName: diskover + #logLevel: WARN + #logLevel: DEBUG + logLevel: INFO + logToFile: False + #logToFile: True + logDirectory: /tmp/ + + diskover: + # max number of crawl threads + # a thread is created up to maxthreads for each directory at level 1 of tree dir arg + # set to a number or leave blank to auto set based on number of cpus + #maxthreads: 20 + maxthreads: + # block size used for du size + blocksize: 512 + excludes: + # directory names and absolute paths you want to exclude from crawl + # directory excludes uses python re.search for string search (regex) + # directory excludes are case-sensitive + # Examples: .* or .backup or .backup* or /dir/dirname + # to exclude none use empty list [] + dirs: [".*", ".snapshot", ".Snapshot", "~snapshot", "~Snapshot", ".zfs"] + #dirs: [] + # files you want to exclude from crawl + # can include wildcards (.*, *.doc or NULLEXT for files with no extension) + # file names are case-sensitive, extensions are not + files: [".*", "Thumbs.db", ".DS_Store", "._.DS_Store", ".localized", "desktop.ini"] + #files: [] + # exclude empty 0 byte files, set to True to exclude empty files or False to not exclude + emptyfiles: True + # exclude empty dirs, set to True to exclude empty dirs or False to not exclude + emptydirs: True + # exclude files smaller than min size in bytes + minfilesize: 1 + #minfilesize: 512 + # exclude files modified less than x days ago + minmtime: 0 + #minmtime: 30 + # exclude files modified more than x days ago + maxmtime: 36500 + # exclude files changed less than x days ago + minctime: 0 + # exclude files changed more than x days ago + maxctime: 36500 + # exclude files accessed less than x days ago + minatime: 0 + # exclude files accessed more than x days ago + maxatime: 36500 + includes: + # directory names and absolute paths you want to include (whitelist), case-sensitive, + # to include none use empty list [] + #dirs: [".recycle"] + dirs: [] + # files you want to include (whitelist), case-sensitive + files: [] + ownersgroups: + # control how owner (username) and group fields are stored for file and directory docs + # store uid and gid's instead of trying to get owner and group names + uidgidonly: False + # owner/group names contain domain name set to True + domain: False + # character separator used on cifs/nfs mounts to separte user/group and domain name, usually \ or @ + domainsep: \ + # if domain name comes first before character separator, set this to True, otherwise False + domainfirst: True + # when indexing owner and group fields, keep the domain name + keepdomain: False + replacepaths: + # translate path names set to True to enable or False to disable. + # Set to True if crawling in Windows to replace drive letters and \ with / + replace: False + #from: /mnt/ + #to: /vols/ + from: + to: + plugins: + # set to True to enable all plugins or False to disable all plugins + enable: False + # list of plugins (by name) to use for directories + dirs: ['unixperms'] + # list of plugins (by name) to use for files + files: ['unixperms'] + other: + # restore atime/mtime for files and dirs during crawl + # set to True or False, default False (useful for cifs which does not work with noatime mount option) + # for nfs, it's preferable to use mount options ro,noatime,nodiratime + restoretimes: False + + databases: + elasticsearch: + host: '{os.environ['ES_HOST']}' + port: {os.environ['ES_PORT']} + #user: elastic + #password: changeme + user: '{os.environ['ES_USER']}' + password: '{os.environ['ES_PASS']}' + # set https to True if using HTTP TLS/SSL or False if using http + # for AWS ES, you will most likely want to set this to True + # override with env var ES_HTTPS + https: False + # compress http data + # for AWS ES, you will most likely want to set this to True + httpcompress: False + # timeout for connection to ES (default is 10) + timeout: 30 + # number of connections kept open to ES when crawling (default is 10) + maxsize: 20 + # max retries for ES operations (default is 0) + maxretries: 10 + # wait for at least yellow status before bulk uploading (default is False), set to True if you want to wait + wait: False + # chunk size for ES bulk operations (default is 500) + chunksize: 1000 + # the below settings are to optimize ES for crawling + # index refresh interval (default is 1s), set to -1 to disable refresh during crawl (fastest performance but no index searches), after crawl is set back to 1s + indexrefresh: 30s + # transaction log flush threshold size (default 512mb) + translogsize: 1gb + # transaction log sync interval time (default 5s) + translogsyncint: 30s + # search scroll size (default 100 docs) + scrollsize: 1000 + """ + + os.makedirs(os.environ['DEST'], exist_ok=True) + path = os.path.join(os.environ['DEST'], os.environ['FILE']) + + with open(path, 'w') as w: + w.write(Config) diff --git a/charts/diskoverdata/1.0.5/templates/pre-install-job.yaml b/charts/diskoverdata/1.0.5/templates/pre-install-job.yaml new file mode 100644 index 0000000000..ef2e8691c4 --- /dev/null +++ b/charts/diskoverdata/1.0.5/templates/pre-install-job.yaml @@ -0,0 +1,31 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: "{{ template "common.names.fullname" . }}-preinstall-job" + labels: + app.kubernetes.io/managed-by: {{ .Release.Service | quote }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + helm.sh/chart: {{ template "common.names.chart" . }} + annotations: + "helm.sh/hook": pre-install + "helm.sh/hook-delete-policy": hook-succeeded +spec: + template: + metadata: + name: "{{ template "common.names.fullname" . }}-preinstall-hook" + labels: + app.kubernetes.io/managed-by: {{ .Release.Service | quote }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: {{ template "common.names.chart" . }} + spec: + restartPolicy: Never + containers: + - name: pre-install-job + image: "alpine:latest" + command: ["/bin/sh", "-c"] + args: + - {{ include "add.user" . }} + {{ include "change.user.permissions" . }} + volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" (dict "appVolumeMounts" .Values.elasticSearchAppVolumeMounts ) | nindent 12 }} + volumes: {{ include "common.storage.configureAppVolumes" (dict "appVolumeMounts" .Values.elasticSearchAppVolumeMounts "emptyDirVolumes" .Values.emptyDirVolumes "ixVolumes" .Values.ixVolumes) | nindent 8 }} diff --git a/charts/diskoverdata/1.0.5/templates/service.yaml b/charts/diskoverdata/1.0.5/templates/service.yaml new file mode 100644 index 0000000000..ee91e81309 --- /dev/null +++ b/charts/diskoverdata/1.0.5/templates/service.yaml @@ -0,0 +1,10 @@ +{{ $svc := .Values.service }} +{{ $selectors := list }} +{{ $selectors = mustAppend $selectors (dict "key" "app" "value" (include "common.names.name" .) ) }} +{{ $selectors = mustAppend $selectors (dict "key" "release" "value" .Release.Name ) }} +{{ $ports := list }} +{{ $ports = mustAppend $ports (dict "name" "web" "port" .Values.web_port "nodePort" .Values.web_port "targetPort" 80) }} +{{ $params := . }} +{{ $_ := set $params "commonService" (dict "type" "NodePort" "ports" $ports ) }} +{{ $_1 := set .Values "extraSelectorLabels" $selectors }} +{{ include "common.classes.service" $params }} diff --git a/charts/diskoverdata/1.0.5/templates/tests/deployment-check.yaml b/charts/diskoverdata/1.0.5/templates/tests/deployment-check.yaml new file mode 100644 index 0000000000..7e888eb0b9 --- /dev/null +++ b/charts/diskoverdata/1.0.5/templates/tests/deployment-check.yaml @@ -0,0 +1,21 @@ +{{- $serviceName := (include "common.names.fullname" .) -}} +apiVersion: v1 +kind: Pod +metadata: + name: {{ .Release.Name }}-test-pod + labels: + app: {{ .Release.Name }} + release: {{ .Release.Name }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: test-curl + image: alpine/curl + imagePullPolicy: "IfNotPresent" + command: + - /bin/sh + - -ec + - | + curl --connect-timeout 5 --max-time 10 --retry 5 --retry-delay 15 --retry-max-time 90 --retry-all-errors -ksf http://{{ $serviceName }}:{{.Values.web_port}}/ + restartPolicy: Never diff --git a/charts/diskoverdata/item.yaml b/charts/diskoverdata/item.yaml new file mode 100644 index 0000000000..f021ada830 --- /dev/null +++ b/charts/diskoverdata/item.yaml @@ -0,0 +1,5 @@ +icon_url: http://www.diskoverdata.com/wp-content/uploads/2019/09/diskover.png +categories: +- storage +- monitoring +- management