Skip to content

Commit 0c840c9

Browse files
authored
Merge pull request #1 from yangcao77/666-updatedevfile-2.2.0
update to devfile 220
2 parents de421f7 + 17a00b0 commit 0c840c9

File tree

2 files changed

+53
-12
lines changed

2 files changed

+53
-12
lines changed

devfile.yaml

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
1-
schemaVersion: 2.0.0
1+
schemaVersion: 2.2.0
22
metadata:
33
name: python
44
version: 1.0.0
5+
provider: Red Hat
6+
supportUrl: https://github.com/devfile-samples/devfile-support#support-information
57
attributes:
6-
alpha.build-context: .
7-
alpha.build-dockerfile: docker/Dockerfile
8+
alpha.dockerimage-port: 8081
89
starterProjects:
910
- name: python-example
1011
git:
1112
remotes:
1213
origin: https://github.com/odo-devfiles/python-ex
1314
components:
14-
- name: buildguidance
15-
attributes:
16-
tool: console-import
17-
container:
18-
image: buildguidanceimage-placeholder
19-
memoryLimit: 1024Mi
20-
endpoints:
21-
- name: http-8081
22-
targetPort: 8081
15+
- name: outerloop-build
16+
image:
17+
imageName: python-image:latest
18+
dockerfile:
19+
uri: docker/Dockerfile
20+
buildContext: .
21+
rootRequired: false
22+
- name: outerloop-deploy
23+
kubernetes:
24+
uri: outerloop-deploy.yaml
2325
- name: py-web
2426
container:
2527
image: quay.io/eclipse/che-python-3.7:nightly
@@ -50,3 +52,17 @@ commands:
5052
component: py-web
5153
group:
5254
kind: debug
55+
- id: build-image
56+
apply:
57+
component: outerloop-build
58+
- id: deployk8s
59+
apply:
60+
component: outerloop-deploy
61+
- id: deploy
62+
composite:
63+
commands:
64+
- build-image
65+
- deployk8s
66+
group:
67+
kind: deploy
68+
isDefault: true

outerloop-deploy.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
kind: Deployment
2+
apiVersion: apps/v1
3+
metadata:
4+
name: my-python
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: python-app
10+
template:
11+
metadata:
12+
labels:
13+
app: python-app
14+
spec:
15+
containers:
16+
- name: my-python
17+
image: python-image:latest
18+
ports:
19+
- name: http
20+
containerPort: 8081
21+
protocol: TCP
22+
resources:
23+
limits:
24+
memory: "128Mi"
25+
cpu: "500m"

0 commit comments

Comments
 (0)