Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed formatting after running pre-commit hooks #333

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# Using pip:
# pip install pre-commit
# exclude: '^collections/'
#
# To install, run the project in the root:
# pre-commit install
# To uninstall, run the project in the root:
# pre-commit uninstall

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-symlinks
- id: debug-statements
# - id: check-yaml
# # exclude: '^(old)/|log.yml'
# args: [--unsafe]
# - repo: https://github.com/executablebooks/mdformat
# rev: 0.7.17
# hooks:
# - id: mdformat
2 changes: 0 additions & 2 deletions charts/citylens/templates/helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,3 @@ app.kubernetes.io/name: {{ include "citylens.api.name" . }}
app.kubernetes.io/instance: {{ .Chart.Name }}-db-migration
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}


1 change: 0 additions & 1 deletion charts/floors-api/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,3 @@ data:
return 200 'OK';
}
}

2 changes: 1 addition & 1 deletion charts/floors-api/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
- name: import
image: {{ required "A valid .Values.dgctlDockerRegistry entry required" .Values.dgctlDockerRegistry }}/{{ .Values.import.image.repository }}:{{ .Values.import.image.tag }}
imagePullPolicy: {{ .Values.import.imagePullPolicy }}
securityContext:
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: IMPORTER_S3_ENDPOINT
Expand Down
2 changes: 1 addition & 1 deletion charts/gis-platform/gis-platform-config/layer/2gis.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
},
"urlFormat": "https://tile1.maps.2gis.com/tiles?x={2}&y={3}&z={1}&v=1.5&ts=online_sd_ar&layerType=nc",
"subDomains": [

],
"copyrightText": "",
"allowDirectAccess": true,
Expand Down
1 change: 0 additions & 1 deletion charts/keycloak/configs/citylens.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2167,4 +2167,3 @@
"users": []
{{- end }}
}

5 changes: 2 additions & 3 deletions charts/keycloak/templates/configmap-env-vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ data:
{{- if .Values.cache.enabled }}
KEYCLOAK_CACHE_TYPE: "ispn"
{{- if .Values.cache.stackName }}
KEYCLOAK_CACHE_STACK: {{ .Values.cache.stackName | quote }}
KEYCLOAK_CACHE_STACK: {{ .Values.cache.stackName | quote }}
{{- end }}
{{- if .Values.cache.stackFile }}
KEYCLOAK_CACHE_CONFIG_FILE: {{ .Values.cache.stackFile | quote }}
KEYCLOAK_CACHE_CONFIG_FILE: {{ .Values.cache.stackFile | quote }}
{{- end }}
JAVA_OPTS_APPEND: {{ printf "-Djgroups.dns.query=%s-headless.%s.svc" (include "keycloak.fullname" .) (include "keycloak.names.namespace" .) | quote }}
{{- else }}
Expand All @@ -48,4 +48,3 @@ data:
KEYCLOAK_LOG_OUTPUT: {{ .Values.logging.output | quote }}
KC_LOG_LEVEL: {{ .Values.logging.level | quote }}
{{- end }}

