# Source: fission-all/templates/buildermgr/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: buildermgr
  labels:
    chart: "fission-all-v1.20.1"
    svc: buildermgr
spec:
  replicas: 1
  selector:
    matchLabels:
      svc: buildermgr
  template:
    metadata:
      labels:
        svc: buildermgr
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/path: "/metrics"
        prometheus.io/port: "8080"
    spec:
      securityContext:
        fsGroup: 10001
        runAsGroup: 10001
        runAsNonRoot: true
        runAsUser: 10001
      containers:
      - name: buildermgr
        image: "ghcr.io/fission/fission-bundle:v1.20.1"
        imagePullPolicy: IfNotPresent
        command: ["/fission-bundle"]
        args: ["--builderMgr", "--storageSvcUrl", "http://storagesvc.fission"]
        env:
        - name: FETCHER_IMAGE
          value: "fission/fetcher:v1.20.1"
        - name: FETCHER_IMAGE_PULL_POLICY
          value: "IfNotPresent"
        - name: BUILDER_IMAGE_PULL_POLICY
          value: "IfNotPresent"
        - name: ENABLE_ISTIO
          value: "false"
        - name: FETCHER_MINCPU
          value: "10m"
        - name: FETCHER_MINMEM
          value: "16Mi"
        - name: FETCHER_MAXCPU
          value: ""
        - name: FETCHER_MAXMEM
          value: ""
        - name: DEBUG_ENV
          value: "false"
        - name: PPROF_ENABLED
          value: "false"
        - name: HELM_RELEASE_NAME
          value: "fission-v1-20-1"        
        - name: FISSION_BUILDER_NAMESPACE
          value: ""
        - name: FISSION_FUNCTION_NAMESPACE
          value: ""
        - name: FISSION_DEFAULT_NAMESPACE
          value: "default"
        - name: FISSION_RESOURCE_NAMESPACES
          value: default        
        - name: KUBE_CLIENT_QPS
          value: "200"
        - name: KUBE_CLIENT_BURST
          value: "500"        
        - name: OTEL_EXPORTER_OTLP_ENDPOINT
          value: ""
        - name: OTEL_EXPORTER_OTLP_INSECURE
          value: "true"
        - name: OTEL_TRACES_SAMPLER
          value: "parentbased_traceidratio"
        - name: OTEL_TRACES_SAMPLER_ARG
          value: "0.1"
        - name: OTEL_PROPAGATORS
          value: "tracecontext,baggage"
        ports:
          - containerPort: 8080
            name: metrics
        resources:
          {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      serviceAccountName: fission-buildermgr