-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
9 changed files
with
158 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,23 @@ | ||
# 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 | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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,10 @@ | ||
apiVersion: v2 | ||
name: game-2048 | ||
description: Helm chart for Game 2048 | ||
type: application | ||
version: 0.1.0 | ||
appVersion: "1.0.0" | ||
maintainers: | ||
- name: devpro | ||
email: [email protected] | ||
home: https://github.com/devpro/helm-charts/tree/main/charts/game-2048 |
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,25 @@ | ||
# Helm chart for game 2048 | ||
|
||
This Helm chart will install Game 2048 on a Kubernetes cluster. | ||
|
||
## Usage | ||
|
||
[Helm](https://helm.sh) must be installed to use the chart from the command line. Here is the flow to have the application running in your Kubernetes cluster: | ||
|
||
```bash | ||
# adds the repo (if not already done) | ||
helm repo add devpro https://devpro.github.io/helm-charts | ||
|
||
# retrieves recent information from added repos | ||
helm repo update | ||
|
||
# installs the chart (this command can be ran multiple times) | ||
helm upgrade --install game-2048 devpro/game-2048 --create-namespace --namespace sample-apps | ||
``` | ||
|
||
Once done, uninstall the chart and clean-up the cluster: | ||
|
||
```bash | ||
helm delete game-2048 | ||
kubectl delete ns sample-apps | ||
``` |
Empty file.
Empty file.
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,31 @@ | ||
{{- $name := $.Values.name -}} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ $name }} | ||
labels: | ||
app: {{ $name }} | ||
app.kubernetes.io/name: {{ $name }} | ||
spec: | ||
replicas: {{ $.Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app: {{ $name }} | ||
app.kubernetes.io/name: {{ $name }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ $name }} | ||
app.kubernetes.io/name: {{ $name }} | ||
spec: | ||
containers: | ||
- name: webapp | ||
image: "{{ $.Values.image }}:{{ $.Values.tag }}" | ||
imagePullPolicy: Always | ||
ports: | ||
- name: http | ||
containerPort: 80 | ||
resources: | ||
{{- toYaml .Values.resources | nindent 12 }} | ||
|
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,32 @@ | ||
{{- if $.Values.ingress.enabled -}} | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ $.Values.name }}-ing | ||
{{- with $.Values.ingress.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if $.Values.ingress.className }} | ||
ingressClassName: {{ $.Values.ingress.className }} | ||
{{- end }} | ||
rules: | ||
- host: {{ $.Values.ingress.host }} | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: {{ $.Values.name }}-svc | ||
port: | ||
number: 80 | ||
{{- if $.Values.ingress.tls }} | ||
tls: | ||
- hosts: | ||
- {{ $.Values.ingress.host | quote }} | ||
secretName: {{ $.Values.ingress.tls.secretName }} | ||
{{- end }} | ||
{{- end }} |
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,18 @@ | ||
{{- $name := $.Values.name -}} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ $name }}-svc | ||
labels: | ||
app: {{ $name }} | ||
app.kubernetes.io/name: {{ $name }} | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- name: http | ||
port: 80 | ||
targetPort: 80 | ||
selector: | ||
app: {{ $name }} | ||
app.kubernetes.io/name: {{ $name }} |
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,19 @@ | ||
name: game-2048 | ||
image: alexwhen/docker-2048 | ||
tag: latest | ||
replicaCount: 1 | ||
ingress: | ||
enabled: false | ||
className: "nginx" | ||
host: "game-2048.dummy" | ||
annotations: {} | ||
# cert-manager.io/cluster-issuer: letsencrypt-prod | ||
tls: | ||
secretName: "game-2048-tls" | ||
resources: {} | ||
# limits: | ||
# cpu: 100m | ||
# memory: 128Mi | ||
# requests: | ||
# cpu: 100m | ||
# memory: 64Mi |