commit cc24361355d3fc23657ef533a2382bb7cd520c50 Author: ducoterra Date: Sat Aug 28 11:03:32 2021 -0400 init diff --git a/README.md b/README.md new file mode 100644 index 0000000..d3a8fa2 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Truenas Scale Test App + +For testing truenas scale deploys diff --git a/testapp/.helmignore b/testapp/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/testapp/.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/testapp/Chart.yaml b/testapp/Chart.yaml new file mode 100644 index 0000000..c3d6d31 --- /dev/null +++ b/testapp/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/testapp/app-readme.md b/testapp/app-readme.md new file mode 100644 index 0000000..aa144bc --- /dev/null +++ b/testapp/app-readme.md @@ -0,0 +1,3 @@ +# Truenas Scale Test App + +An app to test deployment of Truenas Scale kubernetes apps. diff --git a/testapp/questions.yaml b/testapp/questions.yaml new file mode 100644 index 0000000..1deffd3 --- /dev/null +++ b/testapp/questions.yaml @@ -0,0 +1,11 @@ +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 + \ No newline at end of file diff --git a/testapp/templates/deployment.yaml b/testapp/templates/deployment.yaml new file mode 100644 index 0000000..c6b6721 --- /dev/null +++ b/testapp/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/testapp/values.yaml b/testapp/values.yaml new file mode 100644 index 0000000..8c039e9 --- /dev/null +++ b/testapp/values.yaml @@ -0,0 +1,7 @@ +image: + repository: nginx + tag: latest + pullPolicy: IfNotPresent + +service: + internalPort: 80