Skip to content

Commit

Permalink
Updated yaml files whilst building helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
saintdle committed Nov 12, 2021
1 parent 1c73cfc commit 82ada38
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 10 deletions.
13 changes: 12 additions & 1 deletion README.md
Expand Up @@ -10,14 +10,25 @@ ServiceType: LoadBalancer must be available for external connectivity to the Pac

## Install

### Using Helm to install
````
kubectl create namespace pacman
helm repo add veducate https://saintdle.github.io/helm-charts/
helm install pacman veducate/pacman -n pacman
# You can see the available values by running
helm show values veducate/pacman
````
### Using a Script for installation
Clone repo and run ```chmod +X pacman-install.sh``` and then run file ```./pacman-install.sh```

or the following steps:

kubectl create namespace pacman
kubectl create -n pacman -f pacman-tanzu/

## Uninstall
#### Uninstall
Run file `./pacman-uninstall.sh`. This will delete all objects created by `./pacman-install.sh`

Alternatively, run `./pacman-uninstall.sh keeppvc`. This will delete all objects except for the pacman namespace and the persistent volume claim. You can use this to demonstrate persistence of the MongoDB data by installing, playing a game and recording a high score, then unininstalling with the `keeppvc` argument. You can then run the installation again and the high score will persist.
Expand Down
7 changes: 1 addition & 6 deletions deployments/mongo-deployment.yaml
Expand Up @@ -39,7 +39,6 @@ spec:
schedulerName: default-scheduler
securityContext:
fsGroup: 1001
serviceAccount: default
serviceAccountName: default
terminationGracePeriodSeconds: 30
volumes:
Expand Down Expand Up @@ -83,8 +82,4 @@ spec:
containerPort: 27017
volumeMounts:
- name: mongo-db
mountPath: /bitnami/mongodb/
volumes:
- name: mongo-db
persistentVolumeClaim:
claimName: mongo-storage
mountPath: /bitnami/mongodb/
8 changes: 8 additions & 0 deletions deployments/pacman-deployment.yaml
Expand Up @@ -23,6 +23,14 @@ spec:
- containerPort: 8080
name: http-server
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
env:
- name: MONGO_SERVICE_HOST
value: mongo
Expand Down
Empty file modified pacman-install.sh 100644 → 100755
Empty file.
4 changes: 1 addition & 3 deletions security/secret.yaml
Expand Up @@ -10,6 +10,4 @@ data:
database-admin-password: Y2x5ZGU=
database-name: cGFjbWFu
database-password: cGlua3k=
database-user: Ymxpbmt5
keyfile-value: cjNkaDR0Cg==
---
database-user: Ymxpbmt5

0 comments on commit 82ada38

Please sign in to comment.