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 @@ -21,6 +21,10 @@ permissions:
2121 contents : read
2222 issues : write
2323
24+ concurrency :
25+ group : ${{ github.workflow }}-${{ github.ref }}
26+ cancel-in-progress : true
27+
2428jobs :
2529 main :
2630 uses : hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml@9a3d71ca9f68bc1061db8ea1442084ac31a0f8bf # 0.23.0
Original file line number Diff line number Diff line change 2323 # FIXME: re-enable the following checks
2424 linter-env : |
2525 VALIDATE_KUBERNETES_KUBECONFORM=false
26- VALIDATE_CHECKOV=false
2726 VALIDATE_JAVASCRIPT_PRETTIER=false
2827
2928 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 11---
2- kind : ConfigMap
32apiVersion : v1
3+ kind : ConfigMap
44metadata :
5- name : {{ template "app.fullname" . }}-config
6- namespace : {{ .Values.namespace }}
5+ name : {{ include "app.fullname" . }}-config
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 1- ---
21{{- if .Values.autoscaling.enabled }}
2+ ---
33apiVersion : 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,8 +3,9 @@ apiVersion: v1
33kind : Service
44metadata :
55 name : {{ include "app.fullname" . }}
6- namespace : {{ .Values.namespace }}
7- labels : {{- include "app.labels" . | nindent 4 }}
6+ namespace : {{ .Values.namespace | default "app-system" }}
7+ labels :
8+ {{- include "app.labels" . | nindent 4 }}
89spec :
910 type : {{ .Values.service.type }}
1011 ports :
Original file line number Diff line number Diff line change 11{{- if .Values.serviceAccount.create -}}
2+ ---
23apiVersion : v1
34kind : ServiceAccount
45metadata :
56 name : {{ include "app.serviceAccountName" . }}
6- namespace : {{ .Values.namespace }}
7+ namespace : {{ .Values.namespace | default "app-system" }}
78 labels :
89 {{- include "app.labels" . | nindent 4 }}
910 {{- with .Values.serviceAccount.annotations }}
You can’t perform that action at this time.
0 commit comments