apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    name: environment-operator
  name: environment-operator
  namespace: sample-app-dev
spec:
  replicas: 1
  selector:
    matchLabels:
      name: environment-operator
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        name: environment-operator
      name: environment-operator
    spec:
      containers:
      - name: environment-operator
        env:
        - name: GIT_REMOTE_REPOSITORY
          value: git@github.com:pearsontechnology/jenkins-sample-app.git
        - name: GIT_PRIVATE_KEY
          valueFrom:
            secretKeyRef:
              name: git-private-key
              key: key
        - name: DOCKER_REGISTRY
          value: bitesize-registry.default.svc.cluster.local:5000
        - name: PROJECT
          value: example
        - name: ENVIRONMENT_NAME
          value: Development
        - name: BITESIZE_FILE
          value: environments.bitesize
        - name: OIDC_ISSUER_URL
          value: http://keycloak:8080/auth/realms/master
        - name: OIDC_ALLOWED_GROUPS
          value: admin,bitesize:example:environment-operator:admin
        - name: DEBUG
          value: "true"
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        image: geribatai/environment-operator:900212a58cfeb59a8f574e38bc0936da2a814e49
        imagePullPolicy: Always
        securityContext:
          runAsUser: 1000
        ports:
        - containerPort: 8080
          protocol: TCP
        - containerPort: 50000
          protocol: TCP
        resources: {}
        terminationMessagePath: /dev/termination-log
