Skip to content

Commit f166ffd

Browse files
committed
Remove Anubis from api and set port
1 parent b76dfd7 commit f166ffd

File tree

4 files changed

+7
-105
lines changed

4 files changed

+7
-105
lines changed

apps/api/argo/prod_application.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ spec:
77
project: api
88
source:
99
repoURL: https://github.com/metacpan/metacpan-k8s
10-
targetRevision: main
10+
targetRevision: leo/setup_api
1111
path: apps/api/environments/prod
1212
destination:
1313
server: https://kubernetes.default.svc

apps/api/argo/project.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
namespace: argocd
66
spec:
77
# Project description
8-
description: MetaCPAN api UI
8+
description: MetaCPAN API
99

1010
sourceRepos:
1111
- '*'

apps/api/argo/stage_application.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ spec:
77
project: api
88
source:
99
repoURL: https://github.com/metacpan/metacpan-k8s
10-
targetRevision: main
10+
targetRevision: leo/setup_api
1111
path: apps/api/environments/stage
1212
destination:
1313
server: https://kubernetes.default.svc

apps/api/base/deployment.yaml

Lines changed: 4 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -20,70 +20,21 @@ spec:
2020
app: api
2121
spec:
2222
containers:
23-
- name: anubis
24-
image: ghcr.io/techarohq/anubis:latest
25-
imagePullPolicy: Always
26-
env:
27-
- name: "BIND"
28-
value: ":8080"
29-
- name: "DIFFICULTY"
30-
value: "4"
31-
- name: ED25519_PRIVATE_KEY_HEX
32-
valueFrom:
33-
secretKeyRef:
34-
name: anubis-key
35-
key: ED25519_PRIVATE_KEY_HEX
36-
- name: "METRICS_BIND"
37-
value: ":9090"
38-
- name: "SERVE_ROBOTS_TXT"
39-
value: "true"
40-
- name: "TARGET"
41-
value: "http://localhost:5001"
42-
- name: "OG_PASSTHROUGH"
43-
value: "true"
44-
- name: "OG_EXPIRY_TIME"
45-
value: "24h"
46-
- name: "REDIRECT_DOMAINS"
47-
value: "api.do.metacpan.org,metacpan.org,www.metacpan.org"
48-
resources:
49-
limits:
50-
cpu: 750m
51-
memory: 256Mi
52-
requests:
53-
cpu: 250m
54-
memory: 256Mi
55-
ports:
56-
- name: anubis
57-
containerPort: 8080
58-
protocol: TCP
59-
- name: anubis-metrics
60-
containerPort: 9090
61-
protocol: TCP
62-
securityContext:
63-
runAsUser: 1000
64-
runAsGroup: 1000
65-
runAsNonRoot: true
66-
allowPrivilegeEscalation: false
67-
capabilities:
68-
drop:
69-
- ALL
70-
seccompProfile:
71-
type: RuntimeDefault
7223
- name: api
7324
image: docker.io/metacpan/metacpan-api:latest
7425
imagePullPolicy: Always
7526
command: ["/uwsgi.sh"]
7627
args:
7728
- "--http-socket"
78-
- ":5001"
29+
- ":5000"
7930
- "--stats"
8031
- ":9191"
8132
- "--stats-http"
8233
- "--reload-on-rss"
8334
- "225"
8435
ports:
8536
- name: http
86-
containerPort: 5001
37+
containerPort: 5000
8738
protocol: TCP
8839
resources:
8940
# Manage how much memory is allocated, could add cpu if we wanted
@@ -126,70 +77,21 @@ spec:
12677
app: api-search
12778
spec:
12879
containers:
129-
- name: anubis
130-
image: ghcr.io/techarohq/anubis:latest
131-
imagePullPolicy: Always
132-
env:
133-
- name: "BIND"
134-
value: ":8080"
135-
- name: "DIFFICULTY"
136-
value: "4"
137-
- name: ED25519_PRIVATE_KEY_HEX
138-
valueFrom:
139-
secretKeyRef:
140-
name: anubis-key
141-
key: ED25519_PRIVATE_KEY_HEX
142-
- name: "METRICS_BIND"
143-
value: ":9090"
144-
- name: "SERVE_ROBOTS_TXT"
145-
value: "true"
146-
- name: "TARGET"
147-
value: "http://localhost:5001"
148-
- name: "OG_PASSTHROUGH"
149-
value: "true"
150-
- name: "OG_EXPIRY_TIME"
151-
value: "24h"
152-
- name: "REDIRECT_DOMAINS"
153-
value: "api.do.metacpan.org,metacpan.org,www.metacpan.org"
154-
resources:
155-
limits:
156-
cpu: 750m
157-
memory: 256Mi
158-
requests:
159-
cpu: 250m
160-
memory: 256Mi
161-
ports:
162-
- name: anubis
163-
containerPort: 8080
164-
protocol: TCP
165-
- name: anubis-metrics
166-
containerPort: 9090
167-
protocol: TCP
168-
securityContext:
169-
runAsUser: 1000
170-
runAsGroup: 1000
171-
runAsNonRoot: true
172-
allowPrivilegeEscalation: false
173-
capabilities:
174-
drop:
175-
- ALL
176-
seccompProfile:
177-
type: RuntimeDefault
17880
- name: api
17981
image: docker.io/metacpan/metacpan-api:latest
18082
imagePullPolicy: Always
18183
command: ["/uwsgi.sh"]
18284
args:
18385
- "--http-socket"
184-
- ":5001"
86+
- ":5000"
18587
- "--stats"
18688
- ":9191"
18789
- "--stats-http"
18890
- "--reload-on-rss"
18991
- "225"
19092
ports:
19193
- name: http
192-
containerPort: 5001
94+
containerPort: 5000
19395
protocol: TCP
19496
resources:
19597
# Manage how much memory is allocated, could add cpu if we wanted

0 commit comments

Comments
 (0)