Add quay-kubernetes package / Add quay CD to k8s
This commit is contained in:
parent
2f750bfc87
commit
1d0313229e
45 changed files with 1129 additions and 10 deletions
1
deploy/postgres/.kpmignore
Normal file
1
deploy/postgres/.kpmignore
Normal file
|
@ -0,0 +1 @@
|
|||
variables.yaml
|
8
deploy/postgres/README.md
Normal file
8
deploy/postgres/README.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
|
||||
postgres/postgres
|
||||
===========
|
||||
|
||||
# Install
|
||||
|
||||
kpm deploy postgres/postgres
|
||||
|
29
deploy/postgres/manifest.yaml
Normal file
29
deploy/postgres/manifest.yaml
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
package:
|
||||
name: quay/postgres-app
|
||||
author: Antoine Legrand
|
||||
version: 9.6.1-1
|
||||
description: postgres
|
||||
license: MIT
|
||||
|
||||
variables:
|
||||
image: postgres:9.6.1
|
||||
dbname: quay
|
||||
user: quay
|
||||
password: quay
|
||||
data_volumes:
|
||||
- name: postgres-data
|
||||
emptyDir:
|
||||
medium: ""
|
||||
|
||||
resources:
|
||||
- file: postgres-deployment.yaml
|
||||
name: postgres
|
||||
type: deployment
|
||||
|
||||
- file: postgres-service.yaml
|
||||
name: postgres
|
||||
type: service
|
||||
|
||||
deploy:
|
||||
- name: $self
|
46
deploy/postgres/templates/postgres-deployment.yaml
Normal file
46
deploy/postgres/templates/postgres-deployment.yaml
Normal file
|
@ -0,0 +1,46 @@
|
|||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: postgres
|
||||
labels:
|
||||
k8s-app: postgres
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: postgres
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: postgres
|
||||
spec:
|
||||
containers:
|
||||
- image: {{image}}
|
||||
name: postgres
|
||||
env:
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: "{{password}}"
|
||||
- name: PGPASSWORD
|
||||
value: "{{password}}"
|
||||
- name: POSTGRES_USER
|
||||
value: "{{user}}"
|
||||
- name: POSTGRES_DB
|
||||
value: "{{dbname}}"
|
||||
- name: PGDATA
|
||||
value: /var/lib/postgresql/data/pgdata
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: postgres
|
||||
volumeMounts:
|
||||
- name: postgres-data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
# livenessProbe:
|
||||
# tcpSocket:
|
||||
# port: "postgres"
|
||||
# initialDelaySeconds: 5
|
||||
# timeoutSeconds: 1
|
||||
# readinessProbe:
|
||||
# initialDelaySeconds: 600
|
||||
# exec:
|
||||
# command: ["psql", "-h", "localhost", "-U", "postgres"]
|
||||
volumes: {{data_volumes}}
|
14
deploy/postgres/templates/postgres-service.yaml
Normal file
14
deploy/postgres/templates/postgres-service.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: postgres
|
||||
name: postgres
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 5432
|
||||
name: postgres
|
||||
selector:
|
||||
k8s-app: postgres
|
7
deploy/postgres/variables.yaml
Normal file
7
deploy/postgres/variables.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
user: quay
|
||||
password: quay
|
||||
dbname: quay
|
||||
data_volumes:
|
||||
- name: "postgres-data"
|
||||
persistentVolumeClaim:
|
||||
claimName: pvc-postgres-master
|
Reference in a new issue