Different deployments with a base deploymeny

Hey guys, Is it possible to create several deployments with a single base deployment?
Something like that:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:

  • deployment.yaml
  • namespace.yaml

patches:

  • path: ups-api-patch.yaml
    target:
    kind: Deployment
    name: PLACEHOLDER_NAME

  • path: ups-uploader-patch.yaml
    target:
    kind: Deployment
    name: PLACEHOLDER_NAME


apiVersion: apps/v1
kind: Deployment
metadata:
name: PLACEHOLDER_NAME
spec:
selector:
matchLabels:
app: PLACEHOLDER_APP
template:
metadata:
labels:
app: PLACEHOLDER_APP
spec:
serviceAccount: ups-api
containers:
- name: PLACEHOLDER_CONTAINER_NAME
image: PLACEHOLDER_IMAGE
imagePullPolicy: Always
args:
- server
- /path/file.yaml
resources:
limits:
memory: 5Gi
cpu: 1000m
env:
- name: JAVA_TOOL_OPTIONS
value: |
-Xmx4G
-Xms1G
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:+CMSIncrementalMode
-XX:+CMSIncrementalPacing
-XX:SurvivorRatio=6
-XX:-DisableExplicitGC
- name: DD_AGENT_HOST
valueFrom:
fieldRef:
fieldPath: status.hostIP
ports:
- containerPort: PORT
name: name
In this case, kustomize just create a single deployment.
Thank you…!!!

That is the point of Kustomize. I don’t use it because I prefer Helm

Try to work through the simple example here to see how it works.