Skip to content

Commit

Permalink
update to devfile 220
Browse files Browse the repository at this point in the history
Signed-off-by: Stephanie <[email protected]>
  • Loading branch information
yangcao77 committed Nov 4, 2021
1 parent 03d097d commit 5135224
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 12 deletions.
26 changes: 14 additions & 12 deletions devfile.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
schemaVersion: 2.0.0
schemaVersion: 2.2.0
metadata:
name: java-springboot
version: 1.1.0
attributes:
alpha.build-context: .
alpha.build-dockerfile: docker/Dockerfile
alpha.dockerimage-port: 8081
displayName: Java Spring Boot
description: Java Spring Boot using Maven
tags: ["Java", "Spring"]
projectType: "springboot"
language: "java"
provider: Red Hat
supportUrl: https://github.com/devfile-samples/devfile-support#support-information
starterProjects:
- name: springbootproject
git:
remotes:
origin: "https://github.com/odo-devfiles/springboot-ex.git"
components:
- name: buildguidance
attributes:
tool: console-import
container:
image: buildguidanceimage-placeholder
memoryLimit: 1024Mi
endpoints:
- name: http-8081
targetPort: 8081
- name: outerloop-build
image:
imageName: java-springboot-image:latest
dockerfile:
uri: docker/Dockerfile
buildContext: .
rootRequired: false
- name: outerloop-deploy
kubernetes:
uri: outerloop-deploy.yaml
- name: tools
container:
image: quay.io/eclipse/che-java11-maven:nightly
Expand Down
25 changes: 25 additions & 0 deletions outerloop-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: my-java-springboot
spec:
replicas: 1
selector:
matchLabels:
app: java-springboot-app
template:
metadata:
labels:
app: java-springboot-app
spec:
containers:
- name: my-java-springboot
image: java-springboot-image:latest
ports:
- name: http
containerPort: 8081
protocol: TCP
resources:
limits:
memory: "1024Mi"
cpu: "500m"

0 comments on commit 5135224

Please sign in to comment.