---
apiVersion: v1
kind: Template
metadata:
  labels:
    provider: fabric8
    project: fabric8-online-che
    version: 1.0.169
    group: io.fabric8.online.packages
  name: fabric8-online-che
objects:
- apiVersion: v1
  kind: Secret
  metadata:
    labels:
      provider: fabric8
      project: fabric8-online-che
      version: 1.0.169
      group: io.fabric8.online.packages
    name: che-recommender-api-token
  data:
    token: ${RECOMMENDER_API_TOKEN}
  type: fabric8.io/che-recommender-api-token
- apiVersion: v1
  kind: ServiceAccount
  metadata:
    annotations:
      maven.fabric8.io/source-url: jar:file:/home/jenkins/workspace/auto_fabric8-online_master-5IANNQP4JMCKRB2TMNCY2EVRW4HXDP4B5SXIL6W4OJSZQCEE6TEA@2/apps/che/target/che-1.0.169.jar!/META-INF/fabric8/openshift.yml
    labels:
      provider: fabric8
      project: che
      version: 1.0.169
      group: io.fabric8.online.apps
    name: che
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      fabric8.io/git-commit: 6c4ca30b034592e69f29819fbc8f50349f8609cf
      fabric8.io/git-branch: release-v1.0.169
      fabric8.io/scm-con-url: scm:git:git@github.com:fabric8io/fabric8-online.git/apps/bayesian-link
      fabric8.io/scm-devcon-url: scm:git:git@github.com:fabric8io/fabric8-online.git/apps/bayesian-link
      fabric8.io/scm-tag: fabric8-online-2.0.1
      fabric8.io/scm-url: http://github.com/fabric8io/fabric8-online/apps/bayesian-link
      maven.fabric8.io/source-url: jar:file:/home/jenkins/workspace/auto_fabric8-online_master-5IANNQP4JMCKRB2TMNCY2EVRW4HXDP4B5SXIL6W4OJSZQCEE6TEA@2/apps/bayesian-link/target/bayesian-link-1.0.169.jar!/META-INF/fabric8/openshift.yml
    labels:
      expose: "false"
      provider: fabric8
      project: bayesian-link
      version: 1.0.169
      group: io.fabric8.online.apps
    name: bayesian-link
  spec:
    externalName: ${RECOMMENDER_EXTERNAL_NAME}
    ports:
    - port: 80
    selector:
      project: bayesian-link
      provider: fabric8
      group: io.fabric8.online.apps
    type: ExternalName
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      fabric8.io/app-menu: development
      fabric8.io/git-commit: 6c4ca30b034592e69f29819fbc8f50349f8609cf
      fabric8.io/scm-con-url: scm:git:git@github.com:fabric8io/fabric8-online.git/apps/che
      fabric8.io/scm-url: http://github.com/fabric8io/fabric8-online/apps/che
      fabric8.io/iconUrl: https://cdn.rawgit.com/fabric8io/fabric8-online/master/apps/che/src/main/fabric8/icon.png
      fabric8.io/git-branch: release-v1.0.169
      fabric8.io/scm-devcon-url: scm:git:git@github.com:fabric8io/fabric8-online.git/apps/che
      fabric8.io/scm-tag: fabric8-online-2.0.1
      maven.fabric8.io/source-url: jar:file:/home/jenkins/workspace/auto_fabric8-online_master-5IANNQP4JMCKRB2TMNCY2EVRW4HXDP4B5SXIL6W4OJSZQCEE6TEA@2/apps/che/target/che-1.0.169.jar!/META-INF/fabric8/openshift.yml
    labels:
      project: che
      provider: fabric8
      expose: "false"
      version: 1.0.169
      group: io.fabric8.online.apps
    name: che-host
  spec:
    ports:
    - name: http
      port: 8080
      protocol: TCP
      targetPort: 8080
    selector:
      project: che
      provider: fabric8
      group: io.fabric8.online.apps
- apiVersion: v1
  kind: RoleBinding
  metadata:
    labels:
      provider: fabric8
      project: fabric8-online-che
      version: 1.0.169
      group: io.fabric8.online.packages
    name: che
  roleRef:
    name: admin
  subjects:
  - kind: ServiceAccount
    name: che
- apiVersion: v1
  kind: RoleBinding
  metadata:
    labels:
      provider: fabric8
      project: fabric8-online-che
      version: 1.0.169
      group: io.fabric8.online.packages
    name: useradmin
  roleRef:
    name: admin
  subjects:
  - kind: User
    name: ${PROJECT_USER}
  userNames:
  - ${PROJECT_USER}
- apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
    annotations:
      maven.fabric8.io/source-url: jar:file:/home/jenkins/workspace/auto_fabric8-online_master-5IANNQP4JMCKRB2TMNCY2EVRW4HXDP4B5SXIL6W4OJSZQCEE6TEA@2/apps/che/target/che-1.0.169.jar!/META-INF/fabric8/openshift.yml
    labels:
      provider: fabric8
      project: che
      version: 1.0.169
      group: io.fabric8.online.apps
    name: che-data-volume
  spec:
    accessModes:
    - ReadWriteOnce
    resources:
      requests:
        storage: 1Gi
- apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
    annotations:
      maven.fabric8.io/source-url: jar:file:/home/jenkins/workspace/auto_fabric8-online_master-5IANNQP4JMCKRB2TMNCY2EVRW4HXDP4B5SXIL6W4OJSZQCEE6TEA@2/apps/che/target/che-1.0.169.jar!/META-INF/fabric8/openshift.yml
    labels:
      provider: fabric8
      project: che
      version: 1.0.169
      group: io.fabric8.online.apps
    name: claim-che-workspace
  spec:
    accessModes:
    - ReadWriteOnce
    resources:
      requests:
        storage: 1Gi
- apiVersion: v1
  kind: ConfigMap
  metadata:
    annotations:
      maven.fabric8.io/source-url: jar:file:/home/jenkins/workspace/auto_fabric8-online_master-5IANNQP4JMCKRB2TMNCY2EVRW4HXDP4B5SXIL6W4OJSZQCEE6TEA@2/apps/che/target/che-1.0.169.jar!/META-INF/fabric8/openshift.yml
    labels:
      provider: fabric8
      project: che
      version: 1.0.169
      group: io.fabric8.online.apps
    name: che
  data:
    hostname-http: ${PROJECT_NAME}-che.${DOMAIN}
    workspace-storage: /home/user/che/workspaces
    workspace-storage-create-folders: "false"
    local-conf-dir: /etc/conf
    openshift-serviceaccountname: che
    che-server-evaluation-strategy: single-port
    log-level: INFO
    docker-connector: openshift
    port: "8080"
    remote-debugging-enabled: "false"
    che-oauth-github-forceactivation: "true"
    workspaces-memory-limit: 2300Mi
    workspaces-memory-request: 1500Mi
    enable-workspaces-autostart: "false"
    keycloak-oso-endpoint: https://sso.openshift.io/auth/realms/fabric8/broker/openshift-v3/token
    keycloak-github-endpoint: https://sso.openshift.io/auth/realms/fabric8/broker/github/token
    che-server-java-opts: -XX:+UseG1GC -XX:+UseStringDeduplication -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:MaxRAM=700m -Xms256m
    che-workspaces-java-opts: -XX:+UseG1GC -XX:+UseStringDeduplication -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:MaxRAM=1300m -Xms256m
    che-openshift-secure-routes: "true"
    che-secure-external-urls: "true"
    che-server-timeout-ms: "3600000"
    che-openshift-precreate-subpaths: "false"
