mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-ansible-private.git
synced 2025-12-17 03:34:28 +00:00
a
This commit is contained in:
58
roles/stolon/files/stolon-proxy.yaml
Normal file
58
roles/stolon/files/stolon-proxy.yaml
Normal file
@ -0,0 +1,58 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: stolon-proxy
|
||||
namespace: postgresql
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
component: stolon-proxy
|
||||
stolon-cluster: kube-stolon
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: stolon-proxy
|
||||
stolon-cluster: kube-stolon
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "8080"
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: regcred
|
||||
containers:
|
||||
- name: stolon-proxy
|
||||
image: sorintlab/stolon:master-pg10
|
||||
command:
|
||||
- "/bin/bash"
|
||||
- "-ec"
|
||||
- |
|
||||
exec gosu stolon stolon-proxy
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: STPROXY_CLUSTER_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.labels['stolon-cluster']
|
||||
- name: STPROXY_STORE_BACKEND
|
||||
value: "kubernetes"
|
||||
- name: STPROXY_KUBE_RESOURCE_KIND
|
||||
value: "configmap"
|
||||
- name: STPROXY_LISTEN_ADDRESS
|
||||
value: "0.0.0.0"
|
||||
- name: STPROXY_METRICS_LISTEN_ADDRESS
|
||||
value: "0.0.0.0:8080"
|
||||
## Uncomment this to enable debug logs
|
||||
#- name: STPROXY_DEBUG
|
||||
# value: "true"
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
- containerPort: 8080
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 5432
|
||||
initialDelaySeconds: 10
|
||||
timeoutSeconds: 5
|
||||
Reference in New Issue
Block a user