File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,22 @@ spec:
1414      labels :
1515        app : {{ .Release.Name }} 
1616    spec :
17+       {{- if .Values.securityContext.enabled }} 
18+       #  Pod-level security settings
19+       securityContext :
20+         runAsUser : {{ .Values.securityContext.runAsUser }} 
21+         runAsGroup : {{ .Values.securityContext.runAsGroup }} 
22+         fsGroup : {{ .Values.securityContext.fsGroup }} 
23+       {{- end }} 
1724      containers :
1825        - name : {{ .Release.Name }} 
1926          image : " {{ .Values.image.repository }}:{{ .Values.image.tag }}" 
2027          imagePullPolicy : {{ .Values.image.pullPolicy }} 
28+           {{- if .Values.securityContext.enabled }} 
29+           #  Container-level security settings
30+           securityContext :
31+             allowPrivilegeEscalation : {{ .Values.securityContext.allowPrivilegeEscalation }} 
32+           {{- end }} 
2133          ports :
2234            - containerPort : {{ .Values.service.targetPort }} 
2335          env :
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ replicaCount: 1
33image :
44  repository : docker.io/karimzakzouk/graduation-project-devops 
55  pullPolicy : IfNotPresent 
6- 
76  tag : 5ce971613930bb3845550750c0b11cfc28a7d33d 
87
98service :
@@ -13,6 +12,14 @@ service:
1312
1413namespace : " " 
1514
15+ securityContext :
16+   enabled : true 
17+   runAsUser : 1000 
18+   runAsGroup : 3000 
19+   fsGroup : 2000 
20+   allowPrivilegeEscalation : false 
21+ 
22+ 
1623resources :
1724  requests :
1825    cpu : 100m 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments