reworking default namespace

This commit is contained in:
2026-08-28 19:44:21 -03:00
parent 8debf442ce
commit f1a8cf7ec4
14 changed files with 1131 additions and 1546 deletions
+124 -115
View File
@@ -1,3 +1,39 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: sonic
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: sonic
template:
metadata:
labels:
app: sonic
spec:
containers:
- name: sonic
image: archivebox/sonic:latest
imagePullPolicy: Always
ports:
- containerPort: 1491
env:
- name: SEARCH_BACKEND_PASSWORD
valueFrom:
secretKeyRef:
name: password
key: password
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "200m"
---
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -8,80 +44,69 @@ spec:
selector:
matchLabels:
app: archivebox
strategy:
type: Recreate
template:
metadata:
labels:
app: archivebox
spec:
containers:
- env:
- name: SONIC_HOST
value: sonic.default.svc.cluster.local
- name: SONIC_PORT
value: '1491'
- name: SEARCH_BACKEND_ENGINE
value: sonic
- name: SONIC_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: password
- name: ADMIN_USERNAME
value: ivanch
- name: ADMIN_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: password
- name: CSRF_TRUSTED_ORIGINS
value: archive.haven
- name: ALLOWED_HOSTS
value: '*'
- name: PUBLIC_ADD_VIEW
value: 'false'
image: archivebox/archivebox:latest
imagePullPolicy: Always
name: archivebox
ports:
- containerPort: 8000
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data
name: archivebox-data
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
- name: archivebox
image: archivebox/archivebox:latest
imagePullPolicy: Always
ports:
- containerPort: 8000
env:
- name: SONIC_HOST
value: "sonic.default.svc.cluster.local"
- name: SONIC_PORT
value: "1491"
- name: SEARCH_BACKEND_ENGINE
value: "sonic"
- name: SONIC_PASSWORD
valueFrom:
secretKeyRef:
name: password
key: password
- name: ADMIN_USERNAME
value: "ivanch"
- name: ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: password
key: password
- name: CSRF_TRUSTED_ORIGINS
value: "archive.haven"
- name: ALLOWED_HOSTS
value: "*"
- name: PUBLIC_ADD_VIEW
value: "false"
volumeMounts:
- name: archivebox-data
mountPath: /data
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "2Gi"
cpu: "3000m"
volumes:
- name: archivebox-data
persistentVolumeClaim:
claimName: archivebox-data
status:
availableReplicas: 1
conditions:
- lastTransitionTime: '2026-05-19T01:51:47Z'
lastUpdateTime: '2026-07-22T10:14:38Z'
message: ReplicaSet "archivebox-bb7f58db4" has successfully progressed.
reason: NewReplicaSetAvailable
status: 'True'
type: Progressing
- lastTransitionTime: '2026-08-28T06:04:13Z'
lastUpdateTime: '2026-08-28T06:04:13Z'
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: 'True'
type: Available
observedGeneration: 94
readyReplicas: 1
replicas: 1
terminatingReplicas: 0
updatedReplicas: 1
- name: archivebox-data
persistentVolumeClaim:
claimName: archivebox-data
---
apiVersion: v1
kind: Service
metadata:
name: sonic-svc
namespace: default
spec:
selector:
app: sonic
ports:
- protocol: TCP
port: 1491
targetPort: 1491
---
apiVersion: v1
kind: Service
@@ -89,20 +114,30 @@ metadata:
name: archivebox-svc
namespace: default
spec:
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- port: 8000
protocol: TCP
targetPort: 8000
selector:
app: archivebox
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
ports:
- protocol: TCP
port: 8000
targetPort: 8000
---
# 3) PersistentVolumeClaim
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: archivebox-data
namespace: default
annotations:
nfs.io/storage-path: "archivebox-data"
spec:
storageClassName: "nfs-client"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
limits:
storage: 30Gi
---
apiVersion: networking.k8s.io/v1
kind: Ingress
@@ -112,39 +147,13 @@ metadata:
spec:
ingressClassName: nginx
rules:
- host: archive.haven
http:
paths:
- backend:
service:
name: archivebox-svc
port:
number: 8000
path: /
pathType: Prefix
status:
loadBalancer:
ingress:
- ip: 192.168.20.204
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: archivebox-data
namespace: default
spec:
accessModes:
- ReadWriteOnce
resources:
limits:
storage: 30Gi
requests:
storage: 10Gi
storageClassName: nfs-client
volumeMode: Filesystem
status:
accessModes:
- ReadWriteOnce
capacity:
storage: 10Gi
phase: Bound
- host: "archive.haven"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: archivebox-svc
port:
number: 8000