Replace K8s ProxySQL with external Incus ProxySQL (192.168.9.140:6033)
Remove ProxySQL deployments, configmaps, and PVC from both anvil and ironclad namespaces. Replace with selector-less Service + Endpoints pointing to the Incus ProxySQL instance. Argo CD will prune the old resources automatically. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,82 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: proxysql-config
|
|
||||||
data:
|
|
||||||
proxysql.cnf: |
|
|
||||||
datadir="/var/lib/proxysql"
|
|
||||||
|
|
||||||
admin_variables=
|
|
||||||
{
|
|
||||||
admin_credentials="admin:admin;radmin:radmin"
|
|
||||||
mysql_ifaces="0.0.0.0:6032"
|
|
||||||
}
|
|
||||||
|
|
||||||
mysql_variables=
|
|
||||||
{
|
|
||||||
threads=4
|
|
||||||
max_connections=2048
|
|
||||||
default_query_delay=0
|
|
||||||
default_query_timeout=36000000
|
|
||||||
have_compress=true
|
|
||||||
poll_timeout=2000
|
|
||||||
interfaces="0.0.0.0:6033"
|
|
||||||
default_schema="information_schema"
|
|
||||||
stacksize=1048576
|
|
||||||
server_version="8.0.32"
|
|
||||||
connect_timeout_server=3000
|
|
||||||
monitor_username="app"
|
|
||||||
monitor_password="app-pass"
|
|
||||||
monitor_history=600000
|
|
||||||
monitor_connect_interval=60000
|
|
||||||
monitor_ping_interval=10000
|
|
||||||
monitor_read_only_interval=1500
|
|
||||||
monitor_read_only_timeout=500
|
|
||||||
ping_interval_server_msec=120000
|
|
||||||
ping_timeout_server=500
|
|
||||||
commands_stats=true
|
|
||||||
sessions_sort=true
|
|
||||||
connect_retries_on_failure=10
|
|
||||||
connection_max_age_ms=0
|
|
||||||
free_connections_pct=10
|
|
||||||
}
|
|
||||||
|
|
||||||
mysql_servers =
|
|
||||||
(
|
|
||||||
{
|
|
||||||
address = "mariadb"
|
|
||||||
port = 3306
|
|
||||||
hostgroup = 0
|
|
||||||
max_connections = 100
|
|
||||||
weight = 1
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
mysql_users =
|
|
||||||
(
|
|
||||||
{
|
|
||||||
username = "app"
|
|
||||||
password = "app-pass"
|
|
||||||
default_hostgroup = 0
|
|
||||||
max_connections = 200
|
|
||||||
transaction_persistent = 1
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
mysql_query_rules =
|
|
||||||
(
|
|
||||||
{
|
|
||||||
rule_id = 1
|
|
||||||
active = 1
|
|
||||||
match_pattern = "^SELECT .* FOR UPDATE$"
|
|
||||||
destination_hostgroup = 0
|
|
||||||
apply = 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rule_id = 2
|
|
||||||
active = 1
|
|
||||||
match_pattern = "^SELECT"
|
|
||||||
destination_hostgroup = 0
|
|
||||||
apply = 1
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: proxysql
|
|
||||||
labels:
|
|
||||||
app: proxysql
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: proxysql
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: proxysql
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: proxysql
|
|
||||||
image: proxysql/proxysql:2.5.5
|
|
||||||
ports:
|
|
||||||
- containerPort: 6033
|
|
||||||
- containerPort: 6032
|
|
||||||
volumeMounts:
|
|
||||||
- name: proxysql-data
|
|
||||||
mountPath: /var/lib/proxysql
|
|
||||||
volumes:
|
|
||||||
- name: proxysql-data
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: proxysql-data
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: proxysql-data
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
storageClassName: longhorn
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 1Gi
|
|
||||||
@@ -3,14 +3,23 @@ kind: Service
|
|||||||
metadata:
|
metadata:
|
||||||
name: proxysql
|
name: proxysql
|
||||||
spec:
|
spec:
|
||||||
type: NodePort
|
|
||||||
selector:
|
|
||||||
app: proxysql
|
|
||||||
ports:
|
ports:
|
||||||
- name: mysql
|
- name: mysql
|
||||||
port: 3306
|
port: 3306
|
||||||
targetPort: 6033
|
targetPort: 6033
|
||||||
nodePort: 31943
|
|
||||||
- name: admin
|
- name: admin
|
||||||
port: 6032
|
port: 6032
|
||||||
targetPort: 6032
|
targetPort: 6032
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Endpoints
|
||||||
|
metadata:
|
||||||
|
name: proxysql
|
||||||
|
subsets:
|
||||||
|
- addresses:
|
||||||
|
- ip: 192.168.9.140
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
port: 6033
|
||||||
|
- name: admin
|
||||||
|
port: 6032
|
||||||
|
|||||||
@@ -1,82 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: proxysql-config
|
|
||||||
data:
|
|
||||||
proxysql.cnf: |
|
|
||||||
datadir="/var/lib/proxysql"
|
|
||||||
|
|
||||||
admin_variables=
|
|
||||||
{
|
|
||||||
admin_credentials="admin:admin;radmin:radmin"
|
|
||||||
mysql_ifaces="0.0.0.0:6032"
|
|
||||||
}
|
|
||||||
|
|
||||||
mysql_variables=
|
|
||||||
{
|
|
||||||
threads=4
|
|
||||||
max_connections=2048
|
|
||||||
default_query_delay=0
|
|
||||||
default_query_timeout=36000000
|
|
||||||
have_compress=true
|
|
||||||
poll_timeout=2000
|
|
||||||
interfaces="0.0.0.0:6033"
|
|
||||||
default_schema="information_schema"
|
|
||||||
stacksize=1048576
|
|
||||||
server_version="8.0.32"
|
|
||||||
connect_timeout_server=3000
|
|
||||||
monitor_username="app"
|
|
||||||
monitor_password="app-pass"
|
|
||||||
monitor_history=600000
|
|
||||||
monitor_connect_interval=60000
|
|
||||||
monitor_ping_interval=10000
|
|
||||||
monitor_read_only_interval=1500
|
|
||||||
monitor_read_only_timeout=500
|
|
||||||
ping_interval_server_msec=120000
|
|
||||||
ping_timeout_server=500
|
|
||||||
commands_stats=true
|
|
||||||
sessions_sort=true
|
|
||||||
connect_retries_on_failure=10
|
|
||||||
connection_max_age_ms=0
|
|
||||||
free_connections_pct=10
|
|
||||||
}
|
|
||||||
|
|
||||||
mysql_servers =
|
|
||||||
(
|
|
||||||
{
|
|
||||||
address = "mariadb"
|
|
||||||
port = 3306
|
|
||||||
hostgroup = 0
|
|
||||||
max_connections = 100
|
|
||||||
weight = 1
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
mysql_users =
|
|
||||||
(
|
|
||||||
{
|
|
||||||
username = "app"
|
|
||||||
password = "app-pass"
|
|
||||||
default_hostgroup = 0
|
|
||||||
max_connections = 200
|
|
||||||
transaction_persistent = 1
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
mysql_query_rules =
|
|
||||||
(
|
|
||||||
{
|
|
||||||
rule_id = 1
|
|
||||||
active = 1
|
|
||||||
match_pattern = "^SELECT .* FOR UPDATE$"
|
|
||||||
destination_hostgroup = 0
|
|
||||||
apply = 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rule_id = 2
|
|
||||||
active = 1
|
|
||||||
match_pattern = "^SELECT"
|
|
||||||
destination_hostgroup = 0
|
|
||||||
apply = 1
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: proxysql
|
|
||||||
labels:
|
|
||||||
app: proxysql
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: proxysql
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: proxysql
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: proxysql
|
|
||||||
image: proxysql/proxysql:2.6.3
|
|
||||||
ports:
|
|
||||||
- containerPort: 6033
|
|
||||||
- containerPort: 6032
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 128Mi
|
|
||||||
limits:
|
|
||||||
cpu: 500m
|
|
||||||
memory: 256Mi
|
|
||||||
livenessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: 6033
|
|
||||||
initialDelaySeconds: 15
|
|
||||||
periodSeconds: 10
|
|
||||||
readinessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: 6033
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 5
|
|
||||||
volumeMounts:
|
|
||||||
- name: config
|
|
||||||
mountPath: /etc/proxysql.cnf
|
|
||||||
subPath: proxysql.cnf
|
|
||||||
volumes:
|
|
||||||
- name: config
|
|
||||||
configMap:
|
|
||||||
name: proxysql-config
|
|
||||||
items:
|
|
||||||
- key: proxysql.cnf
|
|
||||||
path: proxysql.cnf
|
|
||||||
@@ -3,8 +3,6 @@ kind: Service
|
|||||||
metadata:
|
metadata:
|
||||||
name: proxysql
|
name: proxysql
|
||||||
spec:
|
spec:
|
||||||
selector:
|
|
||||||
app: proxysql
|
|
||||||
ports:
|
ports:
|
||||||
- name: mysql
|
- name: mysql
|
||||||
port: 3306
|
port: 3306
|
||||||
@@ -12,3 +10,16 @@ spec:
|
|||||||
- name: admin
|
- name: admin
|
||||||
port: 6032
|
port: 6032
|
||||||
targetPort: 6032
|
targetPort: 6032
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Endpoints
|
||||||
|
metadata:
|
||||||
|
name: proxysql
|
||||||
|
subsets:
|
||||||
|
- addresses:
|
||||||
|
- ip: 192.168.9.140
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
port: 6033
|
||||||
|
- name: admin
|
||||||
|
port: 6032
|
||||||
|
|||||||
Reference in New Issue
Block a user