pre-commit: install_deps> python -I -m pip install pre-commit pre-commit: freeze> python -m pip freeze --all pre-commit: cfgv==3.4.0,distlib==0.3.8,filelock==3.13.1,identify==2.5.33,nodeenv==1.8.0,pip==23.3.1,platformdirs==4.1.0,pre-commit==3.6.0,PyYAML==6.0.1,setuptools==69.0.2,virtualenv==20.25.0,wheel==0.42.0 pre-commit: commands[0]> pre-commit run --all-files --show-diff-on-failure [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Initializing environment for https://github.com/jorisroovers/gitlint. [INFO] Initializing environment for https://github.com/jorisroovers/gitlint:./gitlint-core[trusted-deps]. [INFO] Initializing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... Trim Trailing Whitespace.................................................Failed - hook id: trailing-whitespace - exit code: 1 - files were modified by this hook Fixing kubernetes/common/postgres/values.yaml Tabs remover.............................................................Failed - hook id: remove-tabs - exit code: 1 - files were modified by this hook Substituting tabs in: kubernetes/common/common/templates/_postgres.tpl by 4 whitespaces Tabs have been successfully removed. Now aborting the commit. You can check the changes made. Then simply "git add --update ." and re-commit pre-commit hook(s) made changes. If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`. To run `pre-commit` as part of git workflow, use `pre-commit install`. All changes made by hooks: diff --git a/kubernetes/common/common/templates/_postgres.tpl b/kubernetes/common/common/templates/_postgres.tpl index 44803a6b5..c01f5dcdf 100644 --- a/kubernetes/common/common/templates/_postgres.tpl +++ b/kubernetes/common/common/templates/_postgres.tpl @@ -149,35 +149,35 @@ spec: backups: pgbackrest: image: {{ include "repositoryGenerator.githubContainerRegistry" . }}/{{ .Values.postgresOperator.imagePgBackRest}} - {{- if .Values.postgresOperator.pgBackRestConfig }} + {{- if .Values.postgresOperator.pgBackRestConfig }} {{ toYaml .Values.postgresOperator.pgBackRestConfig | indent 6 }} {{- else if .Values.multiBackupRepos }} - configuration: + configuration: - secret: name: {{ default .Release.Name .Values.name }}-pgbackrest-secret - restore: - enabled: true - repoName: repo1 + restore: + enabled: true + repoName: repo1 manual: - repoName: repo1 - options: - - --type=full + repoName: repo1 + options: + - --type=full global: {{- range $index, $repo := .Values.multiBackupRepos }} {{- if or $repo.s3 $repo.gcs $repo.azure }} repo{{ add $index 1 }}-path: /pgbackrest/{{ $.Release.Namespace }}/{{ default $.Release.Name $.Values.name }}/repo{{ add $index 1 }} - repo1-retention-full: "30" - repo1-retention-full-type: time + repo1-retention-full: "30" + repo1-retention-full-type: time {{- end }} {{- end }} repos: {{- range $index, $repo := .Values.multiBackupRepos }} - name: repo{{ add $index 1 }} - schedules: - full: "0 1 * * *" - incremental: "0 */2 * * *" + schedules: + full: "0 1 * * *" + incremental: "0 */2 * * *" {{- if $repo.volume }} - volume: + volume: volumeClaimSpec: {{- if $repo.volume.backupsStorageClassName }} storageClassName: {{ .Values.backupsStorageClassName | quote }} @@ -188,23 +188,23 @@ spec: requests: storage: {{ default "1Gi" $repo.volume.backupsSize | quote }} {{- else if $repo.s3 }} - s3: + s3: bucket: {{ $repo.s3.bucket | quote }} endpoint: {{ $repo.s3.endpoint | quote }} region: {{ $repo.s3.region | quote }} {{- else if $repo.gcs }} - gcs: + gcs: bucket: {{ $repo.gcs.bucket | quote }} {{- else if $repo.azure }} azure: container: {{ $repo.azure.container | quote }} {{- end }} {{- end }} - {{- else if .Values.s3 }} + {{- else if .Values.s3 }} configuration: - secret: name: {{ default .Release.Name .Values.name }}-pgbackrest-secret - global: + global: repo1-path: /pgbackrest/{{ .Release.Namespace }}/{{ default .Release.Name .Values.name }}/repo1 {{- if .Values.s3.encryptionPassphrase }} repo1-cipher-type: aes-256-cbc @@ -255,12 +255,12 @@ spec: {{- if .Values.postgresOperator.imagePgBouncer }} image: {{ .Values.postgresOperator.imagePgBouncer | quote }} {{- end }} - {{- if .Values.postgresOperator.pgBouncerConfig }} + {{- if .Values.postgresOperator.pgBouncerConfig }} {{ toYaml .Values.postgresOperator.pgBouncerConfig | indent 6 }} {{- else }} replicas: {{ .Values.postgresOperator.pgBouncerReplicas }} {{- end }} - {{- if .Values.postgresOperator.patroni }} + {{- if .Values.postgresOperator.patroni }} patroni: {{ toYaml .Values.postgresOperator.patroni | indent 4 }} {{- end }} @@ -268,15 +268,15 @@ spec: users: {{ toYaml .Values.postgresOperator.users | indent 4 }} {{- end }} - {{- if .Values.postgresOperator.service }} + {{- if .Values.postgresOperator.service }} service: {{ toYaml .Values.postgresOperator.service | indent 4 }} {{- end }} - {{- if .Values.postgresOperator.dataSource }} + {{- if .Values.postgresOperator.dataSource }} dataSource: {{ toYaml .Values.postgresOperator.dataSource | indent 4 }} {{- end }} - {{- if .Values.postgresOperator.databaseInitSQL }} + {{- if .Values.postgresOperator.databaseInitSQL }} databaseInitSQL: name: {{ required "A ConfigMap name is required for running bootstrap SQL." .Values.postgresOperator.databaseInitSQL.name | quote }} key: {{ required "A key in a ConfigMap containing any bootstrap SQL is required." .Values.postgresOperator.databaseInitSQL.key | quote }} @@ -284,18 +284,18 @@ spec: {{- if .Values.postgresOperator.imagePullPolicy }} imagePullPolicy: {{ .Values.postgresOperator.imagePullPolicy | quote }} {{- end }} - {{- if .Values.postgresOperator.imagePullSecrets }} + {{- if .Values.postgresOperator.imagePullSecrets }} imagePullSecrets: {{ toYaml .Values.postgresOperator.imagePullSecrets | indent 4 }} {{- end }} - {{- if .Values.postgresOperator.disableDefaultPodScheduling }} + {{- if .Values.postgresOperator.disableDefaultPodScheduling }} disableDefaultPodScheduling: true {{- end }} - {{- if .Values.postgresOperator.metadata }} + {{- if .Values.postgresOperator.metadata }} metadata: {{ toYaml .Values.postgresOperator.metadata | indent 4 }} {{- end }} - {{- if .Values.postgresOperator.shutdown }} + {{- if .Values.postgresOperator.shutdown }} shutdown: true {{- end }} {{- if .Values.postgresOperator.standby }} @@ -305,11 +305,11 @@ spec: host: {{ .Values.postgresOperator.standby.host }} port: {{ .Values.postgresOperator.standby.port }} {{- end }} - {{- if .Values.postgresOperator.customTLSSecret }} + {{- if .Values.postgresOperator.customTLSSecret }} customTLSSecret: {{ toYaml .Values.postgresOperator.customTLSSecret | indent 4 }} {{- end }} - {{- if .Values.postgresOperator.customReplicationTLSSecret }} + {{- if .Values.postgresOperator.customReplicationTLSSecret }} customReplicationTLSSecret: {{ toYaml .Values.postgresOperator.customReplicationTLSSecret | indent 4 }} {{- end }} diff --git a/kubernetes/common/postgres/values.yaml b/kubernetes/common/postgres/values.yaml index 4e01c11e8..3cd57c508 100644 --- a/kubernetes/common/postgres/values.yaml +++ b/kubernetes/common/postgres/values.yaml @@ -125,7 +125,7 @@ flavor: small postgresOperator enabled: true - controllerImages: + controllerImages: cluster: crunchydata/postgres-operator:ubi8-5.4.2-0 imagePostgres : crunchydata/crunchy-postgres:ubi8-15.4-0 imagePgBackRest: crunchydata/crunchy-pgbackrest:ubi8-2.47-0 pre-commit: exit 1 (11.81 seconds) /w/workspace/oom-master-pre-commit-lint> pre-commit run --all-files --show-diff-on-failure pid=2304 pre-commit: FAIL code 1 (16.05=setup[4.24]+cmd[11.81] seconds) evaluation failed :( (16.24 seconds)