diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index 9cf2c3916d..aaa0d65eb9 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -39,6 +39,7 @@ jobs: ignore-unfixed: true vuln-type: 'os,library' severity: 'CRITICAL,HIGH' + version: 'v0.57.1' - name: Build an image from Dockerfile (linux/amd64) run: | @@ -57,3 +58,4 @@ jobs: ignore-unfixed: true vuln-type: 'os,library' severity: 'CRITICAL,HIGH' + version: 'v0.57.1' diff --git a/build/crd/crunchy/generated/postgres-operator.crunchydata.com_postgresclusters.yaml b/build/crd/crunchy/generated/postgres-operator.crunchydata.com_postgresclusters.yaml index 8b88d8c422..a9a5ce4831 100644 --- a/build/crd/crunchy/generated/postgres-operator.crunchydata.com_postgresclusters.yaml +++ b/build/crd/crunchy/generated/postgres-operator.crunchydata.com_postgresclusters.yaml @@ -3274,6 +3274,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -4515,6 +4516,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -6598,6 +6600,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -7938,6 +7941,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -13946,6 +13950,7 @@ spec: in a PostgresCluster. properties: enabled: + default: false description: Whether or not the operator should allow switchovers in a PostgresCluster type: boolean diff --git a/build/crd/percona/generated/pgv2.percona.com_perconapgbackups.yaml b/build/crd/percona/generated/pgv2.percona.com_perconapgbackups.yaml index d0f40f6fc7..b93f221117 100644 --- a/build/crd/percona/generated/pgv2.percona.com_perconapgbackups.yaml +++ b/build/crd/percona/generated/pgv2.percona.com_perconapgbackups.yaml @@ -132,6 +132,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string diff --git a/build/crd/percona/generated/pgv2.percona.com_perconapgclusters.yaml b/build/crd/percona/generated/pgv2.percona.com_perconapgclusters.yaml index dd5ac0fae1..7a6c7f7ad0 100644 --- a/build/crd/percona/generated/pgv2.percona.com_perconapgclusters.yaml +++ b/build/crd/percona/generated/pgv2.percona.com_perconapgclusters.yaml @@ -3425,6 +3425,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -4666,6 +4667,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -6248,6 +6250,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -7588,6 +7591,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -13282,6 +13286,7 @@ spec: in a PostgresCluster. properties: enabled: + default: false description: Whether or not the operator should allow switchovers in a PostgresCluster type: boolean diff --git a/config/crd/bases/pgv2.percona.com_perconapgclusters.yaml b/config/crd/bases/pgv2.percona.com_perconapgclusters.yaml index e0c487505c..b97a1cdedb 100644 --- a/config/crd/bases/pgv2.percona.com_perconapgclusters.yaml +++ b/config/crd/bases/pgv2.percona.com_perconapgclusters.yaml @@ -131,6 +131,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -3830,6 +3831,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -5071,6 +5073,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -6653,6 +6656,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -7993,6 +7997,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -13687,6 +13692,7 @@ spec: in a PostgresCluster. properties: enabled: + default: false description: Whether or not the operator should allow switchovers in a PostgresCluster type: boolean diff --git a/config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml b/config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml index 21978ad2f9..664e1fb8ad 100644 --- a/config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml +++ b/config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml @@ -3256,6 +3256,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -4505,6 +4506,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -6558,6 +6560,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -7898,6 +7901,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -13888,6 +13892,7 @@ spec: in a PostgresCluster. properties: enabled: + default: false description: Whether or not the operator should allow switchovers in a PostgresCluster type: boolean diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index 3e95ad9f63..8d75cd6227 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -424,6 +424,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -4123,6 +4124,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -5364,6 +5366,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -6946,6 +6949,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -8286,6 +8290,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -13980,6 +13985,7 @@ spec: in a PostgresCluster. properties: enabled: + default: false description: Whether or not the operator should allow switchovers in a PostgresCluster type: boolean @@ -28800,6 +28806,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -30049,6 +30056,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -32102,6 +32110,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -33442,6 +33451,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -39432,6 +39442,7 @@ spec: in a PostgresCluster. properties: enabled: + default: false description: Whether or not the operator should allow switchovers in a PostgresCluster type: boolean diff --git a/deploy/crd.yaml b/deploy/crd.yaml index af6c4b01ce..ab09163642 100644 --- a/deploy/crd.yaml +++ b/deploy/crd.yaml @@ -424,6 +424,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -4123,6 +4124,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -5364,6 +5366,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -6946,6 +6949,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -8286,6 +8290,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -13980,6 +13985,7 @@ spec: in a PostgresCluster. properties: enabled: + default: false description: Whether or not the operator should allow switchovers in a PostgresCluster type: boolean @@ -28800,6 +28806,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -30049,6 +30056,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -32102,6 +32110,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -33442,6 +33451,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -39432,6 +39442,7 @@ spec: in a PostgresCluster. properties: enabled: + default: false description: Whether or not the operator should allow switchovers in a PostgresCluster type: boolean diff --git a/deploy/cw-bundle.yaml b/deploy/cw-bundle.yaml index 1ae1b43a87..873b4c22d3 100644 --- a/deploy/cw-bundle.yaml +++ b/deploy/cw-bundle.yaml @@ -424,6 +424,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -4123,6 +4124,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -5364,6 +5366,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -6946,6 +6949,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -8286,6 +8290,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -13980,6 +13985,7 @@ spec: in a PostgresCluster. properties: enabled: + default: false description: Whether or not the operator should allow switchovers in a PostgresCluster type: boolean @@ -28800,6 +28806,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -30049,6 +30056,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -32102,6 +32110,7 @@ spec: - bucket type: object name: + default: repo1 description: The name of the repository pattern: ^repo[1-4] type: string @@ -33442,6 +33451,7 @@ spec: More info: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ type: string repoName: + default: repo1 description: |- The name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source @@ -39432,6 +39442,7 @@ spec: in a PostgresCluster. properties: enabled: + default: false description: Whether or not the operator should allow switchovers in a PostgresCluster type: boolean diff --git a/pkg/apis/postgres-operator.crunchydata.com/v1beta1/patroni_types.go b/pkg/apis/postgres-operator.crunchydata.com/v1beta1/patroni_types.go index 111c4fb805..6788ef8b1a 100644 --- a/pkg/apis/postgres-operator.crunchydata.com/v1beta1/patroni_types.go +++ b/pkg/apis/postgres-operator.crunchydata.com/v1beta1/patroni_types.go @@ -63,6 +63,7 @@ type PatroniSwitchover struct { // Whether or not the operator should allow switchovers in a PostgresCluster // +required + // +kubebuilder:default=false Enabled bool `json:"enabled"` // The instance that should become primary during a switchover. This field is diff --git a/pkg/apis/postgres-operator.crunchydata.com/v1beta1/pgbackrest_types.go b/pkg/apis/postgres-operator.crunchydata.com/v1beta1/pgbackrest_types.go index bc8f43de38..f34bf223ca 100644 --- a/pkg/apis/postgres-operator.crunchydata.com/v1beta1/pgbackrest_types.go +++ b/pkg/apis/postgres-operator.crunchydata.com/v1beta1/pgbackrest_types.go @@ -322,6 +322,7 @@ type PGBackRestRepo struct { // The name of the repository // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern=^repo[1-4] + // +kubebuilder:default="repo1" Name string `json:"name"` // Defines the schedules for the pgBackRest backups diff --git a/pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go b/pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go index 39d903e47d..943a26dc25 100644 --- a/pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go +++ b/pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go @@ -294,6 +294,7 @@ type PostgresClusterDataSource struct { // for the new PostgresCluster. // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern=^repo[1-4] + // +kubebuilder:default="repo1" RepoName string `json:"repoName"` // Command line options to include when running the pgBackRest restore command.