From c3988e1aae30dc9f6cbceb9f83ed7bfb2741cfef Mon Sep 17 00:00:00 2001 From: sonicaj Date: Fri, 6 Aug 2021 18:57:09 +0500 Subject: [PATCH] Update charts train from test train --- charts/machinaris/1.0.0/.helmignore | 23 +++ charts/machinaris/1.0.0/Chart.yaml | 17 ++ charts/machinaris/1.0.0/README.md | 9 + charts/machinaris/1.0.0/app-readme.md | 4 + .../1.0.0/charts/common-2105.0.0.tgz | Bin 0 -> 4288 bytes charts/machinaris/1.0.0/ix_values.yaml | 5 + charts/machinaris/1.0.0/questions.yaml | 159 ++++++++++++++++++ charts/machinaris/1.0.0/requirements.lock | 6 + .../1.0.0/templates/deployment.yaml | 42 +++++ .../machinaris/1.0.0/templates/service.yaml | 6 + charts/machinaris/1.0.0/test_values.yaml | 14 ++ charts/machinaris/item.yaml | 4 + charts/machinaris/upgrade_info.json | 1 + charts/machinaris/upgrade_strategy | 25 +++ 14 files changed, 315 insertions(+) create mode 100644 charts/machinaris/1.0.0/.helmignore create mode 100644 charts/machinaris/1.0.0/Chart.yaml create mode 100755 charts/machinaris/1.0.0/README.md create mode 100644 charts/machinaris/1.0.0/app-readme.md create mode 100644 charts/machinaris/1.0.0/charts/common-2105.0.0.tgz create mode 100644 charts/machinaris/1.0.0/ix_values.yaml create mode 100644 charts/machinaris/1.0.0/questions.yaml create mode 100644 charts/machinaris/1.0.0/requirements.lock create mode 100644 charts/machinaris/1.0.0/templates/deployment.yaml create mode 100644 charts/machinaris/1.0.0/templates/service.yaml create mode 100644 charts/machinaris/1.0.0/test_values.yaml create mode 100644 charts/machinaris/item.yaml create mode 100644 charts/machinaris/upgrade_info.json create mode 100755 charts/machinaris/upgrade_strategy diff --git a/charts/machinaris/1.0.0/.helmignore b/charts/machinaris/1.0.0/.helmignore new file mode 100644 index 0000000000..a9fe727881 --- /dev/null +++ b/charts/machinaris/1.0.0/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +# OWNERS file for Kubernetes +OWNERS \ No newline at end of file diff --git a/charts/machinaris/1.0.0/Chart.yaml b/charts/machinaris/1.0.0/Chart.yaml new file mode 100644 index 0000000000..bbe91624b7 --- /dev/null +++ b/charts/machinaris/1.0.0/Chart.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +appVersion: v1.2.3 +dependencies: +- name: common + repository: file://../../../library/common/2105.0.0 + version: 2105.0.0 +description: Global, Versioned, peer-to-peer filesystem. +home: https://github.com/guydavis/machinaris +icon: https://raw.githubusercontent.com/guydavis/machinaris/main/web/static/favicon.ico +keywords: +- storage +- crypto +- blockchain +name: machinaris +sources: +- https://github.com/guydavis/machinaris +version: 1.0.0 diff --git a/charts/machinaris/1.0.0/README.md b/charts/machinaris/1.0.0/README.md new file mode 100755 index 0000000000..613aec890d --- /dev/null +++ b/charts/machinaris/1.0.0/README.md @@ -0,0 +1,9 @@ +Machinaris +===== + +[MACHINARIS](https://github.com/guydavis/machinaris) is an easy-to-use WebUI for Chia plotting and farming. Includes Chia, Plotman, MadMax, Chiadog, and Flax in a single Docker image. + +Introduction +------------ + +This chart bootstraps MACHINARIS deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. diff --git a/charts/machinaris/1.0.0/app-readme.md b/charts/machinaris/1.0.0/app-readme.md new file mode 100644 index 0000000000..0e815a115c --- /dev/null +++ b/charts/machinaris/1.0.0/app-readme.md @@ -0,0 +1,4 @@ +Machinaris +===== + +[MACHINARIS](https://github.com/guydavis/machinaris) is an easy-to-use WebUI for Chia plotting and farming. Includes Chia, Plotman, MadMax, Chiadog, and Flax in a single Docker image. diff --git a/charts/machinaris/1.0.0/charts/common-2105.0.0.tgz b/charts/machinaris/1.0.0/charts/common-2105.0.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..ef6f820efb63f7b71b04a313be6b82dee84585b7 GIT binary patch literal 4288 zcmV;x5I^r9iwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PH<$Z`-(*{j6VcR_)-%-HH5&lPm%Zu-PPcCTJ%Onr!bKEEWMR z(KZ{IR7uLIx0C(t7ko*SEI-mTZaXzUv=&7k9+Ky!a}Jr9O(u-CPsWJLXoe=~voBvd zolfVV-`D?lI-UCeonEK&tlRJGclrm1{ocW|PPf-T=stta6W}seav>3a)_L?;^~rrF z1!d$N=7KPK1k+xCvaEdU1_>51Cz;gG$B>c%M|=jcq81o34&_J%1CC9 z7745Pzkk@R@&7@;zvcgpluw`9FM|_J1Yma_?A8Y_+xPdur%$_(;31(HLPIQ3l|n+; zy}u7Ca-=l}iQmj5?WH2+_Zi2z3eS`1(TNC1LC zn&XTUYP3B{Q^(W52Jdk!1;{ayfH;PjVq&+%M&cEo6{Ccz$yGial8*)jfVm-l zfgQabLkNGG?*23ltFJAnsD#wA0~UhAfSktHvrJ>`x+qHt{!~kY@>D{&TCO$=)CxYn z>^A$&vAS&1|tnt%i7ECHbz zTjW{BxWow%>R4KT0fdV-w?=htS5AF3>q z|JHT#=m5Yf`M! ztotxBCgJ)%yV7+ZnT(a=B3}WtvpkD#^8w}*ODrP7+C{>F`V5}y(qNc2LYW|nMmX6W z%&M_Q=Lo6xH*)sMBLApWom+z4M*LO;Q(fevu`i)QA{sC2&&_l%N-(Nv5k86D+3*Se zC^@>SVQgAkZ;YFc_V}1?QA01=sR*=)Blt;#W%uY7&%7t?9)dE;Qv0>_Vk{}k46g+76();!Z1(M8GOi5N`^#fge=pm9tHovW_r54RFhOYAYg!FlnV@kO)$JF zq_^3tA;D>40(B{w5Q!6z4CI&y*cr_9KAv7&skVfUKx8;>MZx(HtWY;VVn!t*RM^Zu zT}LF`ku-$?hFmB-1t5*Q#dbMal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1C6Zy(BjmAB3D)kU=pXD>7jjhQf*=!@mtiZ1?~ zTuf_X!?d-)jwvoIT|j1aTJqB{7m!~QMU@1#aN|u+#!d4{CTFLF!;9jlT{hF$RUW~o z%9Ww!7>L`Y;-*zYFOjQ1GsqOz;yJ3}_(M)OP9QAynKB6i%dpblzm~4JsI>Vu&qrnm zk&ljA>|Q=<95ihjBS8`goA+HC<;9exrwYc=FJNH#jrE#%6+XHJkrY)0;9|Mw=3tqH zThGI9cDet~*@XPlfC)>S8t(>Ne4c)d16IFcsqd7WT8!5VhdH!Snl^Fw7m?}~qvp)o zr9viJJD;|;2!#Z<%b_H*q@S@Ug*L6orl(jRQ}NJ6YS8-YFWT2Ohkm%S-2NvYEvG!` z{g3sToB|Kz#feUO2O$ zn%}1kB~SY~X_p9h^S{DyLFdxasQPmq z#!CL*+pququfxvv{+ErE=WvOn#GGnJpP>M_8)FKCoTLe%BgjyEi$+*P!E?}ufyqT9bo4WDoFYl4*vOHx9?>Lt4it|JKksB556MTIn7{P!Z>5!;wXqtuWqg+<2ZN@_O`NjCs&XVE`n%8WLy7h&<~=)|M9l|*Hw&1ZS{|P z6jRzR0S!=mn`ba2`nX>t?y}%zG(fk(%ScYtZ^p?ec=`Xqb9je1VYz_w(=!o78E5Zt zEQ5$77`07v&fW*nRKzU7?Qfj*b+P>a_U!od_p@k{JjEC*<3F7_{_kwh|7@l_hu8Lx z`kgHMqkgJRHwc24FaL4;_Tv2F*CV+8?feQ(emj194d+*I@#Y$SKRdp-hU+)*UuSTB zadmzC`t{iLeK?c#2b&0mXL?tz3tj^ajmsNy{k& iFxMjT=zEZJ+p;a&vMt+EE&mDt0RR8cdYzpBdH?`mlXJfS literal 0 HcmV?d00001 diff --git a/charts/machinaris/1.0.0/ix_values.yaml b/charts/machinaris/1.0.0/ix_values.yaml new file mode 100644 index 0000000000..3312566406 --- /dev/null +++ b/charts/machinaris/1.0.0/ix_values.yaml @@ -0,0 +1,5 @@ +image: + pullPolicy: IfNotPresent + repository: ghcr.io/guydavis/machinaris + tag: v0.5.1 +updateStrategy: Recreate diff --git a/charts/machinaris/1.0.0/questions.yaml b/charts/machinaris/1.0.0/questions.yaml new file mode 100644 index 0000000000..f186d981ff --- /dev/null +++ b/charts/machinaris/1.0.0/questions.yaml @@ -0,0 +1,159 @@ +groups: + - name: "Networking" + description: "Configure Networking for Machinaris" + - name: "Machinaris Configuration" + description: "Machinaris configuration" + - name: "Storage" + description: "Configure Storage for Machinaris" + - name: "Machinaris Environment Variables" + description: "Set the environment that will be visible to the container" + +portals: + web_portal: + protocols: + - "http" + host: + - "$node_ip" + ports: + - "$variable-machinaris_ui_port" + +questions: + - variable: timezone + label: "Configure timezone" + group: "Machinaris Configuration" + description: "Configure timezone for machinaris" + schema: + type: string + $ref: + - "definitions/timezone" + - variable: machinaris_ui_port + label: "Machinaris Web UI" + group: "Networking" + description: "Web UI Port for Machinaris" + schema: + type: int + min: 9000 + max: 65535 + default: 9003 + - variable: appVolumeMounts + label: "Machinaris Storage" + group: "Storage" + schema: + type: dict + attrs: + - variable: config + label: "Configuration Volume" + schema: + type: dict + attrs: + - variable: datasetName + label: "Configuration Volume Dataset Name" + schema: + type: string + hidden: true + $ref: + - "normalize/ixVolume" + show_if: [["hostPathEnabled", "=", false]] + default: "config" + editable: false + - variable: mountPath + label: "Configuration Mount Path" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + hidden: true + editable: true + default: "/root/.chia" + - variable: hostPathEnabled + label: "Enable Custom Host Path for Machinaris Configuration Volume" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hostPath + label: "Host Path for Machinaris Configuration Volume" + schema: + type: hostpath + required: true + - variable: plots + label: "Plot Volume" + schema: + type: dict + attrs: + - variable: datasetName + label: "Plots Volume Name" + schema: + type: string + hidden: true + $ref: + - "normalize/ixVolume" + show_if: [["hostPathEnabled", "=", false]] + default: "plots" + editable: false + - variable: mountPath + label: "Plots Mount Path" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + hidden: true + editable: false + default: "/plots" + - variable: hostPathEnabled + label: "Enable Custom Host Path for Machinaris Plots Volume" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hostPath + label: "Host Path for Machinaris Plots Volume" + schema: + type: hostpath + required: true + + - variable: extraAppVolumeMounts + label: "Machinaris Extra Host Path Volumes" + group: "Storage" + schema: + type: list + items: + - variable: extraAppVolume + label: "Machinaris Host Path Volume" + description: "Add an extra host path volume for machinaris 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: environmentVariables + label: "Environment Variables for Machinaris" + group: "Machinaris Environment Variables" + 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 diff --git a/charts/machinaris/1.0.0/requirements.lock b/charts/machinaris/1.0.0/requirements.lock new file mode 100644 index 0000000000..eba13d88bf --- /dev/null +++ b/charts/machinaris/1.0.0/requirements.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: file://../../../library/common/2105.0.0 + version: 2105.0.0 +digest: sha256:11522ab36487826700d7ad0f86f713a4bb5d35248014bcef690fe94acbc09ef6 +generated: "2021-05-17T18:26:46.201544+05:00" diff --git a/charts/machinaris/1.0.0/templates/deployment.yaml b/charts/machinaris/1.0.0/templates/deployment.yaml new file mode 100644 index 0000000000..60aceb7326 --- /dev/null +++ b/charts/machinaris/1.0.0/templates/deployment.yaml @@ -0,0 +1,42 @@ +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: {{ template "common.names.fullname" . }} + labels: {{ include "common.labels" . | nindent 4 }} +spec: + strategy: + type: {{ .Values.updateStrategy }} + selector: + matchLabels: {{ include "common.labels.selectorLabels" . | nindent 6 }} + template: + metadata: + name: {{ template "common.names.fullname" . }} + labels: {{ include "common.labels.selectorLabels" . | nindent 8 }} + spec: + # FIXME: Let's please remove hostnetwork when upstream hostport issue is sorted out with kube-router + hostNetwork: true + containers: + - name: {{ .Chart.Name }} + {{ include "common.containers.imageConfig" .Values.image | nindent 10 }} + volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }} + {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} + - name: extrappvolume-{{ $index }} + mountPath: {{ $hostPathConfiguration.mountPath }} + {{ end }} + ports: + - name: chia-network + protocol: TCP + containerPort: 8444 + hostPort: 8444 + - name: machinaris-ui + protocol: TCP + containerPort: 8926 + {{ $envList := (default list .Values.environmentVariables) }} + {{ $envList = mustAppend $envList (dict "name" "TZ" "value" $.Values.timezone) }} + {{ include "common.containers.allEnvironmentVariables" (dict "environmentVariables" $envList) | nindent 10 }} + volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }} + {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} + - name: extrappvolume-{{ $index }} + hostPath: + path: {{ $hostPathConfiguration.hostPath }} + {{ end }} diff --git a/charts/machinaris/1.0.0/templates/service.yaml b/charts/machinaris/1.0.0/templates/service.yaml new file mode 100644 index 0000000000..bc10f57869 --- /dev/null +++ b/charts/machinaris/1.0.0/templates/service.yaml @@ -0,0 +1,6 @@ +{{ $svc := .Values }} +{{ $ports := list }} +{{ $ports = mustAppend $ports (dict "name" "pms" "port" $svc.machinaris_ui_port "nodePort" $svc.machinaris_ui_port "targetPort" "machinaris-ui") }} +{{ $params := . }} +{{ $_ := set $params "commonService" (dict "ports" $ports "type" "NodePort" ) }} +{{ include "common.classes.service" $params }} diff --git a/charts/machinaris/1.0.0/test_values.yaml b/charts/machinaris/1.0.0/test_values.yaml new file mode 100644 index 0000000000..baead8e556 --- /dev/null +++ b/charts/machinaris/1.0.0/test_values.yaml @@ -0,0 +1,14 @@ +appVolumeMounts: + config: + emptyDir: true + mountPath: /data + plots: + emptyDir: true + mountPath: /plots +timezone: 'America/Edmonton' +image: + pullPolicy: IfNotPresent + repository: ghcr.io/guydavis/machinaris + tag: v0.5.1 +updateStrategy: Recreate +machinaris_ui_port: 9003 diff --git a/charts/machinaris/item.yaml b/charts/machinaris/item.yaml new file mode 100644 index 0000000000..26ee7a8040 --- /dev/null +++ b/charts/machinaris/item.yaml @@ -0,0 +1,4 @@ +categories: + - storage + - crypto +icon_url: https://raw.githubusercontent.com/guydavis/machinaris/main/web/static/favicon.ico diff --git a/charts/machinaris/upgrade_info.json b/charts/machinaris/upgrade_info.json new file mode 100644 index 0000000000..f22ddd1aee --- /dev/null +++ b/charts/machinaris/upgrade_info.json @@ -0,0 +1 @@ +{"filename": "ix_values.yaml", "keys": ["image"], "test_filename": "test_values.yaml"} diff --git a/charts/machinaris/upgrade_strategy b/charts/machinaris/upgrade_strategy new file mode 100755 index 0000000000..6b95867d8d --- /dev/null +++ b/charts/machinaris/upgrade_strategy @@ -0,0 +1,25 @@ +#!/usr/bin/python3 +import json +import sys + +from catalog_update.upgrade_strategy import semantic_versioning + + +def newer_mapping(image_tags): + key = list(image_tags.keys())[0] + tags = {t.strip('v').replace('_', '.'): t for t in image_tags[key]} + version = semantic_versioning(image_tags[key]) + if not version: + return {} + + return { + 'tags': {key: tags[version]}, + 'app_version': tags[version], + } + + +if __name__ == '__main__': + if len(sys.argv) != 2: + exit(1) + + print(json.dumps(newer_mapping(json.loads(sys.argv[1]))))