Compare commits
No commits in common. "af626f35c4ce371fd4ba635d3bc195d8000584aa" and "690e75d7c82d20f6849f564c41b079d05bf3fcd2" have entirely different histories.
af626f35c4
...
690e75d7c8
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,2 @@
|
||||
.idea
|
||||
config.yml
|
||||
config.sm.yaml
|
||||
|
@ -1,4 +0,0 @@
|
||||
modules:
|
||||
- import: go.adphi.net/go-repo
|
||||
repository: git.adphi.net/adphi/go-repo
|
||||
readme: git.adphi.net/adphi/go-repo/raw/master/README.md
|
@ -1,58 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: go-repo
|
||||
labels:
|
||||
app: go-repo
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
name: go-repo
|
||||
labels:
|
||||
app: go-repo
|
||||
spec:
|
||||
containers:
|
||||
- name: go-repo
|
||||
args:
|
||||
- /config/config.yml
|
||||
image: adphi/go-repo
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 8888
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: config
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: go-repo
|
||||
selector:
|
||||
matchLabels:
|
||||
app: go-repo
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: go-repo
|
||||
data:
|
||||
config.yml: |
|
||||
modules:
|
||||
- import: go.adphi.net/go-repo
|
||||
repository: git.adphi.net/adphi/go-repo
|
||||
readme: git.adphi.net/adphi/go-repo/raw/master/README.md
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: go-repo
|
||||
spec:
|
||||
selector:
|
||||
app: go-repo
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8888
|
||||
type: LoadBalancer
|
9
main.go
9
main.go
@ -2,7 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"github.com/sirupsen/logrus"
|
||||
@ -25,11 +24,7 @@ func main() {
|
||||
if l, err := logrus.ParseLevel(level); err == nil {
|
||||
logrus.SetLevel(l)
|
||||
}
|
||||
path := args[0]
|
||||
if s, err := filepath.EvalSymlinks(path); err == nil {
|
||||
path = s
|
||||
}
|
||||
mods, err := NewModules(path)
|
||||
mods, err := NewModules(args[0])
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
@ -74,7 +69,7 @@ func main() {
|
||||
}
|
||||
}
|
||||
}()
|
||||
if err := watcher.Add(path); err != nil {
|
||||
if err := watcher.Add(args[0]); err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
go func() {
|
||||
|
Loading…
Reference in New Issue
Block a user