Skip to content
This repository was archived by the owner on Apr 18, 2020. It is now read-only.

Commit

Permalink
added secrets to helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
EamonKeane committed Mar 28, 2018
1 parent c8f1f26 commit 451568a
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 6 deletions.
1 change: 0 additions & 1 deletion docker/php-fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ RUN chown www-data:www-data /var/www/${PROJECT}/storage/logs/laravel.log
RUN mkdir -p /var/www/${PROJECT}/storage
RUN chown -R www-data:www-data /var/www/${PROJECT}/storage


EXPOSE 9000

ENTRYPOINT ["./entrypoint.sh"]
Expand Down
35 changes: 35 additions & 0 deletions kubernetes/helm/laravel5/laravel5-env.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
APP_NAME=Laravel
APP_ENV=production
APP_KEY=base64:ecpmHfFhbsgCV6vrx6EB6A/yyEYulZ+hzK3WKlyyPXI=
APP_DEBUG=false
APP_LOG_LEVEL=debug
APP_URL=https://laravel2.squareroute.io

DB_CONNECTION=mysql
DB_HOST=mysql-mysql
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=root
DB_PASSWORD=imApMsfoDt

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=[email protected]
MAIL_FROM_NAME=administrator

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
35 changes: 35 additions & 0 deletions kubernetes/helm/laravel5/laravel5-seeder-env.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
APP_NAME=Laravel
APP_ENV=seeder
APP_KEY=base64:ecpmHfFhbsgCV6vrx6EB6A/yyEYulZ+hzK3WKlyyPXI=
APP_DEBUG=false
APP_LOG_LEVEL=debug
APP_URL=http://localhost:8000

DB_CONNECTION=mysql
DB_HOST=mysql-mysql
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=root
DB_PASSWORD=imApMsfoDt

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=[email protected]
MAIL_FROM_NAME=administrator

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
8 changes: 8 additions & 0 deletions kubernetes/helm/laravel5/templates/production-env-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: laravel5-env
type: Opaque
data:
.env: |-
{{ .Files.Get "laravel5-env.env" | indent 4 }}
9 changes: 9 additions & 0 deletions kubernetes/helm/laravel5/templates/seeder-env-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: laravel5-seeder-env
namespace: laravel
type: Opaque
data:
.env: |-
{{ .Files.Get "laravel5-seeder-env.env" | indent 4 }}
9 changes: 4 additions & 5 deletions kubernetes/scripts/install-scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ kubectl create secret generic --namespace ${namespace} laravel5-env --from-file=

kubectl create secret generic --namespace ${namespace} laravel5-env-seeder --from-file=/Users/Eamon/PhpstormProjects/laravel5-5-example/.env

kubectl apply -f /Users/Eamon/PhpstormProjects/laravel5-5-example/kubernetes/kubernetes-yaml/mysql-pvc.yaml

kubectl apply -f /Users/Eamon/PhpstormProjects/laravel5-5-example/kubernetes/kubernetes-yaml/mysql-pv.yaml

helm install stable/mysql --namespace ${namespace} --name mysql --set persistence.existingClaim="mysql-mysql"
# When no storage volume dynamic privsioner is available, PV and PVC need to be create separately for the mysql chart
#kubectl apply -f /Users/Eamon/PhpstormProjects/laravel5-5-example/kubernetes/kubernetes-yaml/mysql-pvc.yaml
#kubectl apply -f /Users/Eamon/PhpstormProjects/laravel5-5-example/kubernetes/kubernetes-yaml/mysql-pv.yaml
#helm install stable/mysql --namespace ${namespace} --name mysql --set persistence.existingClaim="mysql-mysql",mysqlRootPassword=imApMsfoDt,mysqlDatabase=homestead

helm install --namespace ${namespace} --name laravel5 kubernetes/helm/laravel5

Expand Down

0 comments on commit 451568a

Please sign in to comment.