- Change storageClass values from 'local-vkus2' to 'local-zgus1' - Update nodeSelector hostname from 'vkvm-us2' to 'zgocloud-us1' - Modify persistent volume claim names to reflect new storage class These changes aim to facilitate a smooth transition to a new hosting environment, ensuring that the resources are correctly allocated and managed.
63 lines
1.6 KiB
YAML
63 lines
1.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: dockerio
|
|
namespace: mirrors
|
|
labels:
|
|
app: dockerio
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: dockerio
|
|
template:
|
|
metadata:
|
|
annotations: {}
|
|
labels:
|
|
app: dockerio
|
|
spec:
|
|
#nodeSelector:
|
|
# region: us
|
|
affinity:
|
|
nodeAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
nodeSelectorTerms:
|
|
- matchExpressions:
|
|
- key: region
|
|
operator: NotIn
|
|
values:
|
|
- cn
|
|
- key: kubernetes.io/hostname
|
|
operator: In
|
|
values:
|
|
- zgocloud-us1
|
|
containers:
|
|
- name: dockerio
|
|
image: registry:2.8.3
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 5000
|
|
name: web
|
|
env:
|
|
- name: REGISTRY_HTTP_ADDR
|
|
value: "0.0.0.0:5000"
|
|
- name: REGISTRY_PROXY_REMOTEURL
|
|
value: "https://registry-1.docker.io"
|
|
#- name: REGISTRY_PROXY_TTL
|
|
# value: "8h"
|
|
- name: REGISTRY_PROXY_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: dockerhub-auth
|
|
key: username
|
|
- name: REGISTRY_PROXY_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: dockerhub-auth
|
|
key: password
|
|
- name: REGISTRY_HTTP_SECRET
|
|
value: "someRandomString"
|
|
- name: TZ
|
|
value: "Asia/Shanghai"
|
|
|