Skip to content

Commit

Permalink
WIP(ch9s6): update current code
Browse files Browse the repository at this point in the history
  • Loading branch information
dkolepp committed Jul 16, 2019
1 parent 6e57953 commit 698457a
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 1 deletion.
3 changes: 2 additions & 1 deletion micro-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
<version.war.plugin>2.5</version.war.plugin>
<!--
<version.fabric8.plugin>3.1.80.redhat-000019</version.fabric8.plugin>
-->
<!--
<version.fabric8.plugin>3.5.38</version.fabric8.plugin>
-->
<version.fabric8.plugin>4.1.0</version.fabric8.plugin>

<!-- maven-compiler-plugin -->
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
Expand Down
61 changes: 61 additions & 0 deletions micro-java/src/main/fabric8/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
apiVersion: "v1"
kind: "DeploymentConfig"
metadata:
annotations:
fabric8.io/iconUrl: "img/icons/camel.svg"
labels:
provider: "fabric8"
project: "${env.RHT_OCP4_DEV_USER}-${project.artifactId}"
version: "1.0"
group: "com.redhat.training"
name: "${project.artifactId}"
spec:
replicas: 1
selector:
project: "${env.RHT_OCP4_DEV_USER}-${project.artifactId}"
provider: "fabric8"
group: "com.redhat.training"
strategy:
rollingParams:
timeoutSeconds: 10800
type: "Rolling"
template:
metadata:
annotations:
fabric8.io/iconUrl: "img/icons/camel.svg"
labels:
provider: "fabric8"
project: "${env.RHT_OCP4_DEV_USER}-${project.artifactId}"
version: "1.0"
group: "com.redhat.training"
spec:
containers:
- image: "${project.artifactId}:1.0"
imagePullPolicy: "IfNotPresent"
name: "spring-boot"
ports:
- containerPort: 8080
name: "http"
protocol: "TCP"
#- containerPort: 9081
# name: "rest"
# protocol: "TCP"
securityContext:
privileged: false
#readinessProbe:
# httpGet:
# path: "/hello/health"
# port: 9081
# initialDelaySeconds: 20
triggers:
- type: "ConfigChange"
- imageChangeParams:
automatic: true
containerNames:
- "spring-boot"
from:
kind: "ImageStreamTag"
name: "${project.artifactId}:1.0"
type: "ImageChange"

19 changes: 19 additions & 0 deletions micro-java/src/main/fabric8/route.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
apiVersion: v1
kind: Route
metadata:
labels:
expose: "true"
app: ${project.artifactId}
provider: fabric8
version: "1.0"
group: com.redhat.training
name: ${project.artifactId}
spec:
# host: ${hostname}
port:
targetPort: 8080
to:
kind: Service
name: ${project.artifactId}

26 changes: 26 additions & 0 deletions micro-java/src/main/fabric8/svc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
apiVersion: v1
kind: Service
metadata:
# annotations:
# fabric8.io/iconUrl: img/icons/camel.svg
labels:
expose: "true"
app: ${project.artifactId}
provider: fabric8
version: "1.0"
group: com.redhat.training
name: ${project.artifactId}
spec:
ports:
- name: http-tomcat
port: 8080
protocol: TCP
targetPort: 8080
# - name: rest
# port: ${rest-port}
# protocol: TCP
# targetPort: ${rest-port}
selector:
deploymentconfig: ${project.artifactId}

0 comments on commit 698457a

Please sign in to comment.