- apiVersion: v1
  kind: ConfigMap
  metadata:
    labels:
      fabric8.io/kind: package
      provider: fabric8.io
      version: 1.0.169
      project: fabric8-online-che
      group: io.fabric8.online.packages
    name: fabric8-online-che
  data:
    metadata-url: http://central.maven.org/maven2/io/fabric8/online/packages/fabric8-online-che/maven-metadata.xml
    package-url-prefix: http://central.maven.org/maven2/io/fabric8/online/packages/fabric8-online-che/%[1]s/fabric8-online-che-%[1]s-
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    annotations:
      fabric8.io/git-commit: 6c4ca30b034592e69f29819fbc8f50349f8609cf
      fabric8.io/metrics-path: dashboard/file/kubernetes-pods.json/?var-project=che&var-version=1.0.169
      fabric8.io/scm-con-url: scm:git:git@github.com:fabric8io/fabric8-online.git/apps/che
      fabric8.io/scm-url: http://github.com/fabric8io/fabric8-online/apps/che
      fabric8.io/iconUrl: https://cdn.rawgit.com/fabric8io/fabric8-online/master/apps/che/src/main/fabric8/icon.png
      fabric8.io/git-branch: release-v1.0.169
      fabric8.io/scm-devcon-url: scm:git:git@github.com:fabric8io/fabric8-online.git/apps/che
      fabric8.io/scm-tag: fabric8-online-2.0.1
      maven.fabric8.io/source-url: jar:file:/home/jenkins/workspace/auto_fabric8-online_master-5IANNQP4JMCKRB2TMNCY2EVRW4HXDP4B5SXIL6W4OJSZQCEE6TEA@2/apps/che/target/che-1.0.169.jar!/META-INF/fabric8/openshift.yml
    labels:
      provider: fabric8
      project: che
      version: 1.0.169
      group: io.fabric8.online.apps
    name: che
  spec:
    replicas: 1
    selector:
      project: che
      provider: fabric8
      version: 1.0.169
      group: io.fabric8.online.apps
    strategy:
      type: Recreate
    template:
      metadata:
        annotations:
          fabric8.io/git-commit: 6c4ca30b034592e69f29819fbc8f50349f8609cf
          fabric8.io/metrics-path: dashboard/file/kubernetes-pods.json/?var-project=che&var-version=1.0.169
          fabric8.io/scm-con-url: scm:git:git@github.com:fabric8io/fabric8-online.git/apps/che
          fabric8.io/scm-url: http://github.com/fabric8io/fabric8-online/apps/che
          fabric8.io/iconUrl: https://cdn.rawgit.com/fabric8io/fabric8-online/master/apps/che/src/main/fabric8/icon.png
          fabric8.io/git-branch: release-v1.0.169
          fabric8.io/scm-devcon-url: scm:git:git@github.com:fabric8io/fabric8-online.git/apps/che
          fabric8.io/scm-tag: fabric8-online-2.0.1
        labels:
          provider: fabric8
          project: che
          version: 1.0.169
          group: io.fabric8.online.apps
      spec:
        containers:
        - env:
          - name: CHE_DOCKER_IP_EXTERNAL
            valueFrom:
              configMapKeyRef:
                key: hostname-http
                name: che
          - name: CHE_WORKSPACE_STORAGE
            valueFrom:
              configMapKeyRef:
                key: workspace-storage
                name: che
          - name: CHE_WORKSPACE_STORAGE_CREATE_FOLDERS
            valueFrom:
              configMapKeyRef:
                key: workspace-storage-create-folders
                name: che
          - name: CHE_LOCAL_CONF_DIR
            valueFrom:
              configMapKeyRef:
                key: local-conf-dir
                name: che
          - name: CHE_OPENSHIFT_PROJECT
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: CHE_OPENSHIFT_SERVICEACCOUNTNAME
            valueFrom:
              configMapKeyRef:
                key: openshift-serviceaccountname
                name: che
          - name: CHE_DOCKER_SERVER__EVALUATION__STRATEGY
            valueFrom:
              configMapKeyRef:
                key: che-server-evaluation-strategy
                name: che
          - name: CHE_LOG_LEVEL
            valueFrom:
              configMapKeyRef:
                key: log-level
                name: che
          - name: CHE_PORT
            valueFrom:
              configMapKeyRef:
                key: port
                name: che
          - name: CHE_DOCKER_CONNECTOR
            valueFrom:
              configMapKeyRef:
                key: docker-connector
                name: che
          - name: CHE_DEBUG_SERVER
            valueFrom:
              configMapKeyRef:
                key: remote-debugging-enabled
                name: che
          - name: CHE_OAUTH_GITHUB_FORCEACTIVATION
            valueFrom:
              configMapKeyRef:
                key: che-oauth-github-forceactivation
                name: che
          - name: CHE_OPENSHIFT_WORKSPACE_MEMORY_OVERRIDE
            valueFrom:
              configMapKeyRef:
                key: workspaces-memory-limit
                name: che
          - name: CHE_OPENSHIFT_WORKSPACE_MEMORY_REQUEST
            valueFrom:
              configMapKeyRef:
                key: workspaces-memory-request
                name: che
          - name: CHE_WORKSPACE_AUTO_START
            valueFrom:
              configMapKeyRef:
                key: enable-workspaces-autostart
                name: che
          - name: JAVA_OPTS
            valueFrom:
              configMapKeyRef:
                key: che-server-java-opts
                name: che
          - name: CHE_WORKSPACE_JAVA_OPTIONS
            valueFrom:
              configMapKeyRef:
                key: che-workspaces-java-opts
                name: che
          - name: CHE_OPENSHIFT_SECURE_ROUTES
            valueFrom:
              configMapKeyRef:
                key: che-openshift-secure-routes
                name: che
          - name: CHE_DOCKER_SERVER__EVALUATION__STRATEGY_SECURE_EXTERNAL_URLS
            valueFrom:
              configMapKeyRef:
                key: che-secure-external-urls
                name: che
          - name: CHE_OPENSHIFT_SERVER_INACTIVE_STOP_TIMEOUT_MS
            valueFrom:
              configMapKeyRef:
                key: che-server-timeout-ms
                name: che
          - name: CHE_OPENSHIFT_PRECREATE_WORKSPACE_DIRS
            valueFrom:
              configMapKeyRef:
                key: che-openshift-precreate-subpaths
                name: che
          - name: CHE_KEYCLOAK_OSO_ENDPOINT
            valueFrom:
              configMapKeyRef:
                key: keycloak-oso-endpoint
                name: che
          - name: CHE_KEYCLOAK_GITHUB_ENDPOINT
            valueFrom:
              configMapKeyRef:
                key: keycloak-github-endpoint
                name: che
          image: rhche/che-server:798ec38-fabric8-a65eae2
          imagePullPolicy: IfNotPresent
          livenessProbe:
            initialDelaySeconds: 120
            tcpSocket:
              port: 8080
            timeoutSeconds: 10
          name: che
          ports:
          - containerPort: 8080
            name: http
          - containerPort: 8000
            name: http-debug
          readinessProbe:
            initialDelaySeconds: 20
            tcpSocket:
              port: 8080
            timeoutSeconds: 10
          resources:
            limits:
              memory: 700Mi
            requests:
              memory: 256Mi
          volumeMounts:
          - mountPath: /data
            name: che-data-volume
        serviceAccountName: che
        volumes:
        - name: che-data-volume
          persistentVolumeClaim:
            claimName: che-data-volume
    triggers:
    - type: ConfigChange
