Skip to content

Instantly share code, notes, and snippets.

@rkmathi
Created September 30, 2021 13:44
Show Gist options
  • Save rkmathi/1d57397caa36207fa9c9b4ef0a2c18f1 to your computer and use it in GitHub Desktop.
Save rkmathi/1d57397caa36207fa9c9b4ef0a2c18f1 to your computer and use it in GitHub Desktop.
resources:
- deploy.yml
namePrefix: xxx-
configurations:
- configurations.yml
nameReference:
- version: v1
kind: Deployment
fieldSpecs:
- version: v1
kind: Deployment
path: spec/template/spec/affinity/podAffinity/requiredDuringSchedulingIgnoredDuringExecution/labelSelector/matchExpressions/values
apiVersion: apps/v1
kind: Deployment
metadata:
name: deploy
labels:
app: deploy
spec:
replicas: 1
selector:
matchLabels:
app: deploy
template:
metadata:
labels:
app: deploy
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- deploy
topologyKey: kubernetes.io/hostname
containers:
- name: container
image: busybox
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: deploy
name: xxx-deploy
spec:
replicas: 1
selector:
matchLabels:
app: deploy
template:
metadata:
labels:
app: deploy
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- xxx-deploy
topologyKey: kubernetes.io/hostname
containers:
- image: busybox
name: container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment