Skip to content

Commit 7e08f32

Browse files
committed
chore: fix lint issues
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
1 parent 8361da6 commit 7e08f32

11 files changed

Lines changed: 100 additions & 16 deletions

File tree

.github/workflows/__need-fix-to-issue.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
2428
jobs:
2529
main:
2630
uses: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml@9a3d71ca9f68bc1061db8ea1442084ac31a0f8bf # 0.23.0

.github/workflows/__shared-ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
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:

actions/helm/parse-chart-uri/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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 -->

tests/charts/umbrella-application/charts/app/templates/configmap.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
kind: ConfigMap
32
apiVersion: v1
3+
kind: ConfigMap
44
metadata:
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 }}
99
data:
10-
{{- with .Values.application }}
10+
{{- with .Values.app }}
1111
DB_CONNECTION: {{ .dbConnection | quote }}
1212
DB_HOST: {{ .dbHost | quote }}
1313
DB_PORT: {{ .dbPort | quote }}

tests/charts/umbrella-application/charts/app/templates/deployment.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apps/v1
33
kind: Deployment
44
metadata:
55
name: {{ include "app.fullname" . }}
6-
namespace: {{ .Values.namespace }}
6+
namespace: {{ .Values.namespace | default "app-system" }}
77
labels:
88
{{- include "app.labels" . | nindent 4 }}
99
spec:
@@ -34,7 +34,11 @@ spec:
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:

tests/charts/umbrella-application/charts/app/templates/hpa.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
---
21
{{- if .Values.autoscaling.enabled }}
2+
---
33
apiVersion: autoscaling/v2
44
kind: HorizontalPodAutoscaler
55
metadata:
66
name: {{ include "app.fullname" . }}
7+
namespace: {{ .Values.namespace | default "app-system" }}
78
labels:
89
{{- include "app.labels" . | nindent 4 }}
910
spec:
@@ -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 }}

tests/charts/umbrella-application/charts/app/templates/ingress.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ apiVersion: extensions/v1beta1
1717
kind: Ingress
1818
metadata:
1919
name: {{ $fullName }}
20+
namespace: {{ .Values.namespace | default "app-system" }}
2021
labels:
2122
{{- include "app.labels" . | nindent 4 }}
2223
{{- with .Values.ingress.annotations }}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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 }}

tests/charts/umbrella-application/charts/app/templates/service.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ apiVersion: v1
33
kind: Service
44
metadata:
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 }}
89
spec:
910
type: {{ .Values.service.type }}
1011
ports:

tests/charts/umbrella-application/charts/app/templates/serviceaccount.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{{- if .Values.serviceAccount.create -}}
2+
---
23
apiVersion: v1
34
kind: ServiceAccount
45
metadata:
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 }}

0 commit comments

Comments
 (0)