From e79441688b8d40a3ce0d4fc50ac670ab62c0bb12 Mon Sep 17 00:00:00 2001 From: ducoterra Date: Sat, 28 Aug 2021 11:07:28 -0400 Subject: [PATCH] add testapp --- README.md | 10 ++++++++ charts/testapp/0.1.0/.helmignore | 23 +++++++++++++++++ charts/testapp/0.1.0/Chart.yaml | 24 ++++++++++++++++++ charts/testapp/0.1.0/README.md | 3 +++ charts/testapp/0.1.0/app-readme.md | 3 +++ charts/testapp/0.1.0/ix_values.yaml | 7 ++++++ charts/testapp/0.1.0/questions.yaml | 10 ++++++++ .../testapp/0.1.0/templates/deployment.yaml | 25 +++++++++++++++++++ charts/testapp/0.1.0/values.yaml | 7 ++++++ charts/testapp/item.yaml | 3 +++ 10 files changed, 115 insertions(+) create mode 100644 README.md create mode 100644 charts/testapp/0.1.0/.helmignore create mode 100644 charts/testapp/0.1.0/Chart.yaml create mode 100644 charts/testapp/0.1.0/README.md create mode 100644 charts/testapp/0.1.0/app-readme.md create mode 100644 charts/testapp/0.1.0/ix_values.yaml create mode 100644 charts/testapp/0.1.0/questions.yaml create mode 100644 charts/testapp/0.1.0/templates/deployment.yaml create mode 100644 charts/testapp/0.1.0/values.yaml create mode 100644 charts/testapp/item.yaml diff --git a/README.md b/README.md new file mode 100644 index 0000000..b858b9a --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# Charts + +A collection of helm charts for ducoterra.net + +## Adding a chart + +1. Create a folder with the name of your desired chart in `charts` +2. Copy the chart contents in with `rsync -r ../app/chart/ charts/app/` +3. Copy the README into the charts folder with `cp ../app/README.md charts/app/` +4. Create a "default_values.yaml" with `cp charts/app//values.yaml charts/app//default_values.yaml` diff --git a/charts/testapp/0.1.0/.helmignore b/charts/testapp/0.1.0/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/testapp/0.1.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 +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/testapp/0.1.0/Chart.yaml b/charts/testapp/0.1.0/Chart.yaml new file mode 100644 index 0000000..c3d6d31 --- /dev/null +++ b/charts/testapp/0.1.0/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: testapp +description: A test app for Truenas Scale + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/charts/testapp/0.1.0/README.md b/charts/testapp/0.1.0/README.md new file mode 100644 index 0000000..d3a8fa2 --- /dev/null +++ b/charts/testapp/0.1.0/README.md @@ -0,0 +1,3 @@ +# Truenas Scale Test App + +For testing truenas scale deploys diff --git a/charts/testapp/0.1.0/app-readme.md b/charts/testapp/0.1.0/app-readme.md new file mode 100644 index 0000000..aa144bc --- /dev/null +++ b/charts/testapp/0.1.0/app-readme.md @@ -0,0 +1,3 @@ +# Truenas Scale Test App + +An app to test deployment of Truenas Scale kubernetes apps. diff --git a/charts/testapp/0.1.0/ix_values.yaml b/charts/testapp/0.1.0/ix_values.yaml new file mode 100644 index 0000000..8c039e9 --- /dev/null +++ b/charts/testapp/0.1.0/ix_values.yaml @@ -0,0 +1,7 @@ +image: + repository: nginx + tag: latest + pullPolicy: IfNotPresent + +service: + internalPort: 80 diff --git a/charts/testapp/0.1.0/questions.yaml b/charts/testapp/0.1.0/questions.yaml new file mode 100644 index 0000000..cc3474e --- /dev/null +++ b/charts/testapp/0.1.0/questions.yaml @@ -0,0 +1,10 @@ +groups: + - name: "Test App Config" + description: "Configuration for the Truenas Scale test app" +questions: + - variable: APPNAME + description: "Name of the app" + group: "Test App Config" + label: "App Name" + schema: + type: string diff --git a/charts/testapp/0.1.0/templates/deployment.yaml b/charts/testapp/0.1.0/templates/deployment.yaml new file mode 100644 index 0000000..c6b6721 --- /dev/null +++ b/charts/testapp/0.1.0/templates/deployment.yaml @@ -0,0 +1,25 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: {{ $fullname := printf "%s-%s" .Release.Name .Chart.Name | trunc 63 | trimSuffix "-" }} + name: {{ $fullname }} + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" +spec: + selector: + matchLabels: + app: {{ $fullname }} + replicas: {{ default 1 .Values.replicaCount | int }} + template: + metadata: + labels: + app: {{ $fullname }} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.service.internalPort | int }} + env: + - name: APPNAME + value: "{{ .Values.APPNAME }}" diff --git a/charts/testapp/0.1.0/values.yaml b/charts/testapp/0.1.0/values.yaml new file mode 100644 index 0000000..8c039e9 --- /dev/null +++ b/charts/testapp/0.1.0/values.yaml @@ -0,0 +1,7 @@ +image: + repository: nginx + tag: latest + pullPolicy: IfNotPresent + +service: + internalPort: 80 diff --git a/charts/testapp/item.yaml b/charts/testapp/item.yaml new file mode 100644 index 0000000..8e9feaf --- /dev/null +++ b/charts/testapp/item.yaml @@ -0,0 +1,3 @@ +categories: + - generic +icon_url: "http://ix_url"