From 82ada3894af3f003f9a78a7fa65c39a1fb52d100 Mon Sep 17 00:00:00 2001 From: Dean Lewis <22192242+saintdle@users.noreply.github.com> Date: Fri, 12 Nov 2021 15:51:16 +0000 Subject: [PATCH] Updated yaml files whilst building helm chart --- README.md | 13 ++++++++++++- deployments/mongo-deployment.yaml | 7 +------ deployments/pacman-deployment.yaml | 8 ++++++++ pacman-install.sh | 0 security/secret.yaml | 4 +--- 5 files changed, 22 insertions(+), 10 deletions(-) mode change 100644 => 100755 pacman-install.sh diff --git a/README.md b/README.md index a1ce805..9594048 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,17 @@ 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: @@ -17,7 +28,7 @@ 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. diff --git a/deployments/mongo-deployment.yaml b/deployments/mongo-deployment.yaml index d9f32d5..c0db867 100644 --- a/deployments/mongo-deployment.yaml +++ b/deployments/mongo-deployment.yaml @@ -39,7 +39,6 @@ spec: schedulerName: default-scheduler securityContext: fsGroup: 1001 - serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 volumes: @@ -83,8 +82,4 @@ spec: containerPort: 27017 volumeMounts: - name: mongo-db - mountPath: /bitnami/mongodb/ - volumes: - - name: mongo-db - persistentVolumeClaim: - claimName: mongo-storage \ No newline at end of file + mountPath: /bitnami/mongodb/ \ No newline at end of file diff --git a/deployments/pacman-deployment.yaml b/deployments/pacman-deployment.yaml index fb60230..ced6fa7 100644 --- a/deployments/pacman-deployment.yaml +++ b/deployments/pacman-deployment.yaml @@ -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 diff --git a/pacman-install.sh b/pacman-install.sh old mode 100644 new mode 100755 diff --git a/security/secret.yaml b/security/secret.yaml index c907a55..4205093 100644 --- a/security/secret.yaml +++ b/security/secret.yaml @@ -10,6 +10,4 @@ data: database-admin-password: Y2x5ZGU= database-name: cGFjbWFu database-password: cGlua3k= - database-user: Ymxpbmt5 - keyfile-value: cjNkaDR0Cg== ---- + database-user: Ymxpbmt5 \ No newline at end of file