-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
9756fa1
commit 195e4e6
Showing
18 changed files
with
115 additions
and
79 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
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
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 |
---|---|---|
@@ -1,28 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# apply namespaces | ||
kubectl apply -f ../k8s/namespace.yaml | ||
kubectl apply -f $(pwd)/k8s/namespace.yaml | ||
|
||
# apply secrets | ||
kubectl apply -f ../k8s/db/secret.yaml | ||
kubectl apply -f ../k8s/mailer/secret.yaml | ||
# kubectl apply -f $(pwd)/k8s/app/pullSecret.yaml | ||
kubectl apply -f $(pwd)/k8s/db/secret.yaml | ||
kubectl apply -f $(pwd)/k8s/mailer/secret.yaml | ||
|
||
# apply configmaps | ||
|
||
# apply pv | ||
kubectl apply -f ../k8s/db/pv.yaml | ||
kubectl apply -f $(pwd)/k8s/db/pv.yaml | ||
|
||
# apply pvc | ||
kubectl apply -f ../k8s/db/pvc.yaml | ||
kubectl apply -f $(pwd)/k8s/db/pvc.yaml | ||
|
||
# apply deployments | ||
kubectl apply -f ../k8s/app/deployment.yaml | ||
kubectl apply -f ../k8s/db/deployment.yaml | ||
kubectl apply -f ../k8s/mailer/deployment.yaml | ||
kubectl apply -f ../k8s/redis/deployment.yaml | ||
kubectl apply -f $(pwd)/k8s/app/deployment.yaml | ||
kubectl apply -f $(pwd)/k8s/db/deployment.yaml | ||
kubectl apply -f $(pwd)/k8s/mailer/deployment.yaml | ||
kubectl apply -f $(pwd)/k8s/redis/deployment.yaml | ||
|
||
# apply services | ||
kubectl apply -f ../k8s/app/service.yaml | ||
kubectl apply -f ../k8s/db/service.yaml | ||
kubectl apply -f ../k8s/mailer/service.yaml | ||
kubectl apply -f ../k8s/redis/service.yaml | ||
kubectl apply -f $(pwd)/k8s/app/service.yaml | ||
kubectl apply -f $(pwd)/k8s/db/service.yaml | ||
kubectl apply -f $(pwd)/k8s/mailer/service.yaml | ||
kubectl apply -f $(pwd)/k8s/redis/service.yaml |
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
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,8 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: lc-saas-app-pull-secret | ||
data: | ||
# kubectl create secret docker-registry --dry-run regsecret --docker-username=<USER> --docker-password=<PW> --docker-email=<Mail> --namespace=lc-saas-ns -o yaml | ||
.dockerconfigjson: | | ||
type: kubernetes.io/dockerconfigjson |
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 |
---|---|---|
@@ -1,11 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: lc-app-service | ||
name: lc-saas-app-service | ||
namespace: lc-saas-ns | ||
spec: | ||
selector: | ||
app: lc-app | ||
app: lc-saas-app | ||
type: ExternalName | ||
externalName: lc-saas-app-service.namespacename.svc.cluster.local | ||
ports: | ||
- port: 80 | ||
targetPort: 80 |
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 |
---|---|---|
@@ -1,49 +1,49 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: lc-db-deployment | ||
name: lc-saas-db-deployment | ||
labels: | ||
app: lc-db | ||
app: lc-saas-db | ||
namespace: lc-saas-ns | ||
spec: | ||
replicas: 1 | ||
replicas: 2 | ||
selector: | ||
matchLabels: | ||
app: lc-db | ||
app: lc-saas-db | ||
template: | ||
metadata: | ||
labels: | ||
app: lc-db | ||
app: lc-saas-db | ||
spec: | ||
containers: | ||
- name: lc-db | ||
- name: lc-saas-db | ||
image: postgres:15.3-alpine | ||
ports: | ||
- containerPort: 5432 | ||
volumeMounts: | ||
- mountPath: /var/lib/postgresql/data | ||
name: lc-db-pv | ||
name: postgres-data | ||
env: | ||
- name: POSTGRES_DB | ||
valueFrom: | ||
secretKeyRef: | ||
name: lc-db-secret | ||
name: lc-saas-db-secret | ||
key: postgres-db | ||
- name: POSTGRES_USER | ||
valueFrom: | ||
secretKeyRef: | ||
name: lc-db-secret | ||
name: lc-saas-db-secret | ||
key: postgres-user | ||
- name: POSTGRES_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: lc-db-secret | ||
name: lc-saas-db-secret | ||
key: postgres-password | ||
resources: | ||
limits: | ||
memory: "128Mi" | ||
cpu: "500m" | ||
volumes: | ||
- name: lc-db-pv | ||
- name: postgres-data | ||
persistentVolumeClaim: | ||
claimName: lc-db-pvc | ||
claimName: lc-saas-db-pvc |
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 |
---|---|---|
@@ -1,18 +1,15 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: lc-db-pv | ||
name: lc-saas-db-pv | ||
labels: | ||
app: postgres | ||
spec: | ||
capacity: | ||
storage: 5Gi | ||
volumeMode: Filesystem | ||
accessModes: | ||
- ReadWriteOnce | ||
persistentVolumeReclaimPolicy: Retain | ||
storageClassName: lc-db-sc | ||
mountOptions: | ||
- hard | ||
- nfsvers=4.1 | ||
nfs: | ||
path: /tmp | ||
server: 172.17.0.2 | ||
storageClassName: lc-saas-db-sc | ||
hostPath: | ||
path: /data/postgres |
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 |
---|---|---|
@@ -1,13 +1,12 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: lc-db-pvc | ||
name: lc-saas-db-pvc | ||
namespace: lc-saas-ns | ||
spec: | ||
storageClassName: lc-saas-db-sc | ||
resources: | ||
requests: | ||
storage: 5Gi | ||
volumeMode: Filesystem | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: lc-db-sc |
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
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
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 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: lc-saas-ingress | ||
labels: | ||
name: lc-saas-ingress | ||
spec: | ||
rules: | ||
- host: localhost | ||
http: | ||
paths: | ||
- pathType: Prefix | ||
path: "/" | ||
backend: | ||
service: | ||
name: lc-saas-app-service | ||
port: | ||
number: 80 |
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
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
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: lc-mailer-service | ||
name: lc-saas-mailer-service | ||
namespace: lc-saas-ns | ||
spec: | ||
selector: | ||
app: lc-mailer | ||
app: lc-saas-mailer | ||
ports: | ||
- port: 1080 | ||
targetPort: 1080 |
Oops, something went wrong.