# An example configmap to be used with k8s-sidecar-injector
apiVersion: v1
kind: ConfigMap
metadata:
  name: mongoproxy-injectionconfig
  labels:
    app: k8s-sidecar-injector
data:
  mongoproxy: |
    name: "mongoproxy"
    initContainers:
    - name: init-mongoproxy
      image: mpihlak/mongoproxy-init:v0.4.1
      securityContext:
        capabilities:
          add: ["NET_ADMIN"]
    containers:
    - name: mongoproxy
      command: [ "./mongoproxy", "--proxy=27111" ]
      image: mpihlak/mongoproxy:v0.4.1
      securityContext:
        runAsUser: 9999
      env:
      - name: RUST_LOG
        value: info
      - name: RUST_BACKTRACE
        value: "1"
      ports:
      - containerPort: 9898
        name: proxy-admin
      livenessProbe:
        httpGet:
          path: /health
          port: proxy-admin
        periodSeconds: 2
      readinessProbe:
        httpGet:
          path: /health
          port: proxy-admin
        periodSeconds: 2
      resources:
        limits:
          cpu: 20m
          memory: 32Mi
        requests:
          cpu: 10m
          memory: 8Mi
