File tree Expand file tree Collapse file tree
actions/helm/parse-chart-uri
tests/charts/umbrella-application/charts/app Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 with :
2323 # FIXME: re-enable the following checks
2424 linter-env : |
25- VALIDATE_KUBERNETES_KUBECONFORM=false
26- VALIDATE_CHECKOV=false
2725 VALIDATE_JAVASCRIPT_PRETTIER=false
2826
2927 test-action-docker-build-image :
Original file line number Diff line number Diff line change @@ -42,9 +42,9 @@ This action does not requires any permissions.
4242
4343<!-- start inputs -->
4444
45- | **Input** | **Description** | **Default** | **Required** |
46- | ---------------- | ------------------ | ----------- | ------------ |
47- | <code>uri</code> | Chart URI to parse | | **true** |
45+ | **Input** | **Description** | **Default** | **Required** |
46+ | ------------------ | ------------------ | ----------- | ------------ |
47+ | <code>` uri` </code> | Chart URI to parse | | **true** |
4848
4949<!-- end inputs -->
5050<!-- start outputs -->
Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ kind: ConfigMap
33apiVersion : v1
44metadata :
55 name : {{ template "app.fullname" . }}-config
6- namespace : {{ .Values.namespace }}
6+ namespace : {{ .Values.namespace | default "app-system" }}
77 labels :
88 {{- include "app.labels" . | nindent 4 }}
99data :
10- {{- with .Values.application }}
10+ {{- with .Values.app }}
1111 DB_CONNECTION : {{ .dbConnection | quote }}
1212 DB_HOST : {{ .dbHost | quote }}
1313 DB_PORT : {{ .dbPort | quote }}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ apiVersion: apps/v1
33kind : Deployment
44metadata :
55 name : {{ include "app.fullname" . }}
6- namespace : {{ .Values.namespace }}
6+ namespace : {{ .Values.namespace | default "app-system" }}
77 labels :
88 {{- include "app.labels" . | nindent 4 }}
99spec :
3434 - name : {{ .Chart.Name }}
3535 securityContext :
3636 {{- toYaml .Values.securityContext | nindent 12 }}
37+ {{- if .Values.image.digest }}
38+ image : " {{ .Values.image.registry }}/{{ .Values.image.repository }}@{{ .Values.image.digest }}"
39+ {{- else }}
3740 image : " {{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
41+ {{- end }}
3842 imagePullPolicy : {{ .Values.image.pullPolicy }}
3943 envFrom :
4044 - configMapRef :
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ apiVersion: autoscaling/v2
44kind : HorizontalPodAutoscaler
55metadata :
66 name : {{ include "app.fullname" . }}
7+ namespace : {{ .Values.namespace | default "app-system" }}
78 labels :
89 {{- include "app.labels" . | nindent 4 }}
910spec :
@@ -18,12 +19,16 @@ spec:
1819 - type : Resource
1920 resource :
2021 name : cpu
21- targetAverageUtilization : {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
22+ target :
23+ type : Utilization
24+ averageUtilization : {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
2225 {{- end }}
2326 {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
2427 - type : Resource
2528 resource :
2629 name : memory
27- targetAverageUtilization : {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
30+ target :
31+ type : Utilization
32+ averageUtilization : {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
2833 {{- end }}
2934{{- end }}
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ apiVersion: extensions/v1beta1
1717kind : Ingress
1818metadata :
1919 name : {{ $fullName }}
20+ namespace : {{ .Values.namespace | default "app-system" }}
2021 labels :
2122 {{- include "app.labels" . | nindent 4 }}
2223 {{- with .Values.ingress.annotations }}
Original file line number Diff line number Diff line change 1+ {{- if .Values.networkPolicy.enabled }}
2+ ---
3+ apiVersion : networking.k8s.io/v1
4+ kind : NetworkPolicy
5+ metadata :
6+ name : {{ include "app.fullname" . }}
7+ namespace : {{ .Values.namespace | default "app-system" }}
8+ labels :
9+ {{- include "app.labels" . | nindent 4 }}
10+ spec :
11+ podSelector :
12+ matchLabels :
13+ {{- include "app.selectorLabels" . | nindent 6 }}
14+ policyTypes :
15+ - Ingress
16+ - Egress
17+ ingress :
18+ {{- if .Values.networkPolicy.ingress }}
19+ {{- range .Values.networkPolicy.ingress }}
20+ - {{- toYaml . | nindent 6 }}
21+ {{- end }}
22+ {{- else }}
23+ # Default: Allow ingress from any pod in the same namespace on HTTP port
24+ - from :
25+ - namespaceSelector : {}
26+ ports :
27+ - protocol : TCP
28+ port : 8080
29+ {{- end }}
30+ egress :
31+ {{- if .Values.networkPolicy.egress }}
32+ {{- range .Values.networkPolicy.egress }}
33+ - {{- toYaml . | nindent 6 }}
34+ {{- end }}
35+ {{- else }}
36+ # Default: Allow egress to DNS and MySQL
37+ - to : []
38+ ports :
39+ - protocol : UDP
40+ port : 53
41+ - protocol : TCP
42+ port : 53
43+ - to :
44+ - podSelector :
45+ matchLabels :
46+ app.kubernetes.io/name : mysql
47+ ports :
48+ - protocol : TCP
49+ port : 3306
50+ # Allow HTTPS for external API calls
51+ - to : []
52+ ports :
53+ - protocol : TCP
54+ port : 443
55+ - protocol : TCP
56+ port : 80
57+ {{- end }}
58+ {{- end }}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ apiVersion: v1
33kind : Service
44metadata :
55 name : {{ include "app.fullname" . }}
6- namespace : {{ .Values.namespace }}
6+ namespace : {{ .Values.namespace | default "app-system" }}
77 labels : {{- include "app.labels" . | nindent 4 }}
88spec :
99 type : {{ .Values.service.type }}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ apiVersion: v1
33kind : ServiceAccount
44metadata :
55 name : {{ include "app.serviceAccountName" . }}
6- namespace : {{ .Values.namespace }}
6+ namespace : {{ .Values.namespace | default "app-system" }}
77 labels :
88 {{- include "app.labels" . | nindent 4 }}
99 {{- with .Values.serviceAccount.annotations }}
Original file line number Diff line number Diff line change 22# This is a YAML-formatted file.
33# Declare variables to be passed into your templates.
44---
5+ # Namespace for the application (defaults to "app-system" if not specified)
6+ namespace : " app-system"
7+
58app :
69 dbConnection : mysql
710 dbHost : " mysql"
@@ -88,14 +91,22 @@ autoscaling:
8891 minReplicas : 1
8992 maxReplicas : 100
9093 targetCPUUtilizationPercentage : 80
91- # targetMemoryUtilizationPercentage: 80
94+ targetMemoryUtilizationPercentage : 80
9295
9396nodeSelector : {}
9497
9598tolerations : []
9699
97100affinity : {}
98101
102+ # Network Policy configuration
103+ networkPolicy :
104+ enabled : true
105+ # Custom ingress rules (optional)
106+ ingress : []
107+ # Custom egress rules (optional)
108+ egress : []
109+
99110# chart dependencies
100111mysql :
101112 fullnameOverride : mysql
You can’t perform that action at this time.
0 commit comments