Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Commit

Permalink
Add openshift templates (#7)
Browse files Browse the repository at this point in the history
Add openshift templates
  • Loading branch information
sbose78 authored Nov 16, 2018
1 parent e845e22 commit 1e5978b
Show file tree
Hide file tree
Showing 2 changed files with 143 additions and 0 deletions.
121 changes: 121 additions & 0 deletions openshift/build-tool-detector.app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
kind: Template
apiVersion: v1
metadata:
name: build-tool-detector
objects:
- kind: DeploymentConfig
apiVersion: v1
metadata:
labels:
service: build-tool-detector
name: build-tool-detector
spec:
replicas: ${{REPLICAS}}
selector:
service: build-tool-detector
strategy:
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
labels:
service: build-tool-detector
spec:
containers:
- image: ${IMAGE}:${IMAGE_TAG}
env:
- name: BUILD_TOOL_DETECTOR_GITHUB_CLIENT_ID
valueFrom:
secretKeyRef:
name: build-tool-detector
key: github.client.id
- name: BUILD_TOOL_DETECTOR_GITHUB_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: build-tool-detector
key: github.client.secret
- name: BUILD_TOOL_DETECTOR_SENTRY_DSN
valueFrom:
secretKeyRef:
name: build-tool-detector
key: github.sentry.dsn
- name: BUILD_TOOL_DETECTOR_AUTH_URI
valueFrom:
configMapKeyRef:
name: build-tool-detector
key: auth.uri
imagePullPolicy: Always
name: build-tool-detector
ports:
- containerPort: 8099
protocol: TCP
livenessProbe:
failureThreshold: 3
httpGet:
path: /api/status
port: 8099
scheme: HTTP
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
failureThreshold: 3
httpGet:
path: /api/status
port: 8099
scheme: HTTP
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
requests:
cpu: 0.1m
memory: 10Mi
limits:
cpu: 400m
memory: 1.5Gi
terminationMessagePath: /dev/termination-log
dnsPolicy: ClusterFirst
restartPolicy: Always
securityContext: {}
terminationGracePeriodSeconds: 30
test: false
triggers:
- type: ConfigChange
status:
details:
causes:
- type: ConfigChange
- kind: Service
apiVersion: v1
metadata:
name: build-tool-detector
labels:
service: build-tool-detector
spec:
ports:
- name: "8099"
protocol: TCP
port: 80
targetPort: 8099
selector:
service: build-tool-detector
type: ClusterIP
sessionAffinity: null
parameters:
- name: IMAGE
value: quay.io/openshiftio/fabric8-services-build-tool-detector
- name: IMAGE_TAG
value: latest
- description: Number of deployment replicas
displayName: Number of deployment replicas
required: true
name: REPLICAS
value: '1'
22 changes: 22 additions & 0 deletions openshift/build-tool-detector.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
kind: Template
apiVersion: v1
metadata:
name: build-tool-detector
objects:
- apiVersion: v1
kind: Secret
metadata:
name: build-tool-detector
type: Opaque
data:
github.client.id: ZGI=
github.client.secret: NTQzMg==
sentry.dsn: cG9zdGdyZXM=
- apiVersion: v1
kind: ConfigMap
metadata:
name: build-tool-detector
type: Opaque
data:
auth.uri: http://auth:8089

0 comments on commit 1e5978b

Please sign in to comment.