Enable yamllint rules for templates
- braces - brackets - colons - commas - comments - comments-indentation - document-start - hyphens - indentation With corresponding code changes. Also idempotency fix for lint script. Change-Id: Ibe5281cbb4ad7970e92f3d1f921abb1efc89dc3b
This commit is contained in:
parent
ddfa7a4741
commit
dfb32ccf60
@ -126,8 +126,8 @@ spec:
|
|||||||
# conf.controllers expanded values
|
# conf.controllers expanded values
|
||||||
{{ include "helm-toolkit.utils.to_k8s_env_vars" .Values.conf.controllers | indent 12 }}
|
{{ include "helm-toolkit.utils.to_k8s_env_vars" .Values.conf.controllers | indent 12 }}
|
||||||
|
|
||||||
# etcd tls files
|
|
||||||
{{ if .Values.endpoints.etcd.auth.client.tls.ca }}
|
{{ if .Values.endpoints.etcd.auth.client.tls.ca }}
|
||||||
|
# etcd tls files
|
||||||
- name: ETCD_CA_CERT_FILE
|
- name: ETCD_CA_CERT_FILE
|
||||||
value: {{ .Values.endpoints.etcd.auth.client.path.ca }}
|
value: {{ .Values.endpoints.etcd.auth.client.path.ca }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -83,7 +83,7 @@ spec:
|
|||||||
fieldRef:
|
fieldRef:
|
||||||
fieldPath: metadata.namespace
|
fieldPath: metadata.namespace
|
||||||
- name: KUBECTL_PARAM
|
- name: KUBECTL_PARAM
|
||||||
value: {{ tuple $envAll "ceph" "ceph-defragosd" | include "helm-toolkit.snippets.kubernetes_kubectl_params" | indent 10 }}
|
value: {{ tuple $envAll "ceph" "ceph-defragosd" | include "helm-toolkit.snippets.kubernetes_kubectl_params" }}
|
||||||
command:
|
command:
|
||||||
- /tmp/utils-defragOSDs.sh
|
- /tmp/utils-defragOSDs.sh
|
||||||
- cron
|
- cron
|
||||||
|
@ -99,7 +99,7 @@ spec:
|
|||||||
- name: MON_PORT_V2
|
- name: MON_PORT_V2
|
||||||
value: {{ tuple "ceph_mon" "internal" "mon_msgr2" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
|
value: {{ tuple "ceph_mon" "internal" "mon_msgr2" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
|
||||||
- name: KUBECTL_PARAM
|
- name: KUBECTL_PARAM
|
||||||
value: {{ tuple $envAll "ceph" "checkdns" | include "helm-toolkit.snippets.kubernetes_kubectl_params" | indent 10 }}
|
value: {{ tuple $envAll "ceph" "checkdns" | include "helm-toolkit.snippets.kubernetes_kubectl_params" }}
|
||||||
command:
|
command:
|
||||||
- /tmp/_start.sh
|
- /tmp/_start.sh
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
@ -136,7 +136,7 @@ spec:
|
|||||||
- name: CEPH_PUBLIC_NETWORK
|
- name: CEPH_PUBLIC_NETWORK
|
||||||
value: {{ .Values.network.public | quote }}
|
value: {{ .Values.network.public | quote }}
|
||||||
- name: KUBECTL_PARAM
|
- name: KUBECTL_PARAM
|
||||||
value: {{ tuple $envAll "ceph" "mon" | include "helm-toolkit.snippets.kubernetes_kubectl_params" | indent 10 }}
|
value: {{ tuple $envAll "ceph" "mon" | include "helm-toolkit.snippets.kubernetes_kubectl_params" }}
|
||||||
- name: MON_PORT
|
- name: MON_PORT
|
||||||
value: {{ tuple "ceph_mon" "internal" "mon" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
|
value: {{ tuple "ceph_mon" "internal" "mon" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
|
||||||
- name: MON_PORT_V2
|
- name: MON_PORT_V2
|
||||||
|
@ -33,7 +33,7 @@ spec:
|
|||||||
{{ $envAll.Values.labels.test.node_selector_key }}: {{ $envAll.Values.labels.test.node_selector_value | quote }}
|
{{ $envAll.Values.labels.test.node_selector_key }}: {{ $envAll.Values.labels.test.node_selector_value | quote }}
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
initContainers:
|
initContainers:
|
||||||
{{ tuple $envAll "tests" $mounts_kubernetes_keystone_webhook_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
{{ tuple $envAll "tests" $mounts_kubernetes_keystone_webhook_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ $envAll.Release.Name }}-kubernetes-keystone-webhook-test
|
- name: {{ $envAll.Release.Name }}-kubernetes-keystone-webhook-test
|
||||||
{{ tuple $envAll "scripted_test" | include "helm-toolkit.snippets.image" | indent 6 }}
|
{{ tuple $envAll "scripted_test" | include "helm-toolkit.snippets.image" | indent 6 }}
|
||||||
|
@ -24,5 +24,5 @@ spec:
|
|||||||
- name: ldap
|
- name: ldap
|
||||||
port: {{ tuple "ldap" "internal" "ldap" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
port: {{ tuple "ldap" "internal" "ldap" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
selector:
|
selector:
|
||||||
{{ tuple $envAll "ldap" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
{{ tuple $envAll "ldap" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -37,7 +37,7 @@ spec:
|
|||||||
{{ .Values.labels.test.node_selector_key }}: {{ .Values.labels.test.node_selector_value }}
|
{{ .Values.labels.test.node_selector_key }}: {{ .Values.labels.test.node_selector_value }}
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
initContainers:
|
initContainers:
|
||||||
{{ tuple $envAll "tests" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
{{ tuple $envAll "tests" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }}
|
||||||
containers:
|
containers:
|
||||||
- name: mariadb-test
|
- name: mariadb-test
|
||||||
{{ dict "envAll" $envAll "application" "tests" "container" "test" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 6 }}
|
{{ dict "envAll" $envAll "application" "tests" "container" "test" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 6 }}
|
||||||
|
@ -24,5 +24,5 @@ spec:
|
|||||||
- name: db
|
- name: db
|
||||||
port: {{ tuple "mongodb" "internal" "mongodb" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
port: {{ tuple "mongodb" "internal" "mongodb" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
selector:
|
selector:
|
||||||
{{ tuple $envAll "mongodb" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
{{ tuple $envAll "mongodb" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -23,4 +23,3 @@ type: Opaque
|
|||||||
data:
|
data:
|
||||||
admin_user.conf: {{ tuple "secrets/_admin_user.conf.tpl" . | include "helm-toolkit.utils.template" | b64enc }}
|
admin_user.conf: {{ tuple "secrets/_admin_user.conf.tpl" . | include "helm-toolkit.utils.template" | b64enc }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
@ -24,5 +24,5 @@ spec:
|
|||||||
- name: restapi
|
- name: restapi
|
||||||
port: {{ tuple "postgresql-restapi" "internal" "restapi" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
port: {{ tuple "postgresql-restapi" "internal" "restapi" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
selector:
|
selector:
|
||||||
{{ tuple $envAll "postgresql" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
{{ tuple $envAll "postgresql" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -7,10 +7,10 @@ HELM_VERSION=$(yq -r '.version.helm' ${HELM_DATA_YAML})
|
|||||||
GOOGLE_HELM_REPO_URL=$(yq -r '.url.google_helm_repo' ${HELM_DATA_YAML})
|
GOOGLE_HELM_REPO_URL=$(yq -r '.url.google_helm_repo' ${HELM_DATA_YAML})
|
||||||
LINT_DIR=.yamllint
|
LINT_DIR=.yamllint
|
||||||
|
|
||||||
|
rm -rf */charts/helm-toolkit
|
||||||
mkdir ${LINT_DIR}
|
mkdir ${LINT_DIR}
|
||||||
cp -r * ${LINT_DIR}
|
cp -r * ${LINT_DIR}
|
||||||
rm -rf ${LINT_DIR}/*/templates
|
rm -rf ${LINT_DIR}/*/templates
|
||||||
rm -rf */charts/helm-toolkit
|
|
||||||
wget -qO ${LINT_DIR}/helm.tgz ${GOOGLE_HELM_REPO_URL}/helm-${HELM_VERSION}-linux-amd64.tar.gz
|
wget -qO ${LINT_DIR}/helm.tgz ${GOOGLE_HELM_REPO_URL}/helm-${HELM_VERSION}-linux-amd64.tar.gz
|
||||||
tar xzf ${LINT_DIR}/helm.tgz -C ${LINT_DIR} --strip-components=1 linux-amd64/helm
|
tar xzf ${LINT_DIR}/helm.tgz -C ${LINT_DIR} --strip-components=1 linux-amd64/helm
|
||||||
|
|
||||||
|
@ -6,44 +6,27 @@ yaml-files:
|
|||||||
- '.yamllint'
|
- '.yamllint'
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
braces:
|
braces: enable
|
||||||
level: warning
|
brackets: enable
|
||||||
brackets:
|
colons: enable
|
||||||
level: warning
|
commas: enable
|
||||||
colons:
|
comments: enable
|
||||||
level: warning
|
comments-indentation: enable
|
||||||
commas:
|
|
||||||
level: warning
|
|
||||||
comments:
|
|
||||||
level: warning
|
|
||||||
comments-indentation:
|
|
||||||
level: warning
|
|
||||||
document-end: disable
|
document-end: disable
|
||||||
document-start:
|
document-start: enable
|
||||||
level: warning
|
empty-lines: disable
|
||||||
empty-lines:
|
empty-values: disable
|
||||||
level: warning
|
hyphens: enable
|
||||||
empty-values:
|
|
||||||
level: warning
|
|
||||||
hyphens:
|
|
||||||
level: warning
|
|
||||||
indentation:
|
indentation:
|
||||||
spaces: 2
|
spaces: 2
|
||||||
indent-sequences: whatever
|
indent-sequences: whatever
|
||||||
level: warning
|
key-duplicates: disable
|
||||||
key-duplicates:
|
|
||||||
level: warning
|
|
||||||
key-ordering: disable
|
key-ordering: disable
|
||||||
line-length: disable
|
line-length: disable
|
||||||
new-line-at-end-of-file:
|
new-line-at-end-of-file: disable
|
||||||
level: warning
|
new-lines: disable
|
||||||
new-lines:
|
octal-values: disable
|
||||||
level: warning
|
|
||||||
octal-values:
|
|
||||||
level: warning
|
|
||||||
quoted-strings: disable
|
quoted-strings: disable
|
||||||
trailing-spaces:
|
trailing-spaces: disable
|
||||||
level: warning
|
truthy: disable
|
||||||
truthy:
|
|
||||||
level: warning
|
|
||||||
...
|
...
|
||||||
|
Loading…
Reference in New Issue
Block a user