apiVersion: apps/v1
kind: Deployment
metadata:
  name: service-broker-redis
  labels:
    app.kubernetes.io/instance: redis
spec:
  replicas: 2
  selector:
    matchLabels:
      app.kubernetes.io/instance: redis
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: redis
    spec:
      serviceAccountName: service-broker
      containers:
        - name: service-broker
          image: docker.io/vshn/crossplane-service-broker-poc:latest
          imagePullPolicy: Always
          ports:
            - name: http
              containerPort: 8080
          env:
            - name: OSB_SERVICE_IDS
              value: INSERT_SERVICE_ID_HERE # redis
            - name: OSB_USERNAME
              value: cfpaas
            - name: OSB_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: service-broker
                  key: password
          livenessProbe:
            httpGet:
              path: /healthz
              port: http
            initialDelaySeconds: 60
          readinessProbe:
            httpGet:
              path: /healthz
              port: http
          securityContext:
            readOnlyRootFilesystem: true
            runAsNonRoot: true
          resources:
            requests:
              cpu: 200m
              memory: 64Mi
            limits:
              cpu: 500m
              memory: 128Mi