1 change: 0 additions & 1 deletion charts/keycloak/templates/tls-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ data:
tls.key: {{ include "keycloak.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $cert.Key "context" $) }}
ca.crt: {{ include "keycloak.secrets.lookup" (dict "secret" $secretName "key" "ca.crt" "defaultValue" $ca.Cert "context" $) }}
{{- end }}

4 changes: 2 additions & 2 deletions charts/keys/templates/helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,11 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{ range $service, $key := .Values.predefined.service.keys }}
- name: KEYS_PREDEF_SERVICE_KEY_{{ $service | upper }}
value: {{ $key }}
{{ end }}
{{ end }}
{{ range $service, $key := .Values.predefined.service.aliases }}
- name: KEYS_PREDEF_SERVICE_ALIAS_{{ $service | upper }}
value: {{ $key }}
{{ end }}
{{ end }}
{{- end }}

{{/*
Expand Down
20 changes: 10 additions & 10 deletions charts/navi-back/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ data:
[
"http://{REMOTE_FORECAST}/index.json"
],
"timeout_seconds":
"timeout_seconds":
{
"count": 30
}
Expand All @@ -110,7 +110,7 @@ data:
[
"http://{REMOTE_FORECAST}/"
],
"timeout_seconds":
"timeout_seconds":
{
"count": 30
}
Expand All @@ -124,7 +124,7 @@ data:
[
"http://{REMOTE_PATH}/"
],
"timeout_seconds":
"timeout_seconds":
{
"count": 60
}
Expand All @@ -138,7 +138,7 @@ data:
[
"http://{REMOTE_PATH}/options/taxi_referers.json"
],
"timeout_seconds":
"timeout_seconds":
{
"count": 360
}
Expand All @@ -153,7 +153,7 @@ data:
[
"http://{REMOTE_PATH}/"
],
"timeout_seconds":
"timeout_seconds":
{
"count": 10
}
Expand All @@ -167,7 +167,7 @@ data:
[
"http://{REMOTE_PATH}/"
],
"timeout_seconds":
"timeout_seconds":
{
"count": 10
}
Expand Down Expand Up @@ -287,7 +287,7 @@ data:
[
"http://{REMOTE_PATH}/tugc_users.json.zip"
],
"timeout_seconds":
"timeout_seconds":
{
"count": 30
}
Expand All @@ -301,7 +301,7 @@ data:
[
"http://{REMOTE_PATH}/"
],
"timeout_seconds":
"timeout_seconds":
{
"count": 30
}
Expand All @@ -315,7 +315,7 @@ data:
[
"http://{REMOTE_PATH}/tugc_2gis.json.zip"
],
"timeout_seconds":
"timeout_seconds":
{
"count": 30
}
Expand All @@ -329,7 +329,7 @@ data:
[
"http://{REMOTE_PATH}/"
],
"timeout_seconds":
"timeout_seconds":
{
"count": 30
}
Expand Down
4 changes: 2 additions & 2 deletions charts/navi-back/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "naviback.selectorLabels" . | nindent 8 }}
Expand All @@ -38,7 +38,7 @@ spec:
serviceAccountName: {{ include "naviback.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
volumes:
volumes:
- name: {{ include "naviback.fullname" . }}-configmap
configMap:
name: {{ include "naviback.fullname" . }}-configmap
Expand Down
1 change: 0 additions & 1 deletion charts/navi-castle/templates/configmapnginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ data:
return 200 "Ok!";
}
}

16 changes: 8 additions & 8 deletions charts/navi-castle/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@ spec:
- key: statefulset.kubernetes.io/pod-name
operator: In
values:
- {{ include "castle.fullname" $ }}-{{ $i }}
- {{ include "castle.fullname" $ }}-{{ $i }}
topologyKey: "kubernetes.io/hostname"
restartPolicy: OnFailure
volumes:
volumes:
- name: {{ include "castle.fullname" $ }}-pvc
persistentVolumeClaim:
claimName: {{ include "castle.fullname" $ }}-pvc-{{ include "castle.fullname" $ }}-{{ $i }}
claimName: {{ include "castle.fullname" $ }}-pvc-{{ include "castle.fullname" $ }}-{{ $i }}
- name: {{ include "castle.fullname" $ }}-builder-config
configMap:
name: {{ include "castle.fullname" $ }}-builder-config
name: {{ include "castle.fullname" $ }}-builder-config
containers:
- name: castle-cron
image: {{ required "A valid .Values.dgctlDockerRegistry entry required" $.Values.dgctlDockerRegistry }}/{{ $.Values.castle.image.repository }}:{{ $.Values.castle.image.tag | default $.Chart.AppVersion }}
imagePullPolicy: {{ $.Values.castle.image.pullPolicy }}
imagePullPolicy: {{ $.Values.castle.image.pullPolicy }}
command: [ "/opt/configuration_builder" ]
args:
- --config
args:
- --config
- /opt/config_builder.conf
- --service={{ $flavor }}
- --jobs={{ $.Values.castle.jobs | default 1 | int }}
Expand All @@ -54,7 +54,7 @@ spec:
subPath: config_builder.conf
- name: {{ include "castle.fullname" $ }}-builder-config
mountPath: {{ $.Values.castle.castleDataPath }}/cities_template
subPath: cities_template
subPath: cities_template
- name: {{ include "castle.fullname" $ }}-pvc
mountPath: {{ $.Values.castle.castleDataPath }}
resources:
Expand Down
10 changes: 5 additions & 5 deletions charts/navi-castle/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
checksum/configbuilder: {{ include (print $.Template.BasePath "/configmapbuilder.yaml") . | sha256sum }}
checksum/confignginx: {{ include (print $.Template.BasePath "/configmapnginx.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "castle.selectorLabels" . | nindent 8 }}
Expand All @@ -51,9 +51,9 @@ spec:
- name: castle-{{ $flavor }}-init
image: {{ required "A valid $.Values.dgctlDockerRegistry entry required" $.Values.dgctlDockerRegistry }}/{{ $.Values.castle.image.repository }}:{{ $.Values.castle.image.tag }}
command: [ "/opt/configuration_builder" ]
args:
- --config
- /opt/config_builder.conf
args:
- --config
- /opt/config_builder.conf
- --service={{ $flavor }}
- --jobs={{ $.Values.castle.jobs | default 1 | int }}
volumeMounts:
Expand Down Expand Up @@ -152,7 +152,7 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.persistentVolume.enabled }}
{{- if .Values.persistentVolume.enabled }}
volumeClaimTemplates:
- metadata:
name: {{ include "castle.fullname" . }}-pvc
Expand Down
6 changes: 3 additions & 3 deletions charts/navi-front/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ Checking that the back service is valid
{{- $service := .service -}}
{{- $is_valid := false -}}
{{- $navigroup := default "" .context.Values.navigroup -}}
{{/* Supported back implementations: navi-back, mock, splitter */}}
{{- if
{{/* Supported back implementations: navi-back, mock, splitter */}}
{{- if
and
(has (get $service.metadata.labels "app.kubernetes.io/name") (list "navi-back" "mock" "splitter" "navi-splitter"))
(eq (get $service.metadata.labels "navigroup") $navigroup)
(eq (get $service.metadata.labels "navigroup") $navigroup)
(not (get $service.metadata.labels "behindSplitter"))
-}}
{{- $is_valid = true -}}
Expand Down
1 change: 0 additions & 1 deletion charts/navi-front/templates/configmap-extra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ data:
locations-block.conf: |-
{{ include "tplvalues.render" ( dict "value" .Values.locationsBlock "context" $ ) | indent 4 }}
{{- end }}

6 changes: 3 additions & 3 deletions charts/navi-front/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
checksum/configBase: {{ include (print $.Template.BasePath "/configmap-base.yaml") . | sha256sum }}
checksum/configExtra: {{ include (print $.Template.BasePath "/configmap-extra.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "front.selectorLabels" . | nindent 8 }}
Expand All @@ -29,7 +29,7 @@ spec:
serviceAccountName: {{ include "front.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
volumes:
volumes:
- name: {{ include "front.fullname" . }}-base
configMap:
name: {{ include "front.fullname" . }}-base
Expand Down Expand Up @@ -77,7 +77,7 @@ spec:
httpGet:
path: /healthcheck
port: http

resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
2 changes: 1 addition & 1 deletion charts/navi-restrictions/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ spec:
containers:
- name: navi-restrictions-cron
image: '{{ required "A valid .Values.dgctlDockerRegistry entry required" .Values.dgctlDockerRegistry }}/{{ .Values.cron.image.repository }}:{{ .Values.cron.image.tag | default .Chart.AppVersion }}'
imagePullPolicy: {{ .Values.cron.image.pullPolicy }}
imagePullPolicy: {{ .Values.cron.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.cron.containerPort }}
Expand Down
6 changes: 3 additions & 3 deletions charts/navi-router/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "router.selectorLabels" . | nindent 8 }}
Expand All @@ -33,7 +33,7 @@ spec:
serviceAccountName: {{ include "router.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
volumes:
volumes:
- name: {{ include "router.fullname" . }}-configmap
configMap:
name: {{ include "router.fullname" . }}-configmap
Expand Down Expand Up @@ -71,7 +71,7 @@ spec:
timeoutSeconds: 3
failureThreshold: 3
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- toYaml .Values.resources | nindent 12 }}
terminationGracePeriodSeconds: {{ .Values.termination_grace_period_seconds | default 60 }}
{{- with .Values.nodeSelector }}
nodeSelector:
Expand Down
2 changes: 1 addition & 1 deletion charts/navi-splitter/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ spec:
number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/pro-api/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ spec:
- name: Redis__Username
value: {{ $.Values.redis.username }}
{{ if .Values.redis.password }}
- name: Redis__Password
- name: Redis__Password
valueFrom:
secretKeyRef:
key: redisPassword
Expand Down
2 changes: 1 addition & 1 deletion charts/pro-api/templates/permissions-api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ spec:
- name: Redis__Username
value: {{ $.Values.redis.username }}
{{ if .Values.redis.password }}
- name: Redis__Password
- name: Redis__Password
valueFrom:
secretKeyRef:
key: redisPassword
Expand Down
2 changes: 1 addition & 1 deletion charts/pro-api/templates/user-asset-importer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,5 @@ spec:
- name: Common__Logging__Targets
value: "{{ .Values.api.logging.targets }}"
- name: Common__SuppressImportFailure
value: "true"
value: "true"
{{ end }}
Loading