Skip to content

Commit

Permalink
Merge pull request #25 from energywebfoundation/develop
Browse files Browse the repository at this point in the history
merge develop to master
  • Loading branch information
hejkerooo authored May 19, 2023
2 parents 3008661 + 33b644c commit 60c2dc6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
echo "PRERELEASE=true" >> $GITHUB_OUTPUT
echo "IMAGE_TAG=$(uuidgen)" >> $GITHUB_OUTPUT
echo "TAG_DRY_RUN=true" >> $GITHUB_OUTPUT
echo "PUSH_DOCKER=false" >> $GITHUB_OUTPUT
echo "PUSH_DOCKER=true" >> $GITHUB_OUTPUT
elif [ "${{ github.ref }}" = "refs/heads/master" ]; then
echo "ENVIRONMENT=staging" >> $GITHUB_OUTPUT
echo "PRERELEASE=true" >> $GITHUB_OUTPUT
Expand Down
10 changes: 10 additions & 0 deletions cmd/sample-app/main.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
package main

import (
"errors"
"io"
"log"
"net/http"
"os"

"github.com/energywebfoundation/sample-go-app/internal/latestblock"
)

func main() {

shouldCrash := os.Getenv("SHOULD_CRASH")

if shouldCrash == "true" {
panic(errors.New("SHOULD_CRASH is set to true"))

return
}

shouldReturnHealth := true

handlers := latestblock.WrapperStruct{RpcUrl: "https://volta-rpc.energyweb.org"}
Expand Down
3 changes: 3 additions & 0 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: "SHOULD_CRASH"
value: {{.Values.shouldCrash}}
ports:
- name: http
containerPort: {{ .Values.service.port }}
Expand Down
3 changes: 2 additions & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ imagePullSecrets: []
nameOverride: "sample-go-app"
fullnameOverride: "sample-go-app"

restartPolicy: "Never"
restartPolicy: "Always"
shouldCrash: "False"

serviceAccount:
# Specifies whether a service account should be created
Expand Down

0 comments on commit 60c2dc6

Please sign in to comment.