forked from devfile-samples/devfile-sample-python-basic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevfile.yaml
More file actions
96 lines (96 loc) · 2.95 KB
/
devfile.yaml
File metadata and controls
96 lines (96 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
schemaVersion: 2.2.0
metadata:
name: python
projectType: Python
displayName: Python
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/python.svg
description:
'Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.
Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together.'
language: Python
version: 1.0.1
provider: Red Hat
tags:
- Python
- Pip
- Flask
supportUrl: https://github.com/devfile-samples/devfile-support#support-information
components:
- name: image-build
image:
imageName: python-image:latest
dockerfile:
uri: docker/Dockerfile
buildContext: .
rootRequired: false
- name: kubernetes-deploy
attributes:
deployment/replicas: 1
deployment/cpuRequest: 10m
deployment/memoryRequest: 50Mi
deployment/container-port: 8081
kubernetes:
inlined: |
{
"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": {
"requests": {
"memory": "50Mi",
"cpu": "10m"
}
}
}
]
}
}
}
}
endpoints:
- name: http-8081
targetPort: 8081
path: /
secure: true
commands:
- id: build-image
apply:
component: image-build
- id: deployk8s
apply:
component: kubernetes-deploy
- id: deploy
composite:
commands:
- build-image
- deployk8s
group:
kind: deploy
isDefault: true