| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272 |
- apiVersion: v1
- kind: Service
- metadata:
- name: gmus-backend
- spec:
- type: LoadBalancer
- selector:
- app: gmus-backend
- ports:
- - name: http
- protocol: TCP
- port: 8080
- targetPort: 8080
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: gmus-web
- spec:
- type: LoadBalancer
- selector:
- app: gmus-web
- ports:
- - name: http
- protocol: TCP
- port: 8080
- targetPort: 8080
- ---
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: gmus-backend
- labels:
- app: gmus-backend
- spec:
- replicas: 2
- selector:
- matchLabels:
- app: gmus-backend
- template:
- metadata:
- labels:
- app: gmus-backend
- spec:
- imagePullSecrets:
- - name: regcred
- containers:
- - name: gmus-backend
- image: docker.fela.space/gmus-backend:0
- ports:
- - containerPort: 8080
- envFrom:
- - configMapRef:
- name: gmus-backend
- env:
- - name: GO_ENV
- value: production
- - name: POSTGRES_PASSWORD
- valueFrom:
- secretKeyRef:
- name: postgres-pass
- key: password
- livenessProbe:
- initialDelaySeconds: 5
- periodSeconds: 5
- httpGet:
- path: /liveness
- port: 8080
- readinessProbe:
- initialDelaySeconds: 5
- periodSeconds: 5
- httpGet:
- path: /readiness
- port: 8080
- ---
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: gmus-web
- labels:
- app: gmus-web
- spec:
- replicas: 1
- selector:
- matchLabels:
- app: gmus-web
- template:
- metadata:
- labels:
- app: gmus-web
- spec:
- imagePullSecrets:
- - name: regcred
- containers:
- - name: gmus-web
- image: docker.fela.space/gmus-web:0
- ports:
- - containerPort: 8080
- envFrom:
- - configMapRef:
- name: gmus-web
- livenessProbe:
- initialDelaySeconds: 5
- periodSeconds: 5
- httpGet:
- path: /liveness
- port: 8080
- readinessProbe:
- initialDelaySeconds: 5
- periodSeconds: 5
- httpGet:
- path: /readiness
- port: 8080
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: gmus-database
- labels:
- app: gmus-database
- spec:
- ports:
- - port: 5432
- selector:
- app: gmus-database
- tier: postgres
- clusterIP: None
- ---
- apiVersion: storage.k8s.io/v1
- kind: StorageClass
- metadata:
- name: standard
- provisioner: kubernetes.io/no-provisioner
- volumeBindingMode: WaitForFirstConsumer
- ---
- apiVersion: v1
- kind: PersistentVolume
- metadata:
- name: postgres-pv-gmus
- labels:
- app: gmus-database
- spec:
- storageClassName: manual
- capacity:
- storage: 1Gi
- accessModes:
- - ReadWriteOnce
- hostPath:
- path: /var/local/gmus-database
- ---
- apiVersion: v1
- kind: PersistentVolumeClaim
- metadata:
- name: postgres-pv-claim-gmus
- labels:
- app: gmus-database
- spec:
- storageClassName: manual
- accessModes:
- - ReadWriteOnce
- resources:
- requests:
- storage: 1Gi
- ---
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: gmus-database
- labels:
- app: gmus-database
- spec:
- selector:
- matchLabels:
- app: gmus-database
- tier: postgres
- strategy:
- type: Recreate
- template:
- metadata:
- labels:
- app: gmus-database
- tier: postgres
- spec:
- containers:
- - image: postgres:10.4
- name: postgres
- env:
- - name: POSTGRES_USER
- value: gmus
- - name: POSTGRES_PASSWORD
- valueFrom:
- secretKeyRef:
- name: postgres-pass
- key: password
- ports:
- - containerPort: 5432
- name: postgres
- volumeMounts:
- - name: postgres-persistent-storage
- mountPath: /var/lib/postgresql/data
- volumes:
- - name: postgres-persistent-storage
- persistentVolumeClaim:
- claimName: postgres-pv-claim-gmus
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: gmus-redis
- labels:
- app: gmus-redis
- spec:
- ports:
- - port: 6379
- selector:
- app: gmus-redis
- tier: redis
- clusterIP: None
- ---
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: gmus-redis
- labels:
- app: gmus-redis
- spec:
- selector:
- matchLabels:
- app: gmus-redis
- tier: redis
- strategy:
- type: Recreate
- template:
- metadata:
- labels:
- app: gmus-redis
- tier: redis
- spec:
- containers:
- - image: redis:6-alpine
- name: redis
- ports:
- - containerPort: 6379
- name: redis
- ---
- apiVersion: batch/v1beta1
- kind: CronJob
- metadata:
- name: gmus-scan-library
- spec:
- schedule: "45 5 * * *"
- jobTemplate:
- spec:
- template:
- spec:
- containers:
- - name: gmus-scan
- image: docker.fela.space/gmus-backend:0
- args:
- - scan
- envFrom:
- - configMapRef:
- name: gmus-backend
- env:
- - name: GO_ENV
- value: production
- - name: POSTGRES_PASSWORD
- valueFrom:
- secretKeyRef:
- name: postgres-pass
- key: password
- restartPolicy: Never
|