Skip to content

Commit d097270

Browse files
authored
Merge pull request #8 from yangcao77/add-svc-and-endpoint
add svc and endpoint definition
2 parents 7550195 + 7682721 commit d097270

2 files changed

Lines changed: 23 additions & 6 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,16 @@ spec:
2323
limits:
2424
memory: "1024Mi"
2525
cpu: "500m"
26+
---
27+
kind: Service
28+
apiVersion: v1
29+
metadata:
30+
name: my-go-svc
31+
spec:
32+
ports:
33+
- name: http-8081
34+
port: 8081
35+
protocol: TCP
36+
targetPort: 8081
37+
selector:
38+
app: go-app

devfile.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
projectType: Go
99
tags:
1010
- Go
11-
version: 1.0.1
11+
version: 1.1.0
1212
provider: Red Hat
1313
supportUrl: https://github.com/devfile-samples/devfile-support#support-information
1414
attributes:
@@ -17,14 +17,14 @@ parent:
1717
id: go
1818
registryUrl: 'https://registry.devfile.io'
1919
components:
20-
- name: outerloop-build
20+
- name: image-build
2121
image:
2222
imageName: go-image:latest
2323
dockerfile:
2424
uri: docker/Dockerfile
2525
buildContext: .
2626
rootRequired: false
27-
- name: outerloop-deploy
27+
- name: kubernetes-deploy
2828
attributes:
2929
deployment/replicas: 1
3030
deployment/cpuLimit: '100m'
@@ -33,14 +33,18 @@ components:
3333
deployment/memoryRequest: 10Mi
3434
deployment/container-port: 8081
3535
kubernetes:
36-
uri: outerloop-deploy.yaml
36+
uri: deploy.yaml
37+
endpoints:
38+
- name: http-8081
39+
targetPort: 8081
40+
path: /
3741
commands:
3842
- id: build-image
3943
apply:
40-
component: outerloop-build
44+
component: image-build
4145
- id: deployk8s
4246
apply:
43-
component: outerloop-deploy
47+
component: kubernetes-deploy
4448
- id: deploy
4549
composite:
4650
commands:

0 commit comments

Comments
 (0)