Skip to content

Commit b82d7f3

Browse files
committed
[+] updated logging logic to remove unused parts
[*] updated changelog for recent changes [*] improved postgresql proxy configuration with auto tls [-] removed unnecessary entries from gitignore [*] updated scripts and project settings to enforce ssl mode [*] changelog revised for clarity [*] confirmed functionality on local environment [*] applied patches for replicas configuration [*] adjusted deployment strategy to use daemonset instead of deployment
1 parent 392bce5 commit b82d7f3

File tree

1 file changed

+130
-0
lines changed

1 file changed

+130
-0
lines changed
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: xdatabase-proxy
5+
---
6+
apiVersion: v1
7+
kind: ServiceAccount
8+
metadata:
9+
name: xdatabase-proxy-sa
10+
namespace: xdatabase-proxy
11+
---
12+
apiVersion: rbac.authorization.k8s.io/v1
13+
kind: ClusterRole
14+
metadata:
15+
name: xdatabase-proxy-role
16+
namespace: xdatabase-proxy
17+
rules:
18+
- apiGroups: [""]
19+
resources: ["pods", "services", "endpoints", "secrets", "configmaps"]
20+
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
21+
- apiGroups: [""]
22+
resources: ["events"]
23+
verbs: ["create", "patch"]
24+
- apiGroups: [""]
25+
resources: ["nodes"]
26+
verbs: ["list", "watch"]
27+
- apiGroups: ["apps"]
28+
resources: ["deployments", "daemonsets", "statefulsets", "replicasets"]
29+
verbs: ["get", "list", "watch"]
30+
- apiGroups: ["networking.k8s.io"]
31+
resources: ["ingresses"]
32+
verbs: ["get", "list", "watch"]
33+
- apiGroups: ["metrics.k8s.io"]
34+
resources: ["pods", "nodes"]
35+
verbs: ["get", "list", "watch"]
36+
---
37+
apiVersion: rbac.authorization.k8s.io/v1
38+
kind: ClusterRoleBinding
39+
metadata:
40+
name: xdatabase-proxy-role-binding
41+
namespace: xdatabase-proxy
42+
subjects:
43+
- kind: ServiceAccount
44+
name: xdatabase-proxy-sa
45+
namespace: xdatabase-proxy
46+
roleRef:
47+
kind: ClusterRole
48+
name: xdatabase-proxy-role
49+
apiGroup: rbac.authorization.k8s.io
50+
---
51+
apiVersion: apps/v1
52+
kind: DaemonSet
53+
metadata:
54+
name: xdatabase-proxy
55+
namespace: xdatabase-proxy
56+
spec:
57+
selector:
58+
matchLabels:
59+
app: xdatabase-proxy
60+
template:
61+
metadata:
62+
labels:
63+
app: xdatabase-proxy
64+
spec:
65+
serviceAccountName: xdatabase-proxy-sa
66+
tolerations:
67+
- key: node-role.kubernetes.io/control-plane
68+
operator: Exists
69+
effect: NoSchedule
70+
- key: node-role.kubernetes.io/master
71+
operator: Exists
72+
effect: NoSchedule
73+
containers:
74+
- name: xdatabase-proxy
75+
image: ghcr.io/hasirciogli/xdatabase-proxy:latest
76+
imagePullPolicy: Always
77+
ports:
78+
- containerPort: 5432
79+
hostPort: 5432
80+
name: proxy-port
81+
env:
82+
- name: MODE
83+
value: production
84+
- name: POSTGRESQL_PROXY_ENABLED
85+
value: "true"
86+
- name: NAMESPACE
87+
value: xdatabase-proxy
88+
- name: POSTGRESQL_PROXY_START_PORT
89+
value: "5432"
90+
resources:
91+
requests:
92+
cpu: 100m
93+
memory: 128Mi
94+
limits:
95+
cpu: 500m
96+
memory: 512Mi
97+
livenessProbe:
98+
httpGet:
99+
path: /healthz
100+
port: 80
101+
scheme: HTTP
102+
initialDelaySeconds: 15
103+
periodSeconds: 20
104+
timeoutSeconds: 5
105+
failureThreshold: 3
106+
successThreshold: 1
107+
readinessProbe:
108+
httpGet:
109+
path: /ready
110+
port: 80
111+
scheme: HTTP
112+
initialDelaySeconds: 5
113+
periodSeconds: 10
114+
timeoutSeconds: 3
115+
failureThreshold: 3
116+
successThreshold: 1
117+
---
118+
apiVersion: v1
119+
kind: Service
120+
metadata:
121+
name: xdatabase-proxy
122+
namespace: xdatabase-proxy
123+
spec:
124+
selector:
125+
app: xdatabase-proxy
126+
ports:
127+
- port: 5432
128+
targetPort: proxy-port
129+
name: proxy-port
130+
type: ClusterIP

0 commit comments

Comments
 (0)