shifted use case from schedule to monitor
This commit is contained in:
parent
28aa8c64a4
commit
69966a5aa5
@ -2,7 +2,7 @@ FROM golang:alpine AS builder
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN apt install tar/stable
|
||||||
RUN go build .
|
RUN go build .
|
||||||
RUN mkdir workflows/
|
RUN mkdir workflows/
|
||||||
|
|
||||||
@ -10,6 +10,7 @@ FROM scratch
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY --from=builder /bin/tar /bin/tar
|
||||||
COPY conf/ocmonitor_conf.json /app/conf/
|
COPY conf/ocmonitor_conf.json /app/conf/
|
||||||
COPY --from=builder /app/oc-monitor .
|
COPY --from=builder /app/oc-monitor .
|
||||||
COPY --from=builder /app/workflows/ .
|
COPY --from=builder /app/workflows/ .
|
||||||
|
15
conf/conf.go
15
conf/conf.go
@ -2,17 +2,12 @@ package conf
|
|||||||
|
|
||||||
import "sync"
|
import "sync"
|
||||||
|
|
||||||
// declare the flag to use for each variable
|
|
||||||
var map_arguments = map[string]string {
|
|
||||||
"LokiURL" : "u",
|
|
||||||
"ArgoFile": "f",
|
|
||||||
"ContainerName" : "n",
|
|
||||||
}
|
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
LokiURL string
|
LokiURL string
|
||||||
ArgoFile string
|
WorkflowID string
|
||||||
ContainerName string
|
OcCatalogUrl string
|
||||||
|
MongoUrl string
|
||||||
|
Database string
|
||||||
}
|
}
|
||||||
|
|
||||||
var instance *Config
|
var instance *Config
|
||||||
@ -25,6 +20,6 @@ func GetConfig() *Config {
|
|||||||
return instance
|
return instance
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetConfFromArgs(argument string){
|
func GetConfFromArgs(argument string) {
|
||||||
|
|
||||||
}
|
}
|
@ -1 +0,0 @@
|
|||||||
{}
|
|
30
go.mod
30
go.mod
@ -3,15 +3,41 @@ module oc-monitor
|
|||||||
go 1.22.0
|
go 1.22.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
cloud.o-forge.io/core/oc-lib v0.0.0-20240725103514-2891dc8a6819
|
cloud.o-forge.io/core/oc-lib v0.0.0-20240805134753-17f62b649523
|
||||||
github.com/akamensky/argparse v1.4.0
|
github.com/akamensky/argparse v1.4.0
|
||||||
github.com/goraz/onion v0.1.3
|
github.com/goraz/onion v0.1.3
|
||||||
|
github.com/nats-io/nats-server/v2 v2.10.18
|
||||||
|
github.com/nwtgck/go-fakelish v0.1.3
|
||||||
github.com/rs/zerolog v1.33.0
|
github.com/rs/zerolog v1.33.0
|
||||||
|
github.com/tidwall/gjson v1.17.2
|
||||||
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
github.com/gabriel-vasile/mimetype v1.4.5 // indirect
|
||||||
|
github.com/go-playground/locales v0.14.1 // indirect
|
||||||
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||||
|
github.com/go-playground/validator/v10 v10.22.0 // indirect
|
||||||
|
github.com/golang/snappy v0.0.4 // indirect
|
||||||
|
github.com/google/uuid v1.6.0 // indirect
|
||||||
|
github.com/klauspost/compress v1.17.9 // indirect
|
||||||
|
github.com/leodido/go-urn v1.4.0 // indirect
|
||||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||||
|
github.com/montanaflynn/stats v0.7.1 // indirect
|
||||||
github.com/smartystreets/goconvey v1.6.4 // indirect
|
github.com/smartystreets/goconvey v1.6.4 // indirect
|
||||||
golang.org/x/sys v0.22.0 // indirect
|
github.com/tidwall/match v1.1.1 // indirect
|
||||||
|
github.com/tidwall/pretty v1.2.0 // indirect
|
||||||
|
github.com/ugorji/go/codec v1.1.7 // indirect
|
||||||
|
github.com/vk496/cron v1.2.0 // indirect
|
||||||
|
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
|
||||||
|
github.com/xdg-go/scram v1.1.2 // indirect
|
||||||
|
github.com/xdg-go/stringprep v1.0.4 // indirect
|
||||||
|
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
|
||||||
|
go.mongodb.org/mongo-driver v1.16.0 // indirect
|
||||||
|
golang.org/x/crypto v0.25.0 // indirect
|
||||||
|
golang.org/x/net v0.27.0 // indirect
|
||||||
|
golang.org/x/sync v0.8.0 // indirect
|
||||||
|
golang.org/x/sys v0.23.0 // indirect
|
||||||
|
golang.org/x/text v0.16.0 // indirect
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user