Manage manifests with k8s module

This commit is contained in:
Paul-Henri Froidmont 2019-08-17 02:29:58 +02:00
parent 6ffa138ab1
commit 5955b3ac42
6 changed files with 64 additions and 78 deletions

View file

@ -0,0 +1,50 @@
- name: Searx deployment
k8s:
namespace: default
state: present
definition:
apiVersion: apps/v1
kind: Deployment
metadata:
name: searx
spec:
replicas: 2
selector:
matchLabels:
app: searx
template:
metadata:
labels:
app: searx
spec:
containers:
- name: searx
image: wonderfall/searx:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8888
livenessProbe:
httpGet:
path: /
port: 8888
readinessProbe:
httpGet:
path: /
port: 8888
- name: Searx service
k8s:
namespace: default
state: present
definition:
apiVersion: v1
kind: Service
metadata:
name: searx
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 8888
selector:
app: searx