#@ load("@ytt:overlay", "overlay")
#@ load("@ytt:data", "data")

#! Add hostPort 22 to the SSH container port and pin to the DNS target node
#@overlay/match by=overlay.subset({"kind": "Deployment", "metadata": {"name": "forgejo"}})
---
spec:
  template:
    spec:
      #@overlay/match missing_ok=True
      nodeSelector: #@ data.values.forgejo.nodeSelector
      containers:
        #@overlay/match by=overlay.subset({"name": "forgejo"})
        - ports:
            #@overlay/match by=overlay.subset({"name": "ssh"})
            #@overlay/match-child-defaults missing_ok=True
            - hostPort: #@ data.values.forgejo.sshPort
