This repository was archived by the owner on Apr 28, 2021. It is now read-only.
forked from containers101/demochat
-
Notifications
You must be signed in to change notification settings - Fork 6
adding helm chart for demochat #1
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,21 @@ | ||
# 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 | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj |
This file contains hidden or 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,4 @@ | ||
apiVersion: v1 | ||
description: demochat | ||
name: demochat | ||
version: 0.0.2 |
This file contains hidden or 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,61 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: deployment | ||
metadata: | ||
name: mattermost-app | ||
spec: | ||
replicas: 1 | ||
selector: | ||
app: mattermost-app | ||
template: | ||
metadata: | ||
labels: | ||
app: mattermost-app | ||
spec: | ||
containers: | ||
- name: app | ||
image: redspreadapps/mattermost-app:1 | ||
imagePullPolicy: Always | ||
volumeMounts: | ||
- name: localtime | ||
mountPath: /etc/localtime | ||
- name: pgauth | ||
mountPath: /etc/pgsecrets | ||
# Uncomment this for production use | ||
# | ||
# - name: assets | ||
# mountPath: /mattermost/data | ||
ports: | ||
- containerPort: 80 | ||
protocol: TCP | ||
- name: postgres | ||
image: redspreadapps/mattermost-db:1 | ||
imagePullPolicy: Always | ||
volumeMounts: | ||
- name: localtime | ||
mountPath: /etc/localtime | ||
- name: pgauth | ||
mountPath: /etc/secrets | ||
# Uncomment this for production use | ||
# - name: postgres | ||
# mountPath: /var/lib/postgresql/data | ||
env: | ||
- name: PGDATA | ||
value: /var/lib/postgresql/data/pgdata | ||
volumes: | ||
- name: localtime | ||
hostPath: | ||
path: /etc/localtime | ||
- name: pgauth | ||
secret: | ||
secretName: postgres-creds | ||
# Google Cloud Platform Persistent Volume Disk | ||
# - name: assets | ||
# gcePersistentDisk: | ||
# pdName: mattermost-assets | ||
# fsType: "ext4" | ||
# | ||
# - name: postgres | ||
# gcePersistentDisk: | ||
# pdName: mattermost-postgres | ||
# fsType: "ext4" | ||
restartPolicy: Always |
This file contains hidden or 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 @@ | ||
.git |
This file contains hidden or 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,16 @@ | ||
name: mongodb | ||
version: 0.4.18 | ||
appVersion: 3.4.10 | ||
description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications. | ||
keywords: | ||
- mongodb | ||
- database | ||
- nosql | ||
home: https://mongodb.org | ||
icon: https://bitnami.com/assets/stacks/mongodb/img/mongodb-stack-220x234.png | ||
sources: | ||
- https://github.com/bitnami/bitnami-docker-mongodb | ||
maintainers: | ||
- name: Bitnami | ||
email: containers@bitnami.com | ||
engine: gotpl |
This file contains hidden or 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,84 @@ | ||
# MongoDB | ||
|
||
[MongoDB](https://www.mongodb.com/) is a cross-platform document-oriented database. Classified as a NoSQL database, MongoDB eschews the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas, making the integration of data in certain types of applications easier and faster. | ||
|
||
## TL;DR; | ||
|
||
```bash | ||
$ helm install stable/mongodb | ||
``` | ||
|
||
## Introduction | ||
|
||
This chart bootstraps a [MongoDB](https://github.com/bitnami/bitnami-docker-mongodb) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. | ||
|
||
## Prerequisites | ||
|
||
- Kubernetes 1.4+ with Beta APIs enabled | ||
- PV provisioner support in the underlying infrastructure | ||
|
||
## Installing the Chart | ||
|
||
To install the chart with the release name `my-release`: | ||
|
||
```bash | ||
$ helm install --name my-release stable/mongodb | ||
``` | ||
|
||
The command deploys MongoDB on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. | ||
|
||
> **Tip**: List all releases using `helm list` | ||
|
||
## Uninstalling the Chart | ||
|
||
To uninstall/delete the `my-release` deployment: | ||
|
||
```bash | ||
$ helm delete my-release | ||
``` | ||
|
||
The command removes all the Kubernetes components associated with the chart and deletes the release. | ||
|
||
## Configuration | ||
|
||
The following tables lists the configurable parameters of the MongoDB chart and their default values. | ||
|
||
| Parameter | Description | Default | | ||
|----------------------------|-------------------------------------|----------------------------------------------------------| | ||
| `image` | MongoDB image | `bitnami/mongodb:{VERSION}` | | ||
| `imagePullPolicy` | Image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent`. | | ||
| `mongodbRootPassword` | MongoDB admin password | `nil` | | ||
| `mongodbUsername` | MongoDB custom user | `nil` | | ||
| `mongodbPassword` | MongoDB custom user password | `nil` | | ||
| `mongodbDatabase` | Database to create | `nil` | | ||
| `serviceType` | Kubernetes Service type | `ClusterIP` | | ||
| `persistence.enabled` | Use a PVC to persist data | `true` | | ||
| `persistence.storageClass` | Storage class of backing PVC | `nil` (uses alpha storage class annotation) | | ||
| `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` | | ||
| `persistence.size` | Size of data volume | `8Gi` | | ||
|
||
The above parameters map to the env variables defined in [bitnami/mongodb](http://github.com/bitnami/bitnami-docker-mongodb). For more information please refer to the [bitnami/mongodb](http://github.com/bitnami/bitnami-docker-mongodb) image documentation. | ||
|
||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, | ||
|
||
```bash | ||
$ helm install --name my-release \ | ||
--set mongodbRootPassword=secretpassword,mongodbUsername=my-user,mongodbPassword=my-password,mongodbDatabase=my-database \ | ||
stable/mongodb | ||
``` | ||
|
||
The above command sets the MongoDB `root` account password to `secretpassword`. Additionally it creates a standard database user named `my-user`, with the password `my-password`, who has access to a database named `my-database`. | ||
|
||
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, | ||
|
||
```bash | ||
$ helm install --name my-release -f values.yaml stable/mongodb | ||
``` | ||
|
||
> **Tip**: You can use the default [values.yaml](values.yaml) | ||
|
||
## Persistence | ||
|
||
The [Bitnami MongoDB](https://github.com/bitnami/bitnami-docker-mongodb) image stores the MongoDB data and configurations at the `/bitnami/mongodb` path of the container. | ||
|
||
The chart mounts a [Persistent Volume](http://kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning. |
This file contains hidden or 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,7 @@ | ||
MongoDB can be accessed via port 27017 on the following DNS name from within your cluster: | ||
{{ template "mongodb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local | ||
|
||
To connect to your database run the following command: | ||
|
||
kubectl run {{ template "mongodb.fullname" . }}-client --rm --tty -i --image bitnami/mongodb --command -- mongo --host {{ template "mongodb.fullname" . }} {{- if .Values.mongodbRootPassword }} -p {{ .Values.mongodbRootPassword }}{{- end -}} | ||
|
This file contains hidden or 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,16 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "mongodb.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). | ||
*/}} | ||
{{- define "mongodb.fullname" -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} |
This file contains hidden or 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,66 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "mongodb.fullname" . }} | ||
labels: | ||
app: {{ template "mongodb.fullname" . }} | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ template "mongodb.fullname" . }} | ||
spec: | ||
containers: | ||
- name: {{ template "mongodb.fullname" . }} | ||
image: "{{ .Values.image }}" | ||
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }} | ||
env: | ||
- name: MONGODB_ROOT_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ template "mongodb.fullname" . }} | ||
key: mongodb-root-password | ||
- name: MONGODB_USERNAME | ||
value: {{ default "" .Values.mongodbUsername | quote }} | ||
- name: MONGODB_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ template "mongodb.fullname" . }} | ||
key: mongodb-password | ||
- name: MONGODB_DATABASE | ||
value: {{ default "" .Values.mongodbDatabase | quote }} | ||
ports: | ||
- name: mongodb | ||
containerPort: 27017 | ||
livenessProbe: | ||
exec: | ||
command: | ||
- mongo | ||
- --eval | ||
- "db.adminCommand('ping')" | ||
initialDelaySeconds: 30 | ||
timeoutSeconds: 5 | ||
readinessProbe: | ||
exec: | ||
command: | ||
- mongo | ||
- --eval | ||
- "db.adminCommand('ping')" | ||
initialDelaySeconds: 5 | ||
timeoutSeconds: 1 | ||
volumeMounts: | ||
- name: data | ||
mountPath: /bitnami/mongodb | ||
resources: | ||
{{ toYaml .Values.resources | indent 10 }} | ||
volumes: | ||
- name: data | ||
{{- if .Values.persistence.enabled }} | ||
persistentVolumeClaim: | ||
claimName: {{ template "mongodb.fullname" . }} | ||
{{- else }} | ||
emptyDir: {} | ||
{{- end -}} |
This file contains hidden or 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,19 @@ | ||
{{- if .Values.persistence.enabled }} | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: {{ template "mongodb.fullname" . }} | ||
spec: | ||
accessModes: | ||
- {{ .Values.persistence.accessMode | quote }} | ||
resources: | ||
requests: | ||
storage: {{ .Values.persistence.size | quote }} | ||
{{- if .Values.persistence.storageClass }} | ||
{{- if (eq "-" .Values.persistence.storageClass) }} | ||
storageClassName: "" | ||
{{- else }} | ||
storageClassName: "{{ .Values.persistence.storageClass }}" | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
This file contains hidden or 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 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ template "mongodb.fullname" . }} | ||
labels: | ||
app: {{ template "mongodb.fullname" . }} | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
type: Opaque | ||
data: | ||
mongodb-root-password: {{ default "" .Values.mongodbRootPassword | b64enc | quote }} | ||
mongodb-password: {{ default "" .Values.mongodbPassword | b64enc | quote }} |
This file contains hidden or 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,17 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "mongodb.fullname" . }} | ||
labels: | ||
app: {{ template "mongodb.fullname" . }} | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
spec: | ||
type: {{ .Values.serviceType }} | ||
ports: | ||
- name: mongodb | ||
port: 27017 | ||
targetPort: mongodb | ||
selector: | ||
app: {{ template "mongodb.fullname" . }} |
This file contains hidden or 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 @@ | ||
## Bitnami MongoDB image version | ||
## ref: https://hub.docker.com/r/bitnami/mongodb/tags/ | ||
## | ||
image: bitnami/mongodb:3.4.10-r0 | ||
|
||
## Specify a imagePullPolicy | ||
## 'Always' if imageTag is 'latest', else set to 'IfNotPresent' | ||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images | ||
## | ||
# imagePullPolicy: | ||
|
||
## MongoDB admin password | ||
## ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#setting-the-root-password-on-first-run | ||
## | ||
# mongodbRootPassword: | ||
|
||
## MongoDB custom user and database | ||
## ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#creating-a-user-and-database-on-first-run | ||
## | ||
# mongodbUsername: | ||
# mongodbPassword: | ||
# mongodbDatabase: | ||
|
||
## Kubernetes service type | ||
serviceType: ClusterIP | ||
|
||
## Enable persistence using Persistent Volume Claims | ||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ | ||
## | ||
persistence: | ||
enabled: false | ||
## mongodb data Persistent Volume Storage Class | ||
## If defined, storageClassName: <storageClass> | ||
## If set to "-", storageClassName: "", which disables dynamic provisioning | ||
## If undefined (the default) or set to null, no storageClassName spec is | ||
## set, choosing the default provisioner. (gp2 on AWS, standard on | ||
## GKE, AWS & OpenStack) | ||
## | ||
# storageClass: "-" | ||
accessMode: ReadWriteOnce | ||
size: 8Gi | ||
|
||
## Configure resource requests and limits | ||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/ | ||
## | ||
resources: | ||
requests: | ||
memory: 256Mi | ||
cpu: 100m |
This file contains hidden or 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,4 @@ | ||
dependencies: | ||
- name: mongodb | ||
version: 0.4.18 | ||
repository: mongodb |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amir-codefresh can you explain why this deployment needed?
And its not used helm concepts at all, all values are hard-coded