forked from sclorg/nodejs-ex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jim Minter
committed
Sep 14, 2017
1 parent
44abae3
commit d6a27c2
Showing
8 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |