-
Notifications
You must be signed in to change notification settings - Fork 550
chore: when a cluster event occurs, create config map instead of secret #6607
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
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
b275a2c
create cm in case of cluster event instead of secret
prakash100198 962054e
gpu-workload-chart
rupinSec 59c8ff8
migration for gpu-workloads
rupinSec 1ea23e3
bump cpmmon lib
prakash100198 5977a88
Merge branch 'develop' into create-cm-on-cluster-action-oss
prakash100198 2ba594e
bump common lib
prakash100198 3d992e9
bump common lib
prakash100198 6ce9b77
fixes after testing
rupinSec 1283179
fix
prakash100198 489871b
changes in json schema
rupinSec 7fa7e39
k8s supported label label
prakash100198 8237884
small fix
prakash100198 fc54e9a
few changes after testing
rupinSec 976f93b
bump common lib
prakash100198 2d09f1f
Merge branch 'develop' into create-cm-on-cluster-action-oss
prakash100198 bb12ab9
bump common lib
prakash100198 60012ce
Merge branch 'develop' into create-cm-on-cluster-action-oss
prakash100198 f159e78
bump
prakash100198 9a085b5
code review level 2
prakash100198 12778bd
misc: update sample dockerfiles use non-root user (UID 2002) and base…
badal773 5d22708
Merge branch 'main' into gpu-workload-chart
rupinSec 3bf4b72
updated migration no.
rupinSec a61bf2f
Merge pull request #6608 from devtron-labs/gpu-workload-chart
rupinSec 69a5263
feat: Added Cronjob chart 1-6-0 (#6650)
akshatsinha007 6e196cb
Merge branch 'main' into create-cm-on-cluster-action-oss
prakash100198 85c29e5
main merge
prakash100198 a667752
Merge branch 'develop' into create-cm-on-cluster-action-oss
prakash100198 c0a4705
make
prakash100198 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package helper | ||
|
||
import ( | ||
"fmt" | ||
informerBean "github.com/devtron-labs/common-lib/informer" | ||
clusterBean "github.com/devtron-labs/devtron/pkg/cluster/bean" | ||
"time" | ||
) | ||
|
||
func CreateClusterModifyEventData(clusterId int, action string) (map[string]string, map[string]string) { | ||
data := make(map[string]string) | ||
data[informerBean.CmFieldClusterId] = fmt.Sprintf("%v", clusterId) | ||
data[informerBean.CmFieldAction] = action | ||
data[clusterBean.CmFieldUpdatedOn] = time.Now().String() | ||
prakash100198 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
labels := make(map[string]string) | ||
labels[informerBean.ClusterModifyEventSecretTypeKey] = informerBean.ClusterModifyEventCmLabelValue | ||
|
||
return data, labels | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,47 @@ | ||
# Dockerfile | ||
# Base Image - slim Python | ||
FROM python:3.13-slim | ||
|
||
# Base Image | ||
FROM python:3.8 | ||
# Environment settings | ||
ENV PYTHONUNBUFFERED=1 LANG=C.UTF-8 | ||
|
||
# set default environment variables | ||
ENV PYTHONUNBUFFERED 1 | ||
ENV LANG C.UTF-8 | ||
|
||
# to take runtime arguments and set env variables | ||
# Django superuser build args | ||
ARG DJANGO_SUPERUSER_USERNAME | ||
ENV DJANGO_SUPERUSER_USERNAME=${DJANGO_SUPERUSER_USERNAME} | ||
|
||
ARG DJANGO_SUPERUSER_PASSWORD | ||
ENV DJANGO_SUPERUSER_PASSWORD=${DJANGO_SUPERUSER_PASSWORD} | ||
|
||
ARG DJANGO_SUPERUSER_EMAIL | ||
ENV DJANGO_SUPERUSER_USERNAME=${DJANGO_SUPERUSER_USERNAME} | ||
ENV DJANGO_SUPERUSER_PASSWORD=${DJANGO_SUPERUSER_PASSWORD} | ||
ENV DJANGO_SUPERUSER_EMAIL=${DJANGO_SUPERUSER_EMAIL} | ||
|
||
# create and set working directory | ||
RUN mkdir /app | ||
# Set workdir | ||
WORKDIR /app | ||
|
||
RUN chown -R www-data:www-data /app | ||
|
||
# Add current directory code to working directory | ||
COPY . /app/ | ||
|
||
# install environment dependencies | ||
RUN pip install -r requirements.txt | ||
|
||
# install nginx | ||
RUN apt-get update && apt-get install nginx vim -y --no-install-recommends | ||
# Install system dependencies and nginx, then install Python deps | ||
COPY requirements.txt . | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends nginx vim && \ | ||
pip install --no-cache-dir -r requirements.txt && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
#Refer https://github.com/devtron-labs/devtron/blob/main/sample-docker-templates/django/nginx.default for sample nginx.default file | ||
COPY nginx.default /etc/nginx/sites-available/default | ||
# Copy app code, nginx.conf, and start script | ||
COPY app/ ./ | ||
COPY nginx.conf /etc/nginx/nginx.conf | ||
RUN chmod +x start-server.sh | ||
|
||
RUN ln -sf /dev/stdout /var/log/nginx/access.log \ | ||
&& ln -sf /dev/stderr /var/log/nginx/error.log | ||
# Create non-root user and set permissions | ||
RUN groupadd -g 2002 nonroot && \ | ||
useradd -u 2002 -g nonroot -s /bin/bash -m nonroot && \ | ||
mkdir -p /tmp/nginx-logs && \ | ||
chown -R nonroot:nonroot /app /tmp/nginx-logs | ||
|
||
# Expose port 8080 | ||
EXPOSE 8080 | ||
|
||
# start server | ||
EXPOSE 8000 | ||
# Switch to non-root | ||
USER nonroot | ||
|
||
# Stop signal for graceful shutdown | ||
# https://docs.docker.com/reference/dockerfile/#stopsignal | ||
STOPSIGNAL SIGTERM | ||
|
||
# Refer https://github.com/devtron-labs/devtron/blob/main/sample-docker-templates/django/start-server.sh for sample start-server.sh file | ||
# Start server (migrations, superuser, gunicorn, nginx) | ||
CMD ["/app/start-server.sh"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
worker_processes auto; | ||
error_log /tmp/nginx-logs/error.log warn; | ||
pid /tmp/nginx-logs/nginx.pid; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include mime.types; | ||
default_type application/octet-stream; | ||
|
||
access_log /tmp/nginx-logs/access.log; | ||
|
||
client_body_temp_path /tmp/nginx-logs/client_temp; | ||
proxy_temp_path /tmp/nginx-logs/proxy_temp; | ||
fastcgi_temp_path /tmp/nginx-logs/fastcgi_temp; | ||
uwsgi_temp_path /tmp/nginx-logs/uwsgi_temp; | ||
scgi_temp_path /tmp/nginx-logs/scgi_temp; | ||
|
||
server { | ||
listen 8080; | ||
server_name localhost; | ||
|
||
location / { | ||
proxy_pass http://127.0.0.1:8000; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
} | ||
|
||
location /static/ { | ||
root /app; | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.