Compare commits

..

No commits in common. "af626f35c4ce371fd4ba635d3bc195d8000584aa" and "690e75d7c82d20f6849f564c41b079d05bf3fcd2" have entirely different histories.

4 changed files with 2 additions and 70 deletions

1
.gitignore vendored
View File

@ -1,3 +1,2 @@
.idea
config.yml
config.sm.yaml

View File

@ -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

View File

@ -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

View File

@ -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() {