Refactor Dockerfile and Helm chart to enhance security and user permissions
- Updated Dockerfile to run as non-root user 'nginx' and adjusted Nginx configuration for improved security. - Added pod security context in values.yaml to align with the non-root user setup. - Refined deployment.yaml to utilize the new pod security context for better compliance with Kubernetes security standards.
This commit is contained in:
@@ -17,6 +17,14 @@ slides:
|
||||
# Port d’écoute dans le conteneur (doit correspondre à server/nginx/default.conf, ex. 8080).
|
||||
containerPort: 8080
|
||||
|
||||
# Aligné sur l’utilisateur nginx de l’image (UID/GID 101). L’image utilise USER nginx.
|
||||
podSecurityContext:
|
||||
runAsUser: 101
|
||||
runAsGroup: 101
|
||||
runAsNonRoot: true
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
# Port du Service (Ingress pointe ici) ; le trafic est envoyé vers containerPort sur les pods.
|
||||
|
||||
Reference in New Issue
Block a user