Skip to content
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

Lumosviridi v0.30.0 kubernetes updates #21

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rajitkhanna
Copy link
Member

No description provided.

Copy link

@greptile-apps-staging greptile-apps-staging bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR introduces Redis integration and persistent storage configurations for the TwentyCRM Kubernetes deployment, replacing the previous PostgreSQL-based message queue with Redis.

  • Critical issue in /packages/twenty-docker/k8s/manifests/deployment-redis.yaml: Contains duplicate container definitions with conflicting PORT environment variables
  • Missing storage backend configuration in /packages/twenty-docker/k8s/manifests/pv-docker-data.yaml which is required for actual storage allocation
  • Security concern: Removed security context settings in deployment-server.tf that could impact application permissions
  • Token management change in secret.tf generates random tokens on each apply, requiring careful consideration for authentication across deployments
  • Redis resource limits in deployment-redis.tf are significantly higher than other services (1024Mi/2048Mi memory vs 256Mi/1024Mi)

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

17 file(s) reviewed, 30 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +14 to +17
sessionAffinity: ClientIP
sessionAffinityConfig:
clientIP:
timeoutSeconds: 10800

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: 3-hour session affinity timeout (10800 seconds) may be excessive for Redis connections. Consider reducing to 1-2 hours to prevent stale connections.

name: twentycrm-redis
namespace: twentycrm
spec:
internalTrafficPolicy: Cluster

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: internalTrafficPolicy: Cluster is redundant when type is ClusterIP - this is the default behavior

namespace: twentycrm
spec:
storageClassName: default
volumeName: twentycrm-docker-data-pv

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: explicitly binding to PV reduces flexibility - consider removing volumeName for dynamic provisioning

Comment on lines +5 to +11
spec:
storageClassName: default
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Missing required storage backend configuration (hostPath, nfs, etc). PV needs to specify where and how the actual storage is provisioned.

Comment on lines +24 to +28
containers:
- env:
- name: PORT
value: 6379
- image: redis/redis-stack-server:latest

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: The configuration defines two separate containers incorrectly. The env section is defined as a separate container from the Redis container. This will cause deployment issues.

Comment on lines +114 to +118
variable "twentycrm_docker_data_mount_path" {
type = string
default = "/app/docker-data"
description = "TwentyCRM mount path for servers application data. Defaults to '/app/docker-data'."
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: duplicate mount path purpose with twentycrm_server_data_mount_path - consider consolidating or clarifying the difference between these paths

}

spec {
replicas = var.twentycrm_redis_replicas

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: var.twentycrm_redis_replicas is used but not defined in the variables.tf file shown in the context


spec {
container {
image = var.twentycrm_redis_image

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: var.twentycrm_redis_image is used but not defined in the variables.tf file shown in the context

Comment on lines +38 to +39
stdin = true
tty = true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: stdin and tty are set to true but may not be necessary for a Redis container as it typically runs as a daemon

Comment on lines +46 to +55
resources {
requests = {
cpu = "250m"
memory = "1024Mi"
}
limits = {
cpu = "500m"
memory = "2048Mi"
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: memory requests and limits are quite high for a basic Redis instance - consider reducing unless there's a specific requirement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants