Skip to content
This repository was archived by the owner on Nov 27, 2025. It is now read-only.

Commit bb7a676

Browse files
authored
Merge pull request #3 from yangcao77/main
update sample
2 parents c53fa4b + 11fe7fd commit bb7a676

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11

2-
.odo/
2+
.odo/
3+
.odo/odo-file-index.json
4+
.idea
5+
.DS_Store

devfile.yaml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
schemaVersion: 2.2.0
22
metadata:
33
name: dotnet60
4-
version: 1.0.0
4+
version: 1.1.0
55
icon: https://github.com/dotnet/brand/raw/main/logo/dotnet-logo.png
66
provider: Red Hat
77
supportUrl: https://github.com/devfile-samples/devfile-support#support-information
@@ -36,14 +36,14 @@ components:
3636
endpoints:
3737
- name: http-8080
3838
targetPort: 8080
39-
- name: outerloop-build
39+
- name: image-build
4040
image:
4141
imageName: "dotnet-image:latest"
4242
dockerfile:
4343
uri: docker/Dockerfile
4444
buildContext: .
4545
rootRequired: false
46-
- name: outerloop-deploy
46+
- name: kubernetes-deploy
4747
attributes:
4848
deployment/replicas: 1
4949
deployment/cpuLimit: "100m"
@@ -53,7 +53,11 @@ components:
5353
deployment/container-port: 8081
5454
kubernetes:
5555
uri: kubernetes/deployment.yaml
56-
- name: outerloop-service
56+
endpoints:
57+
- name: http-8081
58+
targetPort: 8081
59+
path: /
60+
- name: kubernetes-service
5761
attributes:
5862
deployment/replicas: 1
5963
deployment/cpuLimit: "100m"
@@ -72,7 +76,6 @@ commands:
7276
group:
7377
isDefault: true
7478
kind: build
75-
7679
- id: run
7780
exec:
7881
workingDir: ${PROJECT_SOURCE}
@@ -83,13 +86,13 @@ commands:
8386
kind: run
8487
- id: build-image
8588
apply:
86-
component: outerloop-build
89+
component: image-build
8790
- id: deploy-deployment
8891
apply:
89-
component: outerloop-deploy
92+
component: kubernetes-deploy
9093
- id: deploy-service
9194
apply:
92-
component: outerloop-service
95+
component: kubernetes-service
9396
- id: deploy
9497
composite:
9598
commands:

kubernetes/deployment.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ spec:
1414
spec:
1515
containers:
1616
- name: main
17-
image: "{{CONTAINER_IMAGE}}"
17+
image: "dotnet-image:latest"
1818
imagePullPolicy: Always
19-
resources: {}
19+
ports:
20+
- name: http
21+
containerPort: 8081
22+
protocol: TCP
23+
resources:
24+
limits:
25+
memory: "1024Mi"
26+
cpu: "500m"
2027

0 commit comments

Comments
 (0)