Skip to content

Commit

Permalink
Merge pull request #15 from energywebfoundation/master
Browse files Browse the repository at this point in the history
Master
  • Loading branch information
michalziobro authored Mar 22, 2023
2 parents 7d43066 + deccc30 commit bdef50f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/sample-app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
func main() {

handlers := latestblock.WrapperStruct{RpcUrl: "https://volta-rpc.energyweb.org"}
// Hello world, the web server
// Hello world

helloHandler := func(w http.ResponseWriter, req *http.Request) {
io.WriteString(w, "Hello, world!\n")
Expand Down
19 changes: 19 additions & 0 deletions helm/templates/presync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if .Values.presync.enabled -}}
apiVersion: v1
kind: Pod
metadata:
name: presync-helm
namespace: sample
annotations:
argocd.argoproj.io/sync-wave: "0"
argocd.argoproj.io/hook: PreSync
labels:
app.kubernetes.io/name: presync-helm
spec:
containers:
- name: sample-app-presync
image: registry.access.redhat.com/ubi8/ubi
command: ['bash', '-c', 'sleep 3 ; echo Presync']
imagePullPolicy: Always
restartPolicy: "Never"
{{- end }}
4 changes: 4 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,7 @@ nodeSelector: {}
tolerations: []

affinity: {}

# Enable pre sync hook for ArgoCD
presync:
enabled: true

0 comments on commit bdef50f

Please sign in to comment.