add example deployment

This commit is contained in:
Adphi 2020-11-21 12:24:30 +01:00
parent 690e75d7c8
commit 9919c261f1
2 changed files with 59 additions and 0 deletions

4
config.example.yml Normal file
View File

@ -0,0 +1,4 @@
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

55
deploy/deploy.yml Normal file
View File

@ -0,0 +1,55 @@
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
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: 8888
type: LoadBalancer