add: redis mysql argoflow

main
ycz008 2023-08-18 14:42:45 +08:00
parent 925c83f06e
commit 088b522a22
4 changed files with 3440 additions and 0 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,54 @@
apiVersion: v1
kind: ReplicationController
metadata:
name: mysql
namespace: dev
labels:
name: mysql
spec:
replicas: 1
selector:
name: mysql
template:
metadata:
labels:
name: mysql
spec:
containers:
- name: mysql
image: mysql:8.0.33
ports:
- containerPort: 3306
volumeMounts:
- name: mysql-data-dev
mountPath: /var/lib/mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: "Beaconfire@2099"
- name: MYSQL_DATABASE
value: "devops"
- name: MYSQL_USER
value: "devops"
- name: MYSQL_PASSWORD
value: "Devops@2099"
volumes:
- name: mysql-data-dev
hostPath:
path: /data/dev/mysql
---
apiVersion: v1
kind: Service
metadata:
name: mysql
namespace: dev
labels:
name: mysql
spec:
ports:
- protocol: TCP
port: 3306
targetPort: 3306
nodePort: 30012
selector:
name: mysql
type: NodePort

View File

@ -0,0 +1,96 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: redis-config
labels:
app: redis
data:
redis.conf: |-
dir /srv
port 6379
bind 0.0.0.0
appendonly yes
daemonize no
requirepass beaconfire@123
pidfile /srv/redis-6379.pid
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
labels:
app: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
initContainers:
- name: init
image: busybox
imagePullPolicy: IfNotPresent
command: ["/bin/sh", "-c", "sysctl -w net.core.somaxconn=1024"]
securityContext:
privileged: true
containers:
- name: redis
image: redis:6.2.12
command:
- "sh"
- "-c"
- "redis-server /usr/local/redis/redis.conf"
ports:
- containerPort: 6379
resources:
limits:
cpu: 1
memory: 1Gi
requests:
cpu: 50m
memory: 128Mi
livenessProbe:
tcpSocket:
port: 6379
initialDelaySeconds: 300
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
readinessProbe:
tcpSocket:
port: 6379
initialDelaySeconds: 5
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
volumeMounts:
- name: config
mountPath: /usr/local/redis/redis.conf
subPath: redis.conf
volumes:
- name: config
configMap:
name: redis-config
---
apiVersion: v1
kind: Service
metadata:
name: redis
spec:
ports:
- port: 6379
protocol: TCP
targetPort: 6379
nodePort: 30011
selector:
app: redis
type: NodePort