Skip to content

Commit

Permalink
add svc and endpoint definition
Browse files Browse the repository at this point in the history
Signed-off-by: Stephanie <[email protected]>
  • Loading branch information
yangcao77 committed Nov 8, 2022
1 parent 7550195 commit 7682721
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
13 changes: 13 additions & 0 deletions outerloop-deploy.yaml → deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,16 @@ spec:
limits:
memory: "1024Mi"
cpu: "500m"
---
kind: Service
apiVersion: v1
metadata:
name: my-go-svc
spec:
ports:
- name: http-8081
port: 8081
protocol: TCP
targetPort: 8081
selector:
app: go-app
16 changes: 10 additions & 6 deletions devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
projectType: Go
tags:
- Go
version: 1.0.1
version: 1.1.0
provider: Red Hat
supportUrl: https://github.com/devfile-samples/devfile-support#support-information
attributes:
Expand All @@ -17,14 +17,14 @@ parent:
id: go
registryUrl: 'https://registry.devfile.io'
components:
- name: outerloop-build
- name: image-build
image:
imageName: go-image:latest
dockerfile:
uri: docker/Dockerfile
buildContext: .
rootRequired: false
- name: outerloop-deploy
- name: kubernetes-deploy
attributes:
deployment/replicas: 1
deployment/cpuLimit: '100m'
Expand All @@ -33,14 +33,18 @@ components:
deployment/memoryRequest: 10Mi
deployment/container-port: 8081
kubernetes:
uri: outerloop-deploy.yaml
uri: deploy.yaml
endpoints:
- name: http-8081
targetPort: 8081
path: /
commands:
- id: build-image
apply:
component: outerloop-build
component: image-build
- id: deployk8s
apply:
component: outerloop-deploy
component: kubernetes-deploy
- id: deploy
composite:
commands:
Expand Down

0 comments on commit 7682721

Please sign in to comment.