---
apiVersion: v1
kind: Template
metadata:
  labels:
    provider: fabric8
    project: generator-backend
    version: 1.0.17
    group: io.fabric8
  name: generator-backend
objects:
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      prometheus.io/port: "9779"
      prometheus.io/scrape: "true"
      fabric8.io/git-commit: ceb1536558229a0b9da19707ec63893286ef28ad
      fabric8.io/scm-con-url: scm:git:git://github.com/fabric8io/generator-backend.git
      fabric8.io/scm-url: http://github.com/fabric8io/generator-backend
      fabric8.io/issue-system: JIRA
      fabric8.io/issue-tracker-url: https://issues.jboss.org/
      fabric8.io/git-branch: release-v1.0.17
      fabric8.io/scm-devcon-url: scm:git:git@github.com:fabric8io/generator-backend.git
      fabric8.io/scm-tag: HEAD
    labels:
      expose: "true"
      group: io.obsidian
      project: generator-backend
      provider: fabric8
      version: 1.0.0-SNAPSHOT
    name: generator-backend
  spec:
    ports:
    - name: http
      port: 8443
      protocol: TCP
      targetPort: 8443
    selector:
      group: io.fabric8
      project: generator-backend
      provider: fabric8
    sessionAffinity: None
    type: LoadBalancer
- apiVersion: extensions/v1beta1
  kind: Deployment
  metadata:
    annotations:
      fabric8.io/git-commit: ceb1536558229a0b9da19707ec63893286ef28ad
      fabric8.io/metrics-path: dashboard/file/kubernetes-pods.json/?var-project=generator-backend&var-version=1.0.17
      fabric8.io/scm-con-url: scm:git:git://github.com/fabric8io/generator-backend.git
      fabric8.io/scm-url: http://github.com/fabric8io/generator-backend
      fabric8.io/issue-system: JIRA
      fabric8.io/issue-tracker-url: https://issues.jboss.org/
      fabric8.io/git-branch: release-v1.0.17
      fabric8.io/scm-devcon-url: scm:git:git@github.com:fabric8io/generator-backend.git
      fabric8.io/scm-tag: HEAD
    labels:
      provider: fabric8
      project: generator-backend
      version: 1.0.17
      group: io.fabric8
    name: generator-backend
  spec:
    replicas: 1
    selector:
      matchLabels:
        project: generator-backend
        provider: fabric8
        version: 1.0.17
        group: io.fabric8
    template:
      metadata:
        annotations:
          fabric8.io/git-commit: ceb1536558229a0b9da19707ec63893286ef28ad
          fabric8.io/metrics-path: dashboard/file/kubernetes-pods.json/?var-project=generator-backend&var-version=1.0.17
          fabric8.io/scm-con-url: scm:git:git://github.com/fabric8io/generator-backend.git
          fabric8.io/scm-url: http://github.com/fabric8io/generator-backend
          fabric8.io/issue-system: JIRA
          fabric8.io/issue-tracker-url: https://issues.jboss.org/
          fabric8.io/git-branch: release-v1.0.17
          fabric8.io/scm-devcon-url: scm:git:git@github.com:fabric8io/generator-backend.git
          fabric8.io/scm-tag: HEAD
        labels:
          provider: fabric8
          project: generator-backend
          version: 1.0.17
          group: io.fabric8
      spec:
        containers:
        - env:
          - name: OPENSHIFT_API_URL
            value: ${OPENSHIFT_API_URL}
          - name: KEYCLOAK_SAAS_URL
            value: ${KEYCLOAK_SAAS_URL}
          - name: KUBERNETES_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          image: fabric8/generator-backend:1.0.17
          imagePullPolicy: IfNotPresent
          livenessProbe:
            failureThreshold: 10
            httpGet:
              path: forge/version
              port: 8080
            initialDelaySeconds: 120
            timeoutSeconds: 3
          name: wildfly-swarm
          ports:
          - containerPort: 8080
            name: http
            protocol: TCP
          - containerPort: 9779
            name: prometheus
            protocol: TCP
          - containerPort: 8778
            name: jolokia
            protocol: TCP
          readinessProbe:
            httpGet:
              path: forge/version
              port: 8080
            initialDelaySeconds: 3
            timeoutSeconds: 3
          securityContext:
            privileged: false
          workingDir: /home
        serviceAccountName: generator-backend
parameters:
- name: FORGE_URL
  value: forge.api.prod-preview.openshift.io
- name: OPENSHIFT_API_URL
  value: https://api.free-int.openshift.com
- name: KEYCLOAK_SAAS_URL
  value: http://sso.prod-preview.openshift.io
