Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add basic helm chart #138

Merged
merged 1 commit into from
Sep 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions helm/nodejs/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: nodejs
version: 0.1
description: An example Node.js application with no database. For more information about using this template, including OpenShift considerations, see https://github.com/openshift/nodejs-ex/blob/master/README.md.
keywords:
- quickstart
- nodejs
home: https://access.redhat.com
sources:
- https://github.com/openshift/nodejs-ex
3 changes: 3 additions & 0 deletions helm/nodejs/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The following service(s) have been created in your project: {{ .Values.name }}.

For more information about using this template, including OpenShift considerations, see https://github.com/openshift/nodejs-ex/blob/master/README.md.
38 changes: 38 additions & 0 deletions helm/nodejs/templates/buildconfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
name: {{ .Values.name | quote }}
annotations:
description: Defines how to build the application
spec:
source:
type: Git
git:
uri: {{ .Values.source_repository_url | quote }}
ref: {{ .Values.source_repository_ref | quote }}
contextDir: {{ .Values.context_dir | quote }}
strategy:
type: Source
sourceStrategy:
from:
kind: ImageStreamTag
namespace: {{ .Values.namespace | quote }}
name: nodejs:6
env:
- name: NPM_MIRROR
value: {{ .Values.npm_mirror | quote }}
output:
to:
kind: ImageStreamTag
name: {{ print .Values.name ":latest" | quote }}
triggers:
- type: ImageChange
- type: ConfigChange
- type: GitHub
github:
secret: {{ .Values.github_webhook_secret | default (randAlphaNum 40) | quote }}
- type: Generic
generic:
secret: {{ .Values.generic_webhook_secret | default (randAlphaNum 40) | quote }}
postCommit:
script: npm test
49 changes: 49 additions & 0 deletions helm/nodejs/templates/deploymentconfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
kind: DeploymentConfig
apiVersion: apps.openshift.io/v1
metadata:
name: {{ .Values.name | quote }}
annotations:
description: Defines how to deploy the application server
template.alpha.openshift.io/wait-for-ready: 'true'
spec:
strategy:
type: Rolling
triggers:
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- nodejs-example
from:
kind: ImageStreamTag
name: {{ print .Values.name ":latest" | quote }}
- type: ConfigChange
replicas: 1
selector:
name: {{ .Values.name | quote }}
template:
metadata:
name: {{ .Values.name | quote }}
labels:
name: {{ .Values.name | quote }}
spec:
containers:
- name: nodejs-example
image: " "
ports:
- containerPort: 8080
readinessProbe:
timeoutSeconds: 3
initialDelaySeconds: 3
httpGet:
path: "/"
port: 8080
livenessProbe:
timeoutSeconds: 3
initialDelaySeconds: 30
httpGet:
path: "/"
port: 8080
resources:
limits:
memory: {{ .Values.memory_limit | quote }}
6 changes: 6 additions & 0 deletions helm/nodejs/templates/imagestream.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: ImageStream
apiVersion: image.openshift.io/v1
metadata:
name: {{ .Values.name | quote }}
annotations:
description: Keeps track of changes in the application image
9 changes: 9 additions & 0 deletions helm/nodejs/templates/route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
kind: Route
apiVersion: route.openshift.io/v1
metadata:
name: {{ .Values.name | quote }}
spec:
host: {{ .Values.application_domain | quote }}
to:
kind: Service
name: {{ .Values.name | quote }}
13 changes: 13 additions & 0 deletions helm/nodejs/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
kind: Service
apiVersion: v1
metadata:
name: {{ .Values.name | quote }}
annotations:
description: Exposes and load balances the application pods
spec:
ports:
- name: web
port: 8080
targetPort: 8080
selector:
name: {{ .Values.name | quote }}
20 changes: 20 additions & 0 deletions helm/nodejs/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Name: The name assigned to all of the frontend objects defined in this template.
name: nodejs-example
# Namespace: The OpenShift Namespace where the ImageStream resides.
namespace: openshift
# Memory Limit: Maximum amount of memory the container can use.
memory_limit: 512Mi
# Git Repository URL: The URL of the repository with your application source code.
source_repository_url: https://github.com/openshift/nodejs-ex.git
# Git Reference: Set this to a branch name, tag or other ref of your repository if you are not using the default branch.
source_repository_ref:
# Context Directory: Set this to the relative path to your project if it is not in the root of your repository.
context_dir:
# Application Hostname: The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted.
application_domain:
# GitHub Webhook Secret: Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.
github_webhook_secret:
# Generic Webhook Secret: A secret string used to configure the Generic webhook.
generic_webhook_secret:
# Custom NPM Mirror URL: The custom NPM mirror URL
npm_mirror: