-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feat/k8s #900
base: dev
Are you sure you want to change the base?
Conversation
Important Auto Review SkippedDraft detected. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the WalkthroughThe update to the Makefile introduces a series of enhancements and additions aimed at improving Kubernetes deployments. Key configurations such as Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files ignored due to path filters (3)
k8s/elasticsearch.yaml
is excluded by:!**/*.yaml
k8s/frontend.yaml
is excluded by:!**/*.yaml
k8s/ingress-local.yaml
is excluded by:!**/*.yaml
Files selected for processing (1)
- Makefile (4 hunks)
Additional comments: 3
Makefile (3)
- 116-119: The transformation applied to
KUBE_NAMESPACE
and the introduction ofKUBECONFIG
andES_MEM_KUBE
are good practices for dynamic and flexible Kubernetes deployments. However, ensure that the base64 encoding of sensitive keys (STORAGE_ACCESS_KEY_B64
andSTORAGE_SECRET_KEY_B64
) is securely handled and that these keys are not exposed in logs or error messages.- 542-568: The deployment scripts for Kubernetes services (
deploy-k8s-services
,deploy-k8s-namespace
,deploy-k8s-elasticsearch
,deploy-k8s-redis
,deploy-k8s-backend
, anddeploy-k8s-frontend
) are well-organized and make good use of environment variable substitution. Ensure that Kubernetes YAML files referenced (${KUBE_DIR}/<service>.yaml
) are correctly formatted and that they include resource limits to prevent potential resource exhaustion.- 647-647: Introducing the
update-base-image
target is a significant enhancement for managing base Docker images. Ensure that the snapshot and image creation process is thoroughly tested to prevent any disruptions in the deployment pipeline.
deploy-k8s-cluster-local: | ||
@if ! (which k3s > /dev/null 2>&1); then\ | ||
(curl -sfL https://get.k3s.io | sh - 2>&1 |\ | ||
awk 'BEGIN{s=0}{printf "\r☸️ Installing k3s (" s++ "/16)"}') && echo -e "\r\033[2K☸️ Installed k3s";\ | ||
fi;\ | ||
mkdir -p ~/.kube;\ | ||
KUBECONFIG=${HOME}/.kube/config-local-k3s.yaml;\ | ||
sudo cp /etc/rancher/k3s/k3s.yaml $${KUBECONFIG};\ | ||
sudo chown ${USER} $${KUBECONFIG};\ | ||
cp $${KUBECONFIG} ${KUBECONFIG} |
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 script for setting up a local Kubernetes cluster using k3s is well-structured. However, consider checking for existing ~/.kube/config-local-k3s.yaml
before overwriting it to avoid accidental loss of existing configurations.
+ if [ ! -f "$${KUBECONFIG}" ]; then
sudo cp /etc/rancher/k3s/k3s.yaml $${KUBECONFIG};
sudo chown ${USER} $${KUBECONFIG};
cp $${KUBECONFIG} ${KUBECONFIG}
+ fi
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
deploy-k8s-cluster-local: | |
@if ! (which k3s > /dev/null 2>&1); then\ | |
(curl -sfL https://get.k3s.io | sh - 2>&1 |\ | |
awk 'BEGIN{s=0}{printf "\r☸️ Installing k3s (" s++ "/16)"}') && echo -e "\r\033[2K☸️ Installed k3s";\ | |
fi;\ | |
mkdir -p ~/.kube;\ | |
KUBECONFIG=${HOME}/.kube/config-local-k3s.yaml;\ | |
sudo cp /etc/rancher/k3s/k3s.yaml $${KUBECONFIG};\ | |
sudo chown ${USER} $${KUBECONFIG};\ | |
cp $${KUBECONFIG} ${KUBECONFIG} | |
deploy-k8s-cluster-local: | |
@if ! (which k3s > /dev/null 2>&1); then\ | |
(curl -sfL https://get.k3s.io | sh - 2>&1 |\ | |
awk 'BEGIN{s=0}{printf "\r☸️ Installing k3s (" s++ "/16)"}') && echo -e "\r\033[2K☸️ Installed k3s";\ | |
fi;\ | |
mkdir -p ~/.kube;\ | |
KUBECONFIG=${HOME}/.kube/config-local-k3s.yaml;\ | |
if [ ! -f "$${KUBECONFIG}" ]; then | |
sudo cp /etc/rancher/k3s/k3s.yaml $${KUBECONFIG};\ | |
sudo chown ${USER} $${KUBECONFIG};\ | |
cp $${KUBECONFIG} ${KUBECONFIG} | |
fi |
Cf issue #903