cuddle-rust-service-plan/templates/kustomize/base/deployment.yaml
kjuulh f112bcf1a9
All checks were successful
continuous-integration/drone/push Build is passing
chore: remove deps
Signed-off-by: kjuulh <contact@kjuulh.io>
2024-05-25 13:47:23 +02:00

40 lines
1.0 KiB
YAML

{% set_global cluster_vars = filter_by_prefix(prefix=["clusters", cluster]) %}
apiVersion: apps/v1
kind: Deployment
metadata:
name: "{{ service }}"
spec:
selector:
matchLabels:
app: "{{ service }}"
template:
spec:
containers:
- name: "{{ service }}"
command: [{{ service }}]
args: ["serve"]
image: "deployment:latest"
ports:
- containerPort: 3000
name: external-http
- containerPort: 3001
name: internal-http
- containerPort: 3002
name: internal-grpc
{% if cluster_vars.config or cluster_vars.secrets %}
env:
{% for secret in cluster_vars.secrets %}
- name: SECRET_USERNAME
valueFrom:
secretKeyRef:
name: my-secret
key: username
- name: SECRET_PASSWORD
valueFrom:
secretKeyRef:
name: my-secret
key: password
{% endfor %}
{% endif %}