mysql and redis, maybe valkey future
This commit is contained in:
parent
1affe72cd4
commit
5536b90ffa
14
dev/kustomization.yaml
Normal file
14
dev/kustomization.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization.json
|
||||
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: dev
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- mysql
|
||||
- redis
|
||||
images:
|
||||
- name: mysql
|
||||
newTag: 8.0.36-debian
|
||||
- name: redis
|
||||
newTag: 6.2-alpine
|
32
dev/mysql/deployment.yaml
Normal file
32
dev/mysql/deployment.yaml
Normal file
@ -0,0 +1,32 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mysql
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mysql
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mysql
|
||||
editor: vscode
|
||||
spec:
|
||||
volumes:
|
||||
- name: data
|
||||
hostPath:
|
||||
path: /data/mysql
|
||||
containers:
|
||||
- name: mysql
|
||||
image: mysql
|
||||
resources:
|
||||
limits:
|
||||
cpu: '1'
|
||||
memory: '1Gi'
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/mysql
|
||||
name: data
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: mysql
|
11
dev/mysql/kustomization.yaml
Normal file
11
dev/mysql/kustomization.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization.json
|
||||
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
secretGenerator:
|
||||
- name: mysql
|
||||
files:
|
||||
- config/MYSQL_ROOT_PASSWORD
|
10
dev/mysql/service.yaml
Normal file
10
dev/mysql/service.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mysql
|
||||
spec:
|
||||
selector:
|
||||
app: mysql
|
||||
ports:
|
||||
- port: 3306
|
||||
targetPort: 3306
|
6
dev/namespace.yaml
Normal file
6
dev/namespace.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: dev
|
||||
annotations:
|
||||
role: 'for develop use'
|
31
dev/redis/deployment.yaml
Normal file
31
dev/redis/deployment.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
editor: vscode
|
||||
spec:
|
||||
volumes:
|
||||
- name: redis-config
|
||||
configMap:
|
||||
name: redis-config
|
||||
containers:
|
||||
- image: redis
|
||||
name: redis
|
||||
args:
|
||||
- "/etc/redis/redis.conf"
|
||||
resources:
|
||||
limits:
|
||||
cpu: '1'
|
||||
memory: '1Gi'
|
||||
volumeMounts:
|
||||
- mountPath: /etc/redis
|
||||
name: redis-config
|
11
dev/redis/kustomization.yaml
Normal file
11
dev/redis/kustomization.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization.json
|
||||
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
configMapGenerator:
|
||||
- name: redis-config
|
||||
files:
|
||||
- config/redis.conf
|
10
dev/redis/service.yaml
Normal file
10
dev/redis/service.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis
|
||||
spec:
|
||||
selector:
|
||||
app: redis
|
||||
ports:
|
||||
- port: 6379
|
||||
targetPort: 6379
|
Loading…
Reference in New Issue
Block a user