Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 28 additions & 12 deletions devfile.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
schemaVersion: 2.0.0
schemaVersion: 2.2.0
metadata:
name: python
version: 1.0.0
provider: Red Hat
supportUrl: https://github.com/devfile-samples/devfile-support#support-information
attributes:
alpha.build-context: .
alpha.build-dockerfile: docker/Dockerfile
alpha.dockerimage-port: 8081
starterProjects:
- name: python-example
git:
remotes:
origin: https://github.com/odo-devfiles/python-ex
components:
- name: buildguidance
attributes:
tool: console-import
container:
image: buildguidanceimage-placeholder
memoryLimit: 1024Mi
endpoints:
- name: http-8081
targetPort: 8081
- name: outerloop-build
image:
imageName: python-image:latest
dockerfile:
uri: docker/Dockerfile
buildContext: .
rootRequired: false
- name: outerloop-deploy
kubernetes:
uri: outerloop-deploy.yaml
- name: py-web
container:
image: quay.io/eclipse/che-python-3.7:nightly
Expand Down Expand Up @@ -50,3 +52,17 @@ commands:
component: py-web
group:
kind: debug
- id: build-image
apply:
component: outerloop-build
- id: deployk8s
apply:
component: outerloop-deploy
- id: deploy
composite:
commands:
- build-image
- deployk8s
group:
kind: deploy
isDefault: true
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-python
spec:
replicas: 1
selector:
matchLabels:
app: python-app
template:
metadata:
labels:
app: python-app
spec:
containers:
- name: my-python
image: python-image:latest
ports:
- name: http
containerPort: 8081
protocol: TCP
resources:
limits:
memory: "128Mi"
cpu: "500m"