-
-
Save osowski/8609701c0abd4d13708bf6ebea9ea72c to your computer and use it in GitHub Desktop.
Creating your first Helm Chart
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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: lets-chat-app | |
labels: | |
app: lets-chat | |
tier: frontend | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: lets-chat | |
tier: frontend | |
spec: | |
containers: | |
- name: lets-chat-app | |
image: "sdelements/lets-chat:latest" | |
imagePullPolicy: IfNotPresent | |
ports: | |
- name: http | |
containerPort: 8080 | |
env: | |
- name: LCB_DATABASE_URI | |
value: mongodb://mongo/letschat | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: lets-chat-app | |
labels: | |
app: lets-chat | |
tier: frontend | |
spec: | |
type: NodePort | |
ports: | |
- port: 8080 | |
targetPort: 8080 | |
protocol: TCP | |
name: lets-chat-app-port | |
selector: | |
app: lets-chat | |
tier: frontend |
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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: lets-chat-mongo | |
labels: | |
app: lets-chat | |
tier: backend | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: lets-chat | |
tier: backend | |
spec: | |
containers: | |
- name: lets-chat-mongo | |
image: "mongo:3.5.11" | |
imagePullPolicy: IfNotPresent | |
ports: | |
- name: http | |
containerPort: 27017 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: mongo | |
labels: | |
tier: backend | |
spec: | |
type: ClusterIP | |
selector: | |
app: lets-chat | |
tier: backend | |
ports: | |
- port: 27017 | |
targetPort: 27017 | |
protocol: TCP | |
name: lets-chat-mongo-port |
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
apiVersion: v1 | |
description: A Helm chart for Kubernetes that creates a PoC-level deployment of Let's Chat and Mongo. | |
name: lets-chat | |
version: 0.1.0 | |
sources: | |
- https://github.com/sdelements/lets-chat | |
- https://hub.docker.com/r/library/mongo/ | |
maintainers: | |
- name: Rick Osowski | |
email: osowskeee@gmail.com |
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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: {{ template "fullname" . }} | |
labels: | |
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | |
spec: | |
replicas: {{ .Values.replicaCount }} | |
template: | |
metadata: | |
labels: | |
app: {{ template "fullname" . }} | |
tier: {{ .Values.service.tier }} | |
spec: | |
containers: | |
- name: {{ .Chart.Name }} | |
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | |
imagePullPolicy: {{ .Values.image.pullPolicy }} | |
ports: | |
- name: http | |
containerPort: {{ .Values.service.internalPort }} | |
env: | |
- name: LCB_DATABASE_URI | |
value: mongodb://{{ .Values.mongo.host }}/letschat | |
resources: | |
{{ toYaml .Values.resources | indent 10 }} |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: {{ template "fullname" . }} | |
labels: | |
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | |
spec: | |
type: {{ .Values.service.type }} | |
ports: | |
- port: {{ .Values.service.externalPort }} | |
targetPort: {{ .Values.service.internalPort }} | |
protocol: TCP | |
name: {{ .Values.service.name }} | |
selector: | |
app: {{ template "fullname" . }} | |
tier: {{ .Values.service.tier }} |
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
# Default values for lets-chat. | |
# This is a YAML-formatted file. | |
# Declare variables to be passed into your templates. | |
replicaCount: 1 | |
image: | |
repository: sdelements/lets-chat | |
tag: latest | |
pullPolicy: IfNotPresent | |
service: | |
name: lets-chat | |
tier: frontend | |
type: NodePort | |
protocol: TCP | |
internalPort: 8080 | |
externalPort: 8080 | |
mongo: | |
host: mongo-asdf | |
resources: | |
limits: | |
memory: 512Mi | |
requests: | |
memory: 128Mi |
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
apiVersion: v1 | |
description: A Helm chart for Kubernetes that creates a PoC-level deployment of Mongo. | |
name: mongo | |
version: 0.1.0 | |
sources: | |
- https://hub.docker.com/r/library/mongo/ | |
maintainers: | |
- name: Rick Osowski | |
email: rosowski@gmail.com |
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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: {{ template "fullname" . }} | |
labels: | |
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | |
spec: | |
replicas: {{ .Values.replicaCount }} | |
template: | |
metadata: | |
labels: | |
app: {{ template "fullname" . }} | |
tier: {{ .Values.service.tier }} | |
spec: | |
containers: | |
- name: {{ .Chart.Name }} | |
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | |
imagePullPolicy: {{ .Values.image.pullPolicy }} | |
ports: | |
- name: http | |
containerPort: {{ .Values.service.internalPort }} | |
resources: | |
{{ toYaml .Values.resources | indent 10 }} |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: {{ template "fullname" . }} | |
labels: | |
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | |
spec: | |
type: {{ .Values.service.type }} | |
ports: | |
- port: {{ .Values.service.externalPort }} | |
targetPort: {{ .Values.service.internalPort }} | |
protocol: TCP | |
name: {{ .Values.service.name }} | |
selector: | |
app: {{ template "fullname" . }} | |
tier: {{ .Values.service.tier }} |
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
# Default values for mongo. | |
# This is a YAML-formatted file. | |
# Declare variables to be passed into your templates. | |
replicaCount: 1 | |
image: | |
repository: mongo | |
tag: 3.5.11 | |
pullPolicy: IfNotPresent | |
service: | |
name: mongo | |
tier: backend | |
type: ClusterIP | |
protocol: TCP | |
externalPort: 27017 | |
internalPort: 27017 | |
resources: | |
limits: | |
memory: 512Mi | |
requests: | |
memory: 128Mi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment