apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: deployer-srvacct-binding-browserstack-agent
subjects:
  - kind: ServiceAccount
    namespace: browserstack
    name: default
roleRef:
  kind: ClusterRole
  name: cluster-admin
  apiGroup: rbac.authorization.k8s.io
---
# Source: selenium-grid/templates/hub-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: browserstack-turboscale-agent
  namespace: browserstack
  labels:
    name: browserstack-turboscale-agent
spec:
  replicas: 1
  selector:
    matchLabels:
      name: browserstack-turboscale-agent
  template:
    metadata:
      labels:
        name: browserstack-turboscale-agent
    spec:
      nodeSelector:
        kubernetes.io/os: linux  
      containers:
        - name: browserstack-turboscale-agent
          image: public.ecr.aws/v4a1k5d3/browserstack/turboscale-agent:1.0.0
          imagePullPolicy: Always
          securityContext:
            allowPrivilegeEscalation: false
          env:
            - name: BSTACK_USERNAME
              value: <BstackUsername>
            - name: BSTACK_ACCESSKEY
              value: <BstackAccessKey>
            - name: BSTACK_URL
              value: <BstackURL>
            - name: BSTACK_ENV
              value: "production"
          resources:
            limits:
              cpu: "0.5"
              memory: 1Gi
            requests:
              cpu: "0.5"
              memory: 1Gi
