Skip to content

Commit 7bcfbc7

Browse files
committed
Reorg: grep
1 parent 9b6eb59 commit 7bcfbc7

File tree

12 files changed

+32
-37
lines changed

12 files changed

+32
-37
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ kind: Kustomization
44
resources:
55
- ./project.yaml
66
- ./prod_application.yaml
7-
- ../environments/prod/
7+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ spec:
77
project: grep
88
source:
99
repoURL: https://github.com/metacpan/metacpan-k8s
10-
targetRevision: main
10+
targetRevision: digitalocean-main
1111
path: apps/grep/environments/prod
1212
destination:
1313
server: https://kubernetes.default.svc

apps/grep/base/configmap.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ apiVersion: v1
33
kind: ConfigMap
44
metadata:
55
name: grep
6-
namespace: apps--grep
76
data:
8-
siteport: "5005"
9-
plackupserverargs: "-E production-docker"
7+
GREP_SITE_PORT: "5005"
8+
GREP_PLACKUP_SERVER_ARGS: "-E production-docker"

apps/grep/base/cronjob.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ apiVersion: batch/v1
33
kind: CronJob
44
metadata:
55
name: repo-refresh
6-
namespace: apps--grep
76
spec:
87
schedule: "0 * * * *"
98
concurrencyPolicy: Forbid
@@ -17,10 +16,15 @@ spec:
1716
volumeMounts:
1817
- name: gitrepo
1918
mountPath: /shared/metacpan_git
20-
command: ['sh', '-c', 'cd /shared/metacpan_git && git pull origin master']
19+
command:
20+
- sh
21+
- -c
22+
- |-
23+
[ -f /shared/metacpan_git/.init_complete ] \
24+
&& cd /shared/metacpan_git && git pull origin master
2125
imagePullPolicy: IfNotPresent
2226
volumes:
2327
- name: gitrepo
2428
persistentVolumeClaim:
2529
claimName: gitrepo
26-
restartPolicy: OnFailure
30+
restartPolicy: Never

apps/grep/base/deployment.yaml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ metadata:
55
name: grep
66
labels:
77
app: grep
8-
namespace: apps--grep
98
spec:
109
replicas: 1
1110
selector:
@@ -23,32 +22,27 @@ spec:
2322
volumeMounts:
2423
- name: gitrepo
2524
mountPath: /shared/metacpan_git
26-
command: ['sh', '-c', '[ -d /shared/metacpan_git/.git ] || git clone https://github.com/metacpan/metacpan-cpan-extracted.git /shared/metacpan_git']
25+
command:
26+
- sh
27+
- -c
28+
- |-
29+
[ -d /shared/metacpan_git/.git ] \
30+
|| git clone https://github.com/metacpan/metacpan-cpan-extracted.git /shared/metacpan_git \
31+
&& touch /shared/metacpan_git/.init_complete
2732
containers:
2833
- name: web
2934
image: metacpan/metacpan-grep-front-end:latest
3035
imagePullPolicy: Always
3136
ports:
3237
- containerPort: 3000
33-
env:
34-
- name: GREP_SITE_PORT
35-
valueFrom:
36-
configMapKeyRef:
37-
name: grep
38-
key: siteport
39-
- name: GREP_PLACKUP_SERVER_ARGS
40-
valueFrom:
41-
configMapKeyRef:
42-
name: grep
43-
key: plackupserverargs
38+
envFrom:
39+
- configMapRef:
40+
name: grep
4441
volumeMounts:
4542
- name: gitrepo
4643
mountPath: /shared/metacpan_git
4744
readOnly: true
4845
volumes:
49-
- name: config
50-
configMap:
51-
name: grep
5246
- name: gitrepo
5347
persistentVolumeClaim:
5448
claimName: gitrepo

apps/grep/base/kustomization.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@ resources:
55
- ./configmap.yaml
66
- ./cronjob.yaml
77
- ./deployment.yaml
8-
- ./ingress.yaml
9-
- ./namespace.yaml
108
- ./pvc.yaml
119
- ./service.yaml

apps/grep/base/pvc.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ apiVersion: v1
22
kind: PersistentVolumeClaim
33
metadata:
44
name: gitrepo
5-
namespace: apps--grep
65
spec:
76
accessModes:
8-
- ReadWriteOnce
9-
storageClassName: local-path
7+
- ReadWriteMany
8+
storageClassName: nfs-volatile
109
resources:
1110
requests:
12-
storage: 21Gi
11+
storage: 35Gi

apps/grep/base/service.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ apiVersion: v1
22
kind: Service
33
metadata:
44
name: grep
5-
namespace: apps--grep
65
spec:
76
ports:
87
- port: 80
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ metadata:
55
namespace: apps--grep
66
annotations:
77
cert-manager.io/cluster-issuer: letsencrypt-production
8-
traefik.ingress.kubernetes.io/router.middlewares: default-redirect-https@kubernetescrd
98
spec:
9+
ingressClassName: nginx
1010
tls:
1111
- hosts:
12-
- grep.hz.metacpan.org
12+
- grep.do.metacpan.org
1313
- grep.metacpan.org
1414
secretName: grep-tls
1515
rules:
16-
- host: grep.hz.metacpan.org
16+
- host: grep.do.metacpan.org
1717
http:
1818
paths:
1919
- pathType: Prefix

0 commit comments

Comments
 (0)