Compare commits
4 Commits
aebb340f53
...
f15c40df0b
Author | SHA1 | Date | |
---|---|---|---|
f15c40df0b | |||
3771d0df41 | |||
90c65fceba | |||
0c63a9682c |
20
argocd-applications/base/go-redirect.yaml
Normal file
20
argocd-applications/base/go-redirect.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: argo-app-go-redirect
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
name: ''
|
||||||
|
namespace: default
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
source:
|
||||||
|
path: go-redirect
|
||||||
|
repoURL: https://git.mziesel.nl/mans/argocd-test
|
||||||
|
targetRevision: HEAD
|
||||||
|
sources: []
|
||||||
|
project: default
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
20
argocd-applications/base/redlib-application.yaml
Normal file
20
argocd-applications/base/redlib-application.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: argo-app-redlib
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
name: ''
|
||||||
|
namespace: default
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
source:
|
||||||
|
path: redlib
|
||||||
|
repoURL: https://git.mziesel.nl/mans/argocd-test
|
||||||
|
targetRevision: HEAD
|
||||||
|
sources: []
|
||||||
|
project: default
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
@ -10,3 +10,4 @@ resources:
|
|||||||
- ./base/ip-mziesel-nl-application.yaml
|
- ./base/ip-mziesel-nl-application.yaml
|
||||||
- ./base/cert-manager.yaml
|
- ./base/cert-manager.yaml
|
||||||
- ./base/cyberchef.yaml
|
- ./base/cyberchef.yaml
|
||||||
|
- ./base/go-redirect.yaml
|
||||||
|
21
go-redirect/base/go-redirect-deployment.yaml
Normal file
21
go-redirect/base/go-redirect-deployment.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: go-redirect
|
||||||
|
namespace: go-redirect
|
||||||
|
spec:
|
||||||
|
replicas: 3
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: go-redirect
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: go-redirect
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: git.mziesel.nl/mans/goredir:latest
|
||||||
|
name: go-redirect
|
||||||
|
ports:
|
||||||
|
- name: web
|
||||||
|
containerPort: 80
|
12
go-redirect/base/go-redirect-ingress.yaml
Normal file
12
go-redirect/base/go-redirect-ingress.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: go-redirect-ingressroute
|
||||||
|
spec:
|
||||||
|
routes:
|
||||||
|
- match: Host(`*.mzsl.nl`)
|
||||||
|
kind: Rule
|
||||||
|
services:
|
||||||
|
- name: go-redirect
|
||||||
|
port: web
|
||||||
|
tls: {}
|
4
go-redirect/base/go-redirect-namespace.yaml
Normal file
4
go-redirect/base/go-redirect-namespace.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: go-redirect
|
11
go-redirect/base/go-redirect-svc.yaml
Normal file
11
go-redirect/base/go-redirect-svc.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: go-redirect
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: web
|
||||||
|
port: 80
|
||||||
|
targetPort: web
|
||||||
|
selector:
|
||||||
|
app: go-redirect
|
10
go-redirect/kustomization.yaml
Normal file
10
go-redirect/kustomization.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
namespace: go-redirect
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- ./base/go-redirect-namespace.yaml
|
||||||
|
- ./base/go-redirect-deployment.yaml
|
||||||
|
- ./base/go-redirect-svc.yaml
|
||||||
|
- ./base/go-redirect-ingress.yaml
|
32
redlib/base/redlib-deployment.yaml
Normal file
32
redlib/base/redlib-deployment.yaml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: redlib
|
||||||
|
namespace: redlib
|
||||||
|
spec:
|
||||||
|
replicas: 3
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: redlib
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: redlib
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: quay.io/redlib/redlib:latest
|
||||||
|
name: redlib
|
||||||
|
ports:
|
||||||
|
- name: web
|
||||||
|
containerPort: 80
|
||||||
|
env:
|
||||||
|
- name: REDLIB_DEFAULT_SHOW_NSFW
|
||||||
|
value: "on"
|
||||||
|
- name: REDLIB_DEFAULT_BLUR_NSFW
|
||||||
|
value: "off"
|
||||||
|
- name: REDLIB_DEFAULT_USE_HLS
|
||||||
|
value: "on"
|
||||||
|
- name: REDLIB_DEFAULT_HIDE_HLS_NOTIFICATION
|
||||||
|
value: "off"
|
||||||
|
- name: ROBOTS_DISABLE_INDEXING
|
||||||
|
value: "on"
|
12
redlib/base/redlib-ingress.yaml
Normal file
12
redlib/base/redlib-ingress.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: redlib-ingressroute
|
||||||
|
spec:
|
||||||
|
routes:
|
||||||
|
- match: Host(`libreddit.mziesel.nl`)
|
||||||
|
kind: Rule
|
||||||
|
services:
|
||||||
|
- name: redlib
|
||||||
|
port: web
|
||||||
|
tls: {}
|
4
redlib/base/redlib-namespace.yaml
Normal file
4
redlib/base/redlib-namespace.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: redlib
|
11
redlib/base/redlib-svc.yaml
Normal file
11
redlib/base/redlib-svc.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: redlib
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: web
|
||||||
|
port: 80
|
||||||
|
targetPort: web
|
||||||
|
selector:
|
||||||
|
app: redlib
|
10
redlib/kustomization.yaml
Normal file
10
redlib/kustomization.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
namespace: redlib
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- ./base/redlib-namespace.yaml
|
||||||
|
- ./base/redlib-deployment.yaml
|
||||||
|
- ./base/redlib-svc.yaml
|
||||||
|
- ./base/redlib-ingress.yaml
|
20
templates/appname-application.yaml
Normal file
20
templates/appname-application.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: argo-app-appname
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
name: ''
|
||||||
|
namespace: default
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
source:
|
||||||
|
path: appname
|
||||||
|
repoURL: https://git.mziesel.nl/mans/argocd-test
|
||||||
|
targetRevision: HEAD
|
||||||
|
sources: []
|
||||||
|
project: default
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
20
templates/bin/new-app.sh
Executable file
20
templates/bin/new-app.sh
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
[ $# != 1 ] &&
|
||||||
|
echo "wrong number of args, run with --help" &&
|
||||||
|
exit 1;
|
||||||
|
|
||||||
|
APPNAME=$1
|
||||||
|
|
||||||
|
cp -r ./templates/new-svc "$APPNAME"
|
||||||
|
cp ./templates/appname-application.yaml "argocd-applications/base/$APPNAME-application.yaml"
|
||||||
|
|
||||||
|
for file in "$APPNAME"/base/* ; do
|
||||||
|
rename appname "$APPNAME" "$file"
|
||||||
|
# NEWFILE=$(echo "$file" | sed "s/appname/$APPNAME/g")
|
||||||
|
NEWFILE=${file//appname/$APPNAME}
|
||||||
|
sed -i "s/appname/$APPNAME/g" "$NEWFILE"
|
||||||
|
done
|
||||||
|
|
||||||
|
sed -i "s/appname/$APPNAME/g" "./$APPNAME/kustomization.yaml"
|
||||||
|
sed -i "s/appname/$APPNAME/g" "argocd-applications/base/$APPNAME-application.yaml"
|
21
templates/new-svc/base/appname-deployment.yaml
Normal file
21
templates/new-svc/base/appname-deployment.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: appname
|
||||||
|
namespace: appname
|
||||||
|
spec:
|
||||||
|
replicas: 3
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: appname
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: appname
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: ghcr.io/gchq/appname:10.19.4
|
||||||
|
name: appname
|
||||||
|
ports:
|
||||||
|
- name: web
|
||||||
|
containerPort: 80
|
12
templates/new-svc/base/appname-ingress.yaml
Normal file
12
templates/new-svc/base/appname-ingress.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: appname-ingressroute
|
||||||
|
spec:
|
||||||
|
routes:
|
||||||
|
- match: Host(`appname.mziesel.nl`)
|
||||||
|
kind: Rule
|
||||||
|
services:
|
||||||
|
- name: appname
|
||||||
|
port: web
|
||||||
|
tls: {}
|
4
templates/new-svc/base/appname-namespace.yaml
Normal file
4
templates/new-svc/base/appname-namespace.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: appname
|
11
templates/new-svc/base/appname-svc.yaml
Normal file
11
templates/new-svc/base/appname-svc.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: appname
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: web
|
||||||
|
port: 80
|
||||||
|
targetPort: web
|
||||||
|
selector:
|
||||||
|
app: appname
|
10
templates/new-svc/kustomization.yaml
Normal file
10
templates/new-svc/kustomization.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
namespace: appname
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- ./base/appname-namespace.yaml
|
||||||
|
- ./base/appname-deployment.yaml
|
||||||
|
- ./base/appname-svc.yaml
|
||||||
|
- ./base/appname-ingress.yaml
|
Loading…
Reference in New Issue
Block a user