apiVersion: apps/v1
kind: Deployment
metadata:
  name: ycc-example-server
  namespace: yandex-cloud-connectors-example
spec:
  selector:
    matchLabels:
      control-plane: server
  replicas: 1
  template:
    metadata:
      labels:
        control-plane: server
    spec:
      containers:
        - image: cr.yandex/yc/cloud-connectors/example/reporter/server:0.0.1
          name: server
          ports:
            - containerPort: 8080
              name: image-reporter
              protocol: TCP
          resources:
            limits:
              cpu: 100m
              memory: 30Mi
            requests:
              cpu: 100m
              memory: 20Mi
          env:
            - name: YMQ_URL
              valueFrom:
                configMapKeyRef:
                  name: ymq-example-message-queue-configmap
                  key: URL
            - name: AWS_ACCESS_KEY_ID
              valueFrom:
                secretKeyRef:
                  name: sakey-example-sakey-secret
                  key: key
            - name: AWS_SECRET_ACCESS_KEY
              valueFrom:
                secretKeyRef:
                  name: sakey-example-sakey-secret
                  key: secret
      terminationGracePeriodSeconds: 10
