-
Notifications
You must be signed in to change notification settings - Fork 5
Add raven deployment configuration for Kubernetes #253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: raven-server | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: raven | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: raven | ||
| spec: | ||
| containers: | ||
| - name: raven | ||
| image: ghcr.io/lsflk/raven:latest | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using the image: ghcr.io/lsflk/raven:v1.0.0 |
||
| ports: | ||
| - containerPort: 143 | ||
| - containerPort: 993 | ||
| - containerPort: 24 | ||
| - containerPort: 12345 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The container definition is missing resource requests and limits for CPU and memory. This can lead to performance issues and instability in the cluster. Without resource requests, the scheduler can't make informed decisions, and without limits, the container can consume all available resources on a node. Setting these values is critical for ensuring application reliability and fair resource sharing. The values in the suggestion are examples and should be adjusted based on performance testing. - containerPort: 12345
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m" |
||
| env: | ||
| - name: DB_FILE | ||
| value: /app/data/databases/shared.db | ||
| volumeMounts: | ||
| - name: raven-data | ||
| mountPath: /app/data | ||
| - name: raven-config | ||
| mountPath: /etc/raven | ||
| - name: raven-certs | ||
| mountPath: /certs | ||
| securityContext: | ||
| runAsUser: 0 | ||
| runAsGroup: 0 | ||
|
Comment on lines
+33
to
+35
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Running containers as the root user ( securityContext:
runAsUser: 1001
runAsGroup: 1001 |
||
| volumes: | ||
| - name: raven-data | ||
| persistentVolumeClaim: | ||
| claimName: raven-data-pvc | ||
| - name: raven-config | ||
| hostPath: | ||
| path: /root/mail/silver/services/silver-config/raven/conf | ||
| type: Directory | ||
| - name: raven-certs | ||
| hostPath: | ||
| path: /root/mail/silver/services/silver-config/raven/certs | ||
| type: Directory | ||
|
Comment on lines
+40
to
+47
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using - name: raven-config
configMap:
name: raven-config-map
- name: raven-certs
secret:
secretName: raven-certs-secret |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deployment is configured with only one replica. This creates a single point of failure. If the node running the pod goes down or the pod crashes, the service will be unavailable until it's rescheduled and started. For better availability, consider increasing the number of replicas to at least 2.