Skip to content

Commit 269e31b

Browse files
pooknullhorsinelpandzic
authored
K8SPG-553: Allow setting root CA manually (#876)
* K8SPG-553: Allow setting root CA manually https://perconadev.atlassian.net/browse/K8SPG-553 https://perconadev.atlassian.net/browse/K8SPG-555 * improve test * fix * improve cr.yaml * fix test * remove unused code * fix test * add new test to csv files * fix test * make generate --------- Co-authored-by: Viacheslav Sarzhan <[email protected]> Co-authored-by: Inel Pandzic <[email protected]>
1 parent 8910766 commit 269e31b

32 files changed

+1201
-82
lines changed

build/crd/crunchy/generated/postgres-operator.crunchydata.com_postgresclusters.yaml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5151,6 +5151,67 @@ spec:
51515151
type: boolean
51525152
type: object
51535153
x-kubernetes-map-type: atomic
5154+
customRootCATLSSecret:
5155+
description: |-
5156+
The secret containing the root CA certificate and key for
5157+
secure connections to the PostgreSQL server. It will need to contain the
5158+
CA TLS certificate and CA TLS key with the data keys set to
5159+
root.crt and root.key, respectively.
5160+
Part of K8SPG-553 ticket.
5161+
properties:
5162+
items:
5163+
description: |-
5164+
items if unspecified, each key-value pair in the Data field of the referenced
5165+
Secret will be projected into the volume as a file whose name is the
5166+
key and content is the value. If specified, the listed keys will be
5167+
projected into the specified paths, and unlisted keys will not be
5168+
present. If a key is specified which is not present in the Secret,
5169+
the volume setup will error unless it is marked optional. Paths must be
5170+
relative and may not contain the '..' path or start with '..'.
5171+
items:
5172+
description: Maps a string key to a path within a volume.
5173+
properties:
5174+
key:
5175+
description: key is the key to project.
5176+
type: string
5177+
mode:
5178+
description: |-
5179+
mode is Optional: mode bits used to set permissions on this file.
5180+
Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
5181+
YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
5182+
If not specified, the volume defaultMode will be used.
5183+
This might be in conflict with other options that affect the file
5184+
mode, like fsGroup, and the result can be other mode bits set.
5185+
format: int32
5186+
type: integer
5187+
path:
5188+
description: |-
5189+
path is the relative path of the file to map the key to.
5190+
May not be an absolute path.
5191+
May not contain the path element '..'.
5192+
May not start with the string '..'.
5193+
type: string
5194+
required:
5195+
- key
5196+
- path
5197+
type: object
5198+
type: array
5199+
x-kubernetes-list-type: atomic
5200+
name:
5201+
default: ""
5202+
description: |-
5203+
Name of the referent.
5204+
This field is effectively required, but due to backwards compatibility is
5205+
allowed to be empty. Instances of this type with an empty value here are
5206+
almost certainly wrong.
5207+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
5208+
type: string
5209+
optional:
5210+
description: optional field specify whether the Secret or its
5211+
key must be defined
5212+
type: boolean
5213+
type: object
5214+
x-kubernetes-map-type: atomic
51545215
customTLSSecret:
51555216
description: |-
51565217
The secret containing the Certificates and Keys to encrypt PostgreSQL

build/crd/percona/generated/pgv2.percona.com_perconapgclusters.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17144,6 +17144,66 @@ spec:
1714417144
type: boolean
1714517145
type: object
1714617146
x-kubernetes-map-type: atomic
17147+
customRootCATLSSecret:
17148+
description: |-
17149+
The secret containing the root CA certificate and key for
17150+
secure connections to the PostgreSQL server. It will need to contain the
17151+
CA TLS certificate and CA TLS key with the data keys set to
17152+
root.crt and root.key, respectively.
17153+
properties:
17154+
items:
17155+
description: |-
17156+
items if unspecified, each key-value pair in the Data field of the referenced
17157+
Secret will be projected into the volume as a file whose name is the
17158+
key and content is the value. If specified, the listed keys will be
17159+
projected into the specified paths, and unlisted keys will not be
17160+
present. If a key is specified which is not present in the Secret,
17161+
the volume setup will error unless it is marked optional. Paths must be
17162+
relative and may not contain the '..' path or start with '..'.
17163+
items:
17164+
description: Maps a string key to a path within a volume.
17165+
properties:
17166+
key:
17167+
description: key is the key to project.
17168+
type: string
17169+
mode:
17170+
description: |-
17171+
mode is Optional: mode bits used to set permissions on this file.
17172+
Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
17173+
YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
17174+
If not specified, the volume defaultMode will be used.
17175+
This might be in conflict with other options that affect the file
17176+
mode, like fsGroup, and the result can be other mode bits set.
17177+
format: int32
17178+
type: integer
17179+
path:
17180+
description: |-
17181+
path is the relative path of the file to map the key to.
17182+
May not be an absolute path.
17183+
May not contain the path element '..'.
17184+
May not start with the string '..'.
17185+
type: string
17186+
required:
17187+
- key
17188+
- path
17189+
type: object
17190+
type: array
17191+
x-kubernetes-list-type: atomic
17192+
name:
17193+
default: ""
17194+
description: |-
17195+
Name of the referent.
17196+
This field is effectively required, but due to backwards compatibility is
17197+
allowed to be empty. Instances of this type with an empty value here are
17198+
almost certainly wrong.
17199+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
17200+
type: string
17201+
optional:
17202+
description: optional field specify whether the Secret or
17203+
its key must be defined
17204+
type: boolean
17205+
type: object
17206+
x-kubernetes-map-type: atomic
1714717207
customTLSSecret:
1714817208
description: |-
1714917209
The secret containing the Certificates and Keys to encrypt PostgreSQL

config/crd/bases/pgv2.percona.com_perconapgclusters.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17549,6 +17549,66 @@ spec:
1754917549
type: boolean
1755017550
type: object
1755117551
x-kubernetes-map-type: atomic
17552+
customRootCATLSSecret:
17553+
description: |-
17554+
The secret containing the root CA certificate and key for
17555+
secure connections to the PostgreSQL server. It will need to contain the
17556+
CA TLS certificate and CA TLS key with the data keys set to
17557+
root.crt and root.key, respectively.
17558+
properties:
17559+
items:
17560+
description: |-
17561+
items if unspecified, each key-value pair in the Data field of the referenced
17562+
Secret will be projected into the volume as a file whose name is the
17563+
key and content is the value. If specified, the listed keys will be
17564+
projected into the specified paths, and unlisted keys will not be
17565+
present. If a key is specified which is not present in the Secret,
17566+
the volume setup will error unless it is marked optional. Paths must be
17567+
relative and may not contain the '..' path or start with '..'.
17568+
items:
17569+
description: Maps a string key to a path within a volume.
17570+
properties:
17571+
key:
17572+
description: key is the key to project.
17573+
type: string
17574+
mode:
17575+
description: |-
17576+
mode is Optional: mode bits used to set permissions on this file.
17577+
Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
17578+
YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
17579+
If not specified, the volume defaultMode will be used.
17580+
This might be in conflict with other options that affect the file
17581+
mode, like fsGroup, and the result can be other mode bits set.
17582+
format: int32
17583+
type: integer
17584+
path:
17585+
description: |-
17586+
path is the relative path of the file to map the key to.
17587+
May not be an absolute path.
17588+
May not contain the path element '..'.
17589+
May not start with the string '..'.
17590+
type: string
17591+
required:
17592+
- key
17593+
- path
17594+
type: object
17595+
type: array
17596+
x-kubernetes-list-type: atomic
17597+
name:
17598+
default: ""
17599+
description: |-
17600+
Name of the referent.
17601+
This field is effectively required, but due to backwards compatibility is
17602+
allowed to be empty. Instances of this type with an empty value here are
17603+
almost certainly wrong.
17604+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
17605+
type: string
17606+
optional:
17607+
description: optional field specify whether the Secret or
17608+
its key must be defined
17609+
type: boolean
17610+
type: object
17611+
x-kubernetes-map-type: atomic
1755217612
customTLSSecret:
1755317613
description: |-
1755417614
The secret containing the Certificates and Keys to encrypt PostgreSQL

config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5126,6 +5126,67 @@ spec:
51265126
type: boolean
51275127
type: object
51285128
x-kubernetes-map-type: atomic
5129+
customRootCATLSSecret:
5130+
description: |-
5131+
The secret containing the root CA certificate and key for
5132+
secure connections to the PostgreSQL server. It will need to contain the
5133+
CA TLS certificate and CA TLS key with the data keys set to
5134+
root.crt and root.key, respectively.
5135+
Part of K8SPG-553 ticket.
5136+
properties:
5137+
items:
5138+
description: |-
5139+
items if unspecified, each key-value pair in the Data field of the referenced
5140+
Secret will be projected into the volume as a file whose name is the
5141+
key and content is the value. If specified, the listed keys will be
5142+
projected into the specified paths, and unlisted keys will not be
5143+
present. If a key is specified which is not present in the Secret,
5144+
the volume setup will error unless it is marked optional. Paths must be
5145+
relative and may not contain the '..' path or start with '..'.
5146+
items:
5147+
description: Maps a string key to a path within a volume.
5148+
properties:
5149+
key:
5150+
description: key is the key to project.
5151+
type: string
5152+
mode:
5153+
description: |-
5154+
mode is Optional: mode bits used to set permissions on this file.
5155+
Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
5156+
YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
5157+
If not specified, the volume defaultMode will be used.
5158+
This might be in conflict with other options that affect the file
5159+
mode, like fsGroup, and the result can be other mode bits set.
5160+
format: int32
5161+
type: integer
5162+
path:
5163+
description: |-
5164+
path is the relative path of the file to map the key to.
5165+
May not be an absolute path.
5166+
May not contain the path element '..'.
5167+
May not start with the string '..'.
5168+
type: string
5169+
required:
5170+
- key
5171+
- path
5172+
type: object
5173+
type: array
5174+
x-kubernetes-list-type: atomic
5175+
name:
5176+
default: ""
5177+
description: |-
5178+
Name of the referent.
5179+
This field is effectively required, but due to backwards compatibility is
5180+
allowed to be empty. Instances of this type with an empty value here are
5181+
almost certainly wrong.
5182+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
5183+
type: string
5184+
optional:
5185+
description: optional field specify whether the Secret or its
5186+
key must be defined
5187+
type: boolean
5188+
type: object
5189+
x-kubernetes-map-type: atomic
51295190
customTLSSecret:
51305191
description: |-
51315192
The secret containing the Certificates and Keys to encrypt PostgreSQL

0 commit comments

Comments
 (0)