---
apiVersion: v1
kind: ConfigMap
metadata:
  annotations:
    fabric8.io/git-commit: 2b9f7ce19493fe6d18392ac4f4be16f5e1a76fa3
    fabric8.io/iconUrl: https://cdn.rawgit.com/fabric8io/fabric8-devops/master/gerrit/src/main/fabric8/icon.png
    fabric8.io/git-branch: release-v2.2.311
    maven.fabric8.io/app-catalog: "true"
  labels:
    provider: fabric8
    project: gerrit
    version: 2.2.311
    expose: "true"
    group: io.fabric8.devops.apps
    kind: catalog
  name: catalog-gerrit
data:
  catalog-gerrit.yml: |
    ---
    apiVersion: "v1"
    kind: "Template"
    metadata:
      annotations:
        fabric8.io/git-commit: "2b9f7ce19493fe6d18392ac4f4be16f5e1a76fa3"
        fabric8.io/iconUrl: "https://cdn.rawgit.com/fabric8io/fabric8-devops/master/gerrit/src/main/fabric8/icon.png"
        fabric8.io/git-branch: "release-v2.2.311"
      finalizers: []
      labels:
        provider: "fabric8"
        project: "gerrit"
        version: "2.2.311"
        expose: "true"
        group: "io.fabric8.devops.apps"
      name: "gerrit"
      ownerReferences: []
    labels: {}
    objects:
    - apiVersion: "v1"
      kind: "ServiceAccount"
      metadata:
        annotations:
          fabric8.io/iconUrl: "https://cdn.rawgit.com/fabric8io/fabric8-devops/master/gerrit/src/main/fabric8/icon.png"
        finalizers: []
        labels:
          provider: "fabric8"
          project: "gerrit"
          version: "2.2.311"
          group: "io.fabric8.devops.apps"
        name: "gerrit"
        ownerReferences: []
      imagePullSecrets: []
      secrets:
      - name: "gerrit-admin-ssh"
      - name: "gerrit-users-ssh-keys"
    - apiVersion: "v1"
      kind: "Service"
      metadata:
        annotations:
          fabric8.io/app-menu: "development"
          fabric8.io/iconUrl: "https://cdn.rawgit.com/fabric8io/fabric8-devops/master/gerrit/src/main/fabric8/icon.png"
          fabric8.io/git-commit: "2b9f7ce19493fe6d18392ac4f4be16f5e1a76fa3"
          fabric8.io/git-branch: "release-v2.2.311"
        finalizers: []
        labels:
          project: "gerrit"
          provider: "fabric8"
          expose: "true"
          version: "2.2.311"
          group: "io.fabric8.devops.apps"
        name: "gerrit"
        ownerReferences: []
      spec:
        deprecatedPublicIPs: []
        externalIPs: []
        loadBalancerSourceRanges: []
        ports:
        - port: 80
          protocol: "TCP"
          targetPort: 8080
        selector:
          project: "gerrit"
          provider: "fabric8"
          group: "io.fabric8.devops.apps"
    - apiVersion: "v1"
      kind: "Service"
      metadata:
        annotations:
          fabric8.io/git-commit: "2b9f7ce19493fe6d18392ac4f4be16f5e1a76fa3"
          fabric8.io/iconUrl: "https://cdn.rawgit.com/fabric8io/fabric8-devops/master/gerrit/src/main/fabric8/icon.png"
          fabric8.io/git-branch: "release-v2.2.311"
        finalizers: []
        labels:
          project: "gerrit"
          provider: "fabric8"
          expose: "true"
          version: "2.2.311"
          group: "io.fabric8.devops.apps"
        name: "gerrit-ssh"
        ownerReferences: []
      spec:
        deprecatedPublicIPs: []
        externalIPs: []
        loadBalancerSourceRanges: []
        ports:
        - port: 29418
          protocol: "TCP"
          targetPort: 29418
        selector:
          project: "gerrit"
          provider: "fabric8"
          group: "io.fabric8.devops.apps"
    - apiVersion: "v1"
      kind: "ConfigMap"
      metadata:
        annotations:
          fabric8.gerrit/summary: "[Gerrit](https://code.google.com/p/gerrit/) Web based\
            \ code review and project management for Git based projects"
          description: "Gerrit is a web based code review system, facilitating online\
            \ code reviews for projects using the Git version control system.\n\nGerrit\
            \ makes reviews easier by showing changes in a side-by-side display, and allowing\
            \ inline comments to be added by any reviewer.\n\nGerrit simplifies Git based\
            \ project maintainership by permitting any authorized user to submit changes\
            \ to the master Git repository, rather than requiring all approved changes\
            \ to be merged in by hand by the project maintainer. This functionality enables\
            \ a more centralized usage of Git.\n\n[https://www.gerritcodereview.com/](https://www.gerritcodereview.com/)"
          fabric8.gerrit/iconUrl: "https://cdn.rawgit.com/fabric8io/fabric8-devops/master/gerrit/src/main/fabric8/icon.png"
          fabric8.io/json-schema: "{\n  \"type\" : \"object\",\n  \"properties\" : {\n\
            \    \"GERRIT_ADMIN_PWD\" : {\n      \"type\" : \"string\",\n      \"description\"\
            \ : \"Admin password\",\n      \"default\" : \"secret\"\n    },\n    \"GERRIT_INITIAL_COMMIT\"\
            \ : {\n      \"type\" : \"string\",\n      \"description\" : \"Parameter used\
            \ when the Gerrit Git repo is created using the DevOpsConnector. By default,\
            \ it is false as commits have already been done within gogs repo\",\n    \
            \  \"default\" : \"false\"\n    },\n    \"GERRIT_ADMIN_USER\" : {\n      \"\
            type\" : \"string\",\n      \"description\" : \"Admin user used to perform\
            \ operations on gerrit\",\n      \"default\" : \"admin\"\n    },\n    \"GERRIT_REPO_DESCRIPTION\"\
            \ : {\n      \"type\" : \"string\",\n      \"description\" : \"Description\
            \ ot add to the Gerrit Git repo created when a CD Project is created\",\n\
            \      \"default\" : \"Description of the gerrit git repo\"\n    }\n  }\n}"
        finalizers: []
        labels:
          provider: "fabric8"
          project: "gerrit"
          version: "2.2.311"
          group: "io.fabric8.devops.apps"
        name: "gerrit"
        ownerReferences: []
      data:
        gerrit-initial-commit: "false"
        gerrit-admin-pwd: "secret"
        gerrit-admin-user: "admin"
        gerrit-repo-description: "Description of the gerrit git repo"
    - apiVersion: "extensions/v1beta1"
      kind: "Deployment"
      metadata:
        annotations:
          fabric8.io/iconUrl: "https://cdn.rawgit.com/fabric8io/fabric8-devops/master/gerrit/src/main/fabric8/icon.png"
          fabric8.io/git-commit: "2b9f7ce19493fe6d18392ac4f4be16f5e1a76fa3"
          fabric8.io/git-branch: "release-v2.2.311"
          fabric8.io/metrics-path: "dashboard/file/kubernetes-pods.json/?var-project=gerrit&var-version=2.2.311"
        finalizers: []
        labels:
          provider: "fabric8"
          project: "gerrit"
          version: "2.2.311"
          group: "io.fabric8.devops.apps"
        name: "gerrit"
        ownerReferences: []
      spec:
        replicas: 1
        selector:
          matchExpressions: []
          matchLabels:
            provider: "fabric8"
            project: "gerrit"
            group: "io.fabric8.devops.apps"
        template:
          metadata:
            annotations:
              fabric8.io/iconUrl: "https://cdn.rawgit.com/fabric8io/fabric8-devops/master/gerrit/src/main/fabric8/icon.png"
              fabric8.io/git-commit: "2b9f7ce19493fe6d18392ac4f4be16f5e1a76fa3"
              fabric8.io/secret-ssh-key: "gerrit-admin-ssh"
              fabric8.io/git-branch: "release-v2.2.311"
              fabric8.io/metrics-path: "dashboard/file/kubernetes-pods.json/?var-project=gerrit&var-version=2.2.311"
              fabric8.io/secret-ssh-public-key: "gerrit-users-ssh-keys[id-jenkins-rsa.pub,id-sonar-rsa.pub]"
            finalizers: []
            labels:
              provider: "fabric8"
              project: "gerrit"
              version: "2.2.311"
              group: "io.fabric8.devops.apps"
            ownerReferences: []
          spec:
            containers:
            - args: []
              command: []
              env:
              - name: "GERRIT_PUBLIC_KEYS_PATH"
                value: "/home/gerrit/ssh-keys"
              - name: "GIT_SERVER_PASSWORD"
                value: "RedHat$1"
              - name: "GERRIT_ADMIN_FULLNAME"
                value: "Administrator"
              - name: "GERRIT_ACCOUNTS"
                value: "jenkins,jenkins,jenkins@fabric8.io,secret,Non-Interactive Users:Administrators;sonar,sonar,sonar@fabric8.io,secret,Non-Interactive\
                  \ Users"
              - name: "GERRIT_ADMIN_USER"
                valueFrom:
                  configMapKeyRef:
                    key: "gerrit-admin-user"
                    name: "gerrit"
              - name: "GIT_SERVER_IP"
                value: "gogs.default.svc.cluster.local"
              - name: "GERRIT_ADMIN_PRIVATE_KEY"
                value: "/root/.ssh/id_rsa"
              - name: "GERRIT_REPO_DESCRIPTION"
                valueFrom:
                  configMapKeyRef:
                    key: "gerrit-repo-description"
                    name: "gerrit"
              - name: "GERRIT_SSH_PATH"
                value: "/root/.ssh"
              - name: "GERRIT_ADMIN_EMAIL"
                value: "admin@fabric8.io"
              - name: "GERRIT_GIT_REMOTEPATH"
                value: "ssh://admin@localhost:29418/All-Projects"
              - name: "GIT_SERVER_PROJ_ROOT"
                value: "gogsadmin"
              - name: "GERRIT_ADMIN_PWD"
                valueFrom:
                  configMapKeyRef:
                    key: "gerrit-admin-pwd"
                    name: "gerrit"
              - name: "GERRIT_GIT_PROJECT_CONFIG"
                value: "/home/gerrit/configs/project.config"
              - name: "GIT_SERVER_PORT"
                value: "80"
              - name: "GERRIT_INITIAL_COMMIT"
                valueFrom:
                  configMapKeyRef:
                    key: "gerrit-initial-commit"
                    name: "gerrit"
              - name: "GERRIT_USER_PUBLIC_KEY_SUFFIX"
                value: "-rsa.pub"
              - name: "GIT_SERVER_USER"
                value: "gogsadmin"
              - name: "GERRIT_GIT_LOCALPATH"
                value: "/home/gerrit/git"
              - name: "GERRIT_USER_PUBLIC_KEY_PREFIX"
                value: "id-"
              - name: "AUTH_TYPE"
                value: "DEVELOPMENT_BECOME_ANY_ACCOUNT"
              - name: "KUBERNETES_NAMESPACE"
                valueFrom:
                  fieldRef:
                    fieldPath: "metadata.namespace"
              image: "fabric8/gerrit:2.2.311"
              imagePullPolicy: "IfNotPresent"
              name: "gerrit"
              ports:
              - containerPort: 8080
                name: "http"
              resources:
                limits:
                  cpu: "0"
                  memory: "0"
                requests:
                  cpu: "0"
                  memory: "0"
              volumeMounts:
              - mountPath: "/root/.ssh"
                name: "gerrit-admin-ssh-key"
                readOnly: false
              - mountPath: "/home/gerrit/ssh-keys"
                name: "gerrit-users-ssh-keys"
                readOnly: false
            imagePullSecrets: []
            nodeSelector: {}
            serviceAccountName: "gerrit"
            volumes:
            - name: "gerrit-admin-ssh-key"
              secret:
                items: []
                secretName: "gerrit-admin-ssh"
            - name: "gerrit-users-ssh-keys"
              secret:
                items: []
                secretName: "gerrit-users-ssh-keys"
    parameters: []
