Skip to content

Commit 6de22b2

Browse files
authored
[ALL] Add a pre-commit default configuration (#81)
1 parent ebc743a commit 6de22b2

File tree

75 files changed

+594
-486
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+594
-486
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: azure/setup-helm@v4
2828
with:
2929
version: v3.10.0
30-
30+
3131
- name: Install helm-docs
3232
run: |
3333
cd /tmp

.pre-commit-config.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
repos:
2+
- repo: https://github.com/Gaspi/pre-commit-hooks
3+
rev: v0.3
4+
hooks:
5+
# Validate schemas using the jsonschema.validators package
6+
- id: validate-json-schemas
7+
args:
8+
# Forbid legacy https://json-schema.org/draft/2020-12/schema schema validator and suggest Draft 7 instead
9+
- --forbid-legacy
10+
# Ensure technically facultative attribute (such as `type`) are systematically specified
11+
- id: missing-attributes-schemas
12+
args:
13+
# Also require `items` to be systematically specified for arrays
14+
- --check-items
15+
# Also require `properties` to be systematically specified for object
16+
- --check-properties
17+
# Also require `properties` to be systematically specified for object
18+
- --check-defaults
19+
- id: version-bump
20+
args:
21+
- --branch
22+
- main
23+
24+
- repo: https://github.com/pre-commit/pre-commit-hooks
25+
rev: v5.0.0
26+
hooks:
27+
# Check yaml files except for Helm templates
28+
- id: check-yaml
29+
exclude: "/(templates|tests)/"
30+
# Check empty new line before EOF (ignore generated charts)
31+
- id: end-of-file-fixer
32+
# Check trailing whitespaces (ignore generated charts)
33+
- id: trailing-whitespace
34+
35+
# Run `helm lint` on all (modified) charts: this may require a manual `helm dep update`:
36+
# ls charts | xargs -i{} bash -c "cd charts/{} && helm dep update"
37+
- repo: https://github.com/gruntwork-io/pre-commit
38+
rev: v0.1.15
39+
hooks:
40+
- id: helmlint

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Helm charts Automation
22

33
This collection of Helm Charts is tailored for datascientists !
4-
It is primarly designed to work with [Onyxia](https://github.com/inseefrlab/onyxia) but also works as a standalone Helm repository.
4+
It is primarly designed to work with [Onyxia](https://github.com/inseefrlab/onyxia) but also works as a standalone Helm repository.
55
You should use official helm repository of each opensource software if you don't use onyxia.
66

77
:warning: If you intend to use `argo-cd` or `argo-workflows` from this repo, you first have to install and upgrade CRDs manually as it has been disabled here (installing CRDs multiple times fails with error `Error: rendered manifests contain a resource that already exists. Unable to continue with install: CustomResourceDefinition "applications.argoproj.io" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key "app.kubernetes.io/managed-by": must be set to "Helm"; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "argo-cd-446848"; annotation validation error: missing key "meta.helm.sh/release-namespace": must be set to "user-xxx"`). See https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd#custom-resource-definitions for more details. :warning:

charts/airflow/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ home: https://airflow.apache.org/
1111
sources:
1212
- https://github.com/bitnami/charts/tree/main/bitnami/airflow
1313
type: application
14-
version: 0.0.1
14+
version: 0.0.2
1515
appVersion: "2.10.3"
1616
dependencies:
1717
- name: airflow

charts/airflow/values.schema.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@
190190
"repositories": {
191191
"description": "List of git repositories to synchronize DAGs with",
192192
"type": "array",
193+
"default": [],
193194
"items": {
194195
"type": "object",
195196
"properties": {
@@ -377,8 +378,12 @@
377378
}
378379
},
379380
"from": {
381+
"description": "Array of sources allowed to have network access to your service",
380382
"type": "array",
381-
"description": "Array of source allowed to have network access to your service",
383+
"items": {
384+
"type": "object",
385+
"additionalProperties": true
386+
},
382387
"default": [],
383388
"x-onyxia": {
384389
"hidden": true,
@@ -405,4 +410,4 @@
405410
}
406411
}
407412
}
408-
}
413+
}

charts/argilla/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ sources:
1212
- https://github.com/InseeFrLab/helm-charts-miscellaneous/tree/master/charts/argilla
1313
- https://github.com/argilla-io/argilla/
1414
type: application
15-
version: 1.0.1
15+
version: 1.0.2
1616
appVersion: "2.3.0"
1717
dependencies:
1818
- name: redis

charts/argilla/templates/hpa.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ spec:
2020
target:
2121
type: Utilization
2222
averageUtilization: 80
23-
{{ end }}
23+
{{ end }}

charts/argilla/templates/ingress.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ spec:
2929
backend:
3030
service:
3131
name: {{ include "library-chart.fullname" . }}
32-
port:
32+
port:
3333
number: 6900
34-
{{- end }}
34+
{{- end }}

charts/argilla/values.schema.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,8 +773,12 @@
773773
}
774774
},
775775
"from": {
776+
"description": "Array of sources allowed to have network access to your service",
776777
"type": "array",
777-
"description": "Array of source allowed to have network access to your service",
778+
"items": {
779+
"type": "object",
780+
"additionalProperties": true
781+
},
778782
"default": [],
779783
"x-onyxia": {
780784
"hidden": true,

charts/argo-cd/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type: application
2424
# This is the chart version. This version number should be incremented each time you make changes
2525
# to the chart and its templates, including the app version.
2626
# Versions are expected to follow Semantic Versioning (https://semver.org/)
27-
version: 1.0.2
27+
version: 1.0.3
2828

2929
# This is the version number of the application being deployed. This version number should be
3030
# incremented each time you make changes to the application. Versions are not expected to

0 commit comments

Comments
 (0)