kompose/script/test/fixtures/deploy/placement/output-placement-k8s.yaml
2024-01-01 12:07:44 +01:00

73 lines
1.6 KiB
YAML

---
apiVersion: v1
kind: Service
metadata:
labels:
io.kompose.service: redis
name: redis
spec:
ports:
- name: "6379"
port: 6379
targetPort: 6379
selector:
io.kompose.service: redis
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
io.kompose.service: redis
name: redis
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: redis
template:
metadata:
labels:
io.kompose.network/placement-default: "true"
io.kompose.service: redis
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- machine
- key: kubernetes.io/os
operator: In
values:
- ubuntu 14.04
- key: foo
operator: NotIn
values:
- bar
containers:
- image: redis
name: redis
ports:
- containerPort: 6379
protocol: TCP
restartPolicy: Always
topologySpreadConstraints:
- labelSelector:
matchLabels:
io.kompose.service: redis
maxSkew: 2
topologyKey: zone
whenUnsatisfiable: ScheduleAnyway
- labelSelector:
matchLabels:
io.kompose.service: redis
maxSkew: 1
topologyKey: ssd
whenUnsatisfiable: ScheduleAnyway