Skip to content

Instantly share code, notes, and snippets.

@gytis
Created February 28, 2017 11:10
Show Gist options
  • Save gytis/85d657ef034cc170ec354c22c8e5fb78 to your computer and use it in GitHub Desktop.
Save gytis/85d657ef034cc170ec354c22c8e5fb78 to your computer and use it in GitHub Desktop.
spring-boot-health-check-example name-service openshift.yml
---
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/scrape: "true"
fabric8.io/scm-tag: HEAD
prometheus.io/port: "9779"
fabric8.io/scm-url: https://github.com/spring-projects/spring-boot/spring-boot-starter-parent/spring-boot-health-check-example/name-service
labels:
expose: "true"
provider: fabric8
project: name-service
version: 1.0.0
group: org.jboss.snowdrop
name: name-service
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8080
selector:
project: name-service
provider: fabric8
group: org.jboss.snowdrop
- apiVersion: v1
kind: DeploymentConfig
metadata:
annotations:
fabric8.io/metrics-path: dashboard/file/kubernetes-pods.json/?var-project=name-service&var-version=1.0.0
fabric8.io/scm-tag: HEAD
fabric8.io/scm-url: https://github.com/spring-projects/spring-boot/spring-boot-starter-parent/spring-boot-health-check-example/name-service
labels:
provider: fabric8
project: name-service
version: 1.0.0
group: org.jboss.snowdrop
name: name-service
spec:
replicas: 1
selector:
project: name-service
provider: fabric8
group: org.jboss.snowdrop
template:
metadata:
annotations:
fabric8.io/metrics-path: dashboard/file/kubernetes-pods.json/?var-project=name-service&var-version=1.0.0
fabric8.io/scm-tag: HEAD
fabric8.io/scm-url: https://github.com/spring-projects/spring-boot/spring-boot-starter-parent/spring-boot-health-check-example/name-service
labels:
provider: fabric8
project: name-service
version: 1.0.0
group: org.jboss.snowdrop
spec:
containers:
- env:
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: JAVA_APP_DIR
value: /deployments
image: name-service:1.0.0
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
path: /health
port: 8080
scheme: HTTP
initialDelaySeconds: 180
name: spring-boot
ports:
- containerPort: 8080
name: http
protocol: TCP
- containerPort: 9779
name: prometheus
protocol: TCP
- containerPort: 8778
name: jolokia
protocol: TCP
readinessProbe:
httpGet:
path: /health
port: 8080
scheme: HTTP
initialDelaySeconds: 10
securityContext:
privileged: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- spring-boot
from:
kind: ImageStreamTag
name: name-service:1.0.0
type: ImageChange
- apiVersion: v1
kind: Route
metadata:
labels:
provider: fabric8
project: name-service
version: 1.0.0
group: org.jboss.snowdrop
name: name-service
spec:
port:
targetPort: 8080
to:
kind: Service
name: name-service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment