Skip to content

Commit

Permalink
Migrated applications-onboarding chart. (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhgriffith-uofu authored May 10, 2022
1 parent 26142be commit 7c657e4
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 0 deletions.
9 changes: 9 additions & 0 deletions charts/applications-onboarding/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: "v1"
name: "applications-onboarding"
version: 1.0.2
appVersion: 1.0.0
description: "A simple tutorial for learning kubernetes and helm basics to begin contributing to SLATE"
maintainers:
- name: slateci
email: [email protected]
url: https://slateci.io/
16 changes: 16 additions & 0 deletions charts/applications-onboarding/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
The following outlines the basic format for the READMEs that should be in the folder for all stable applications in the slate catalog, written in github’s markup language.


#<Application name>

Put a short blurb explaining what this specific application is for other slate users who may not be familiar with the application.

#Installation

The actual format in this section can vary depending on the complexity of the installation for your specific application. It should at the bare minimum include the slate console commands needed to install the application. Also any extra steps and dependencies that come with your application should be found in this section, and split into subsections formatted as found below
###<subsection 1>
###<subsection 2>

#Configuration and usage

This section can very in format similarly to the above Installation section, but it should contain any special configuration options and any usage instructions for the application. Once again it should be split into subsections as above. This is also a very good place to provide a link to the documentation of the application.
28 changes: 28 additions & 0 deletions charts/applications-onboarding/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "applications-onboarding.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "applications-onboarding.fullname" -}}
{{- $name := default .Chart.Name .Values.Instance -}}
{{- if contains $name .Chart.Name -}}
{{- .Chart.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Chart.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "applications-onboarding.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
32 changes: 32 additions & 0 deletions charts/applications-onboarding/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "applications-onboarding.fullname" . }}
labels:
app: {{ template "applications-onboarding.name" . }}
chart: {{ template "applications-onboarding.chart" . }}
release: {{ .Release.Name }}
instance: {{ .Values.Instance }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ template "applications-onboarding.name" . }}
instance: {{ .Values.Instance }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "applications-onboarding.name" . }}
instance: {{ .Values.Instance }}
release: {{ .Release.Name }}
spec:
containers:
- name: applications-onboarding
image: slateci/applications-onboarding:latest
imagePullPolicy: Always
ports:
- name: http
containerPort: 80
protocol: TCP
restartPolicy: Always
20 changes: 20 additions & 0 deletions charts/applications-onboarding/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "applications-onboarding.fullname" . }}
labels:
app: {{ template "applications-onboarding.name" . }}
chart: {{ template "applications-onboarding.chart" . }}
release: {{ .Release.Name }}
instance: {{ .Values.Instance }}
spec:
type: NodePort
ports:
- port: 80
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "applications-onboarding.name" . }}
instance: {{ .Values.Instance }}
release: {{ .Release.Name }}
3 changes: 3 additions & 0 deletions charts/applications-onboarding/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# The label to apply to this deployment,
# used to manage multiple instances of the same application
Instance: default

0 comments on commit 7c657e4

Please sign in to comment.