Skip to content

Commit

Permalink
Merge pull request #9 from yangcao77/main
Browse files Browse the repository at this point in the history
update sample
  • Loading branch information
yangcao77 authored Nov 1, 2022
2 parents bcc068f + b76cfc1 commit 2f69630
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
.project
.settings
target
.odo/env
.odo/env
.idea
.DS_Store
13 changes: 13 additions & 0 deletions outerloop-deploy.yaml → deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,16 @@ spec:
limits:
memory: "1024Mi"
cpu: "500m"
---
kind: Service
apiVersion: v1
metadata:
name: my-java-springboot-svc
spec:
ports:
- name: http-8081
port: 8081
protocol: TCP
targetPort: 8081
selector:
app: java-springboot-app
16 changes: 10 additions & 6 deletions devfile.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
schemaVersion: 2.2.0
metadata:
name: java-springboot
version: 1.1.0
version: 1.2.0
attributes:
alpha.dockerimage-port: 8081
displayName: Java Spring Boot
Expand All @@ -15,14 +15,14 @@ parent:
id: java-springboot
registryUrl: "https://registry.devfile.io"
components:
- name: outerloop-build
- name: image-build
image:
imageName: java-springboot-image:latest
dockerfile:
uri: docker/Dockerfile
buildContext: .
rootRequired: false
- name: outerloop-deploy
- name: kubernetes-deploy
attributes:
deployment/replicas: 1
deployment/cpuLimit: "100m"
Expand All @@ -31,14 +31,18 @@ components:
deployment/memoryRequest: 180Mi
deployment/container-port: 8081
kubernetes:
uri: outerloop-deploy.yaml
uri: deploy.yaml
endpoints:
- name: http-8081
targetPort: 8081
path: /
commands:
- id: build-image
apply:
component: outerloop-build
component: image-build
- id: deployk8s
apply:
component: outerloop-deploy
component: kubernetes-deploy
- id: deploy
composite:
commands:
Expand Down

0 comments on commit 2f69630

Please sign in to comment.