- apiVersion: v1
  kind: LimitRange
  metadata:
    labels:
      provider: fabric8
      project: fabric8-online-che
      version: 1.0.169
      group: io.fabric8.online.packages
    name: resource-limits
  spec:
    limits:
    - max:
        cpu: 4880m
        memory: 2500Mi
      min:
        cpu: 29m
        memory: 150Mi
      type: Pod
    - default:
        cpu: "1"
        memory: 512Mi
      defaultRequest:
        cpu: 60m
        memory: 307Mi
      max:
        cpu: 4880m
        memory: 2500Mi
      min:
        cpu: 29m
        memory: 150Mi
      type: Container
    - max:
        storage: 1Gi
      min:
        storage: 1Gi
      type: PersistentVolumeClaim
- apiVersion: v1
  kind: ResourceQuota
  metadata:
    labels:
      provider: fabric8
      project: fabric8-online-che
      version: 1.0.169
      group: io.fabric8.online.packages
    name: compute-resources
  spec:
    hard:
      limits.cpu: "6"
      limits.memory: 3Gi
    scopes:
    - NotTerminating
- apiVersion: v1
  kind: ResourceQuota
  metadata:
    labels:
      provider: fabric8
      project: fabric8-online-che
      version: 1.0.169
      group: io.fabric8.online.packages
    name: compute-resources-timebound
  spec:
    hard:
      limits.cpu: "4"
      limits.memory: 2Gi
    scopes:
    - Terminating
- apiVersion: v1
  kind: ResourceQuota
  metadata:
    labels:
      provider: fabric8
      project: fabric8-online-che
      version: 1.0.169
      group: io.fabric8.online.packages
    name: object-counts
  spec:
    hard:
      persistentvolumeclaims: "2"
      replicationcontrollers: "20"
      secrets: "20"
      services: "5"
- apiVersion: v1
  kind: RoleBindingRestriction
  metadata:
    labels:
      provider: fabric8
      project: fabric8-online-che
      version: 1.0.169
      group: io.fabric8.online.packages
    name: dsaas-user-access
  spec:
    userrestriction:
      users:
      - ${PROJECT_USER}
- apiVersion: v1
  kind: Route
  metadata:
    annotations:
      maven.fabric8.io/source-url: jar:file:/home/jenkins/workspace/auto_fabric8-online_master-5IANNQP4JMCKRB2TMNCY2EVRW4HXDP4B5SXIL6W4OJSZQCEE6TEA@2/apps/che/target/che-1.0.169.jar!/META-INF/fabric8/openshift.yml
    labels:
      provider: fabric8
      project: che
      version: 1.0.169
      group: io.fabric8.online.apps
    name: che
  spec:
    tls:
      insecureEdgeTerminationPolicy: Redirect
      termination: edge
    to:
      kind: Service
      name: che-host
parameters:
- name: PROJECT_USER
  value: developer
- name: PROJECT_NAMESPACE
- name: RECOMMENDER_EXTERNAL_NAME
  value: recommender.api.prod-preview.openshift.io
- name: RECOMMENDER_API_TOKEN
- name: DOMAIN
  value: d800.free-int.openshiftapps.com
