-
Notifications
You must be signed in to change notification settings - Fork 96
chore: Add new go stack version with the new runtime image version #665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vinokurig
wants to merge
4
commits into
devfile:main
Choose a base branch
from
vinokurig:che-23717
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+240
−1
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
05460d1
chore: Add new go stack version with the new runtime image version
vinokurig 26cad72
Update stacks/go/2.5.1/docker/Dockerfile
vinokurig 27f5612
Update stacks/go/2.5.1/devfile.yaml
vinokurig 4d70295
fixup! chore: Add new go stack version with the new runtime image ver…
vinokurig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| schemaVersion: 2.2.0 | ||
| metadata: | ||
| name: go | ||
| displayName: Go Runtime | ||
| description: Go (version 1.24.x) is an open source programming language that makes it easy to build simple, reliable, and efficient software. | ||
| icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg | ||
| tags: | ||
| - Go | ||
| projectType: Go | ||
| language: Go | ||
| provider: Red Hat | ||
| version: 1.5.0 | ||
| starterProjects: | ||
| - name: go-starter | ||
| description: A Go project with a simple HTTP server | ||
| git: | ||
| checkoutFrom: | ||
| revision: v1.5.0 | ||
| remotes: | ||
| origin: https://github.com/devfile-samples/devfile-stack-go.git | ||
| components: | ||
| - container: | ||
| endpoints: | ||
| - name: https-go | ||
| targetPort: 8080 | ||
| protocol: https | ||
| - exposure: none | ||
| name: debug | ||
| targetPort: 5858 | ||
| image: registry.access.redhat.com/ubi9/go-toolset:1.25.5-1770654497 | ||
| args: ["tail", "-f", "/dev/null"] | ||
| env: | ||
| - name: DEBUG_PORT | ||
| value: '5858' | ||
| memoryLimit: 1024Mi | ||
| mountSources: true | ||
| name: runtime | ||
| commands: | ||
| - exec: | ||
| env: | ||
| - name: GOPATH | ||
| value: ${PROJECT_SOURCE}/.go | ||
| - name: GOCACHE | ||
| value: ${PROJECT_SOURCE}/.cache | ||
| commandLine: go build main.go | ||
| component: runtime | ||
| group: | ||
| isDefault: true | ||
| kind: build | ||
| workingDir: ${PROJECT_SOURCE} | ||
| id: build | ||
| - exec: | ||
| commandLine: ./main | ||
| component: runtime | ||
| group: | ||
| isDefault: true | ||
| kind: run | ||
| workingDir: ${PROJECT_SOURCE} | ||
| id: run | ||
| - exec: | ||
| env: | ||
| - name: GOPATH | ||
| value: ${PROJECT_SOURCE}/.go | ||
| - name: GOCACHE | ||
| value: ${PROJECT_SOURCE}/.cache | ||
| commandLine: | | ||
| dlv \ | ||
| --listen=127.0.0.1:${DEBUG_PORT} \ | ||
| --only-same-user=false \ | ||
| --headless=true \ | ||
| --api-version=2 \ | ||
| --accept-multiclient \ | ||
| debug --continue main.go | ||
| component: runtime | ||
| group: | ||
| isDefault: true | ||
| kind: debug | ||
| workingDir: ${PROJECT_SOURCE} | ||
| id: debug |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| schemaVersion: 2.2.2 | ||
| metadata: | ||
| name: go | ||
| displayName: Go Runtime | ||
| description: Go (version 1.25.x) is an open source programming language that makes it easy to build simple, reliable, and efficient software. | ||
| icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg | ||
| tags: | ||
| - Go | ||
| projectType: Go | ||
| language: Go | ||
| provider: Red Hat | ||
| version: 2.6.0 | ||
| starterProjects: | ||
| - name: go-starter | ||
| description: A Go project with a simple HTTP server | ||
| git: | ||
| checkoutFrom: | ||
| revision: v2.6.0 | ||
| remotes: | ||
| origin: https://github.com/devfile-samples/devfile-stack-go.git | ||
| components: | ||
| - name: build | ||
| image: | ||
| imageName: go-image:latest | ||
| dockerfile: | ||
| uri: docker/Dockerfile | ||
| buildContext: . | ||
| rootRequired: false | ||
| - name: deploy | ||
| kubernetes: | ||
| uri: kubernetes/deploy.yaml | ||
| endpoints: | ||
| - name: http-8081 | ||
| targetPort: 8081 | ||
| - container: | ||
| endpoints: | ||
| - name: https-go | ||
| protocol: https | ||
| targetPort: 8080 | ||
| - exposure: none | ||
| name: debug | ||
| targetPort: 5858 | ||
| image: registry.access.redhat.com/ubi9/go-toolset:1.25.5-1770654497 | ||
| args: ['tail', '-f', '/dev/null'] | ||
| env: | ||
| - name: DEBUG_PORT | ||
| value: '5858' | ||
| memoryLimit: 1024Mi | ||
| mountSources: true | ||
| name: runtime | ||
| commands: | ||
| - id: build-image | ||
| apply: | ||
| component: build | ||
| - id: deployk8s | ||
| apply: | ||
| component: deploy | ||
| - id: deploy | ||
| composite: | ||
| commands: | ||
| - build-image | ||
| - deployk8s | ||
| group: | ||
| kind: deploy | ||
| isDefault: true | ||
| - exec: | ||
| env: | ||
| - name: GOPATH | ||
| value: ${PROJECT_SOURCE}/.go | ||
| - name: GOCACHE | ||
| value: ${PROJECT_SOURCE}/.cache | ||
| commandLine: go build main.go | ||
| component: runtime | ||
| group: | ||
| isDefault: true | ||
| kind: build | ||
| workingDir: ${PROJECT_SOURCE} | ||
| id: build | ||
| - exec: | ||
| commandLine: ./main | ||
| component: runtime | ||
| group: | ||
| isDefault: true | ||
| kind: run | ||
| workingDir: ${PROJECT_SOURCE} | ||
| id: run | ||
|
|
||
| - exec: | ||
| commandLine: | | ||
| GOPATH=${PROJECT_SOURCE}/.go \ | ||
| GOCACHE=${PROJECT_SOURCE}/.cache \ | ||
| dlv \ | ||
| --listen=127.0.0.1:${DEBUG_PORT} \ | ||
| --only-same-user=false \ | ||
| --headless=true \ | ||
| --api-version=2 \ | ||
| --accept-multiclient \ | ||
| debug --continue main.go | ||
| component: runtime | ||
| group: | ||
| isDefault: true | ||
| kind: debug | ||
| workingDir: ${PROJECT_SOURCE} | ||
| id: debug | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| FROM registry.access.redhat.com/ubi9/go-toolset:1.25.5-1770654497 | ||
|
|
||
| COPY go.mod ./ | ||
| RUN go mod download | ||
|
|
||
| COPY *.go ./ | ||
|
|
||
| RUN go build -o ./main | ||
|
|
||
| EXPOSE 8081 | ||
|
|
||
| CMD [ "./main" , "-p=8081"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| kind: Service | ||
| apiVersion: v1 | ||
| metadata: | ||
| name: my-go-svc | ||
| spec: | ||
| ports: | ||
| - name: http-8081 | ||
| port: 8081 | ||
| protocol: TCP | ||
| targetPort: 8081 | ||
| selector: | ||
| app: go-app | ||
| --- | ||
| kind: Deployment | ||
| apiVersion: apps/v1 | ||
| metadata: | ||
| name: my-go | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: go-app | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: go-app | ||
| spec: | ||
| containers: | ||
| - name: my-go | ||
| image: go-image:latest | ||
| ports: | ||
| - name: http | ||
| containerPort: 8081 | ||
| protocol: TCP | ||
| resources: | ||
| requests: | ||
| memory: "10Mi" | ||
| cpu: "10m" | ||
| limits: | ||
| memory: "100Mi" | ||
| cpu: "100m" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll also want an update to the starter project to have Go 1.25 and a stack version reference tag with these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in devfile-samples/devfile-stack-go#4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michael-valdron We would need to push a new tag after the pull request. Would you be able to do that?