Commit 30ed6b74 authored by liaozan's avatar liaozan 🏀

Initial Commit

parents
apiVersion: apps/v1
kind: Deployment
metadata:
name: ${APP_NAME}
namespace: ${NAMESPACE}
labels:
app: ${APP_NAME}
spec:
replicas: ${REPLICAS}
selector:
matchLabels:
app: ${APP_NAME}
template:
metadata:
labels:
app: ${APP_NAME}
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: schbrain.deploy
operator: In
values:
- ${NODE_TAG}
terminationGracePeriodSeconds: 20
containers:
- name: ${APP_NAME}
image: ${IMAGE}
imagePullPolicy: IfNotPresent
resources:
requests:
memory: ${MEMORY_REQUEST}
limits:
memory: ${MEMORY_LIMIT}
ports:
- name: service
containerPort: ${PORT}
protocol: TCP
env:
- name: NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
apiVersion: v1
kind: Service
metadata:
name: ${SERVICE_NAME}
namespace: ${NAMESPACE}
labels:
app: ${SERVICE_NAME}
annotations:
service.beta.kubernetes.io/alibaba-cloud-loadbalancer-address-type: "intranet"
spec:
type: ${SERVICE_MODE}
ports:
- name: service
port: ${SERVICE_PORT}
targetPort: ${SERVICE_PORT}
selector:
app: ${APP_NAME}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment