Skip to content

Commit b6af83d

Browse files
authored
Merge pull request #1 from CrunchyData/master
Catch fork up with upstream
2 parents 2cab55a + 613913d commit b6af83d

29 files changed

+818
-129
lines changed

bin/crunchy-postgres-exporter/start.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ sed -i \
239239
/tmp/queries.yml
240240

241241
PG_OPTIONS="--extend.query-path=${QUERY_DIR?}/queries.yml --web.listen-address=:${POSTGRES_EXPORTER_PORT}"
242+
if [[ -v WEB_CONFIG_DIR ]]; then
243+
# TODO (jmckulk): define path not dir
244+
PG_OPTIONS+=" --web.config.file=${WEB_CONFIG_DIR}/web-config.yml"
245+
fi
242246

243247
echo_info "Starting postgres-exporter.."
244248
DATA_SOURCE_URI="${EXPORTER_PG_HOST}:${EXPORTER_PG_PORT}/${EXPORTER_PG_DATABASE}?${EXPORTER_PG_PARAMS}" DATA_SOURCE_USER="${EXPORTER_PG_USER}" DATA_SOURCE_PASS="${EXPORTER_PG_PASSWORD}" ${PG_EXP_HOME?}/postgres_exporter ${PG_OPTIONS?} >>/dev/stdout 2>&1 &

build/crd/todos.yaml

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
- op: copy
5353
from: /work
5454
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/monitoring/properties/pgmonitor/properties/exporter/properties/configuration/items/properties/secret/properties/name/description
55+
- op: copy
56+
from: /work
57+
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/monitoring/properties/pgmonitor/properties/exporter/properties/customTLSSecret/properties/name/description
5558
- op: copy
5659
from: /work
5760
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/proxy/properties/pgBouncer/properties/config/properties/files/items/properties/configMap/properties/name/description
@@ -84,38 +87,3 @@
8487
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/userInterface/properties/pgAdmin/properties/config/properties/ldapBindPassword/properties/name/description
8588
- op: remove
8689
path: /work
87-
- op: add
88-
path: /work
89-
value: TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported
90-
- op: copy
91-
from: /work
92-
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/instances/items/properties/containers/items/properties/lifecycle/properties/postStart/properties/tcpSocket/description
93-
- op: copy
94-
from: /work
95-
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/instances/items/properties/containers/items/properties/lifecycle/properties/preStop/properties/tcpSocket/description
96-
- op: copy
97-
from: /work
98-
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/instances/items/properties/containers/items/properties/livenessProbe/properties/tcpSocket/description
99-
- op: copy
100-
from: /work
101-
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/instances/items/properties/containers/items/properties/readinessProbe/properties/tcpSocket/description
102-
- op: copy
103-
from: /work
104-
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/instances/items/properties/containers/items/properties/startupProbe/properties/tcpSocket/description
105-
- op: copy
106-
from: /work
107-
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/proxy/properties/pgBouncer/properties/containers/items/properties/lifecycle/properties/postStart/properties/tcpSocket/description
108-
- op: copy
109-
from: /work
110-
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/proxy/properties/pgBouncer/properties/containers/items/properties/lifecycle/properties/preStop/properties/tcpSocket/description
111-
- op: copy
112-
from: /work
113-
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/proxy/properties/pgBouncer/properties/containers/items/properties/livenessProbe/properties/tcpSocket/description
114-
- op: copy
115-
from: /work
116-
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/proxy/properties/pgBouncer/properties/containers/items/properties/readinessProbe/properties/tcpSocket/description
117-
- op: copy
118-
from: /work
119-
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/proxy/properties/pgBouncer/properties/containers/items/properties/startupProbe/properties/tcpSocket/description
120-
- op: remove
121-
path: /work

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

Lines changed: 84 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8193,8 +8193,11 @@ spec:
81938193
- port
81948194
type: object
81958195
tcpSocket:
8196-
description: TCPSocket specifies an action involving
8197-
a TCP port. TCP hooks not yet supported
8196+
description: Deprecated. TCPSocket is NOT supported
8197+
as a LifecycleHandler and kept for the backward
8198+
compatibility. There are no validation of this
8199+
field and lifecycle hooks will fail in runtime
8200+
when tcp handler is specified.
81988201
properties:
81998202
host:
82008203
description: 'Optional: Host name to connect
@@ -8293,8 +8296,11 @@ spec:
82938296
- port
82948297
type: object
82958298
tcpSocket:
8296-
description: TCPSocket specifies an action involving
8297-
a TCP port. TCP hooks not yet supported
8299+
description: Deprecated. TCPSocket is NOT supported
8300+
as a LifecycleHandler and kept for the backward
8301+
compatibility. There are no validation of this
8302+
field and lifecycle hooks will fail in runtime
8303+
when tcp handler is specified.
82988304
properties:
82998305
host:
83008306
description: 'Optional: Host name to connect
@@ -8427,7 +8433,7 @@ spec:
84278433
type: integer
84288434
tcpSocket:
84298435
description: TCPSocket specifies an action involving
8430-
a TCP port. TCP hooks not yet supported
8436+
a TCP port.
84318437
properties:
84328438
host:
84338439
description: 'Optional: Host name to connect to,
@@ -8637,7 +8643,7 @@ spec:
86378643
type: integer
86388644
tcpSocket:
86398645
description: TCPSocket specifies an action involving
8640-
a TCP port. TCP hooks not yet supported
8646+
a TCP port.
86418647
properties:
86428648
host:
86438649
description: 'Optional: Host name to connect to,
@@ -9008,7 +9014,7 @@ spec:
90089014
type: integer
90099015
tcpSocket:
90109016
description: TCPSocket specifies an action involving
9011-
a TCP port. TCP hooks not yet supported
9017+
a TCP port.
90129018
properties:
90139019
host:
90149020
description: 'Optional: Host name to connect to,
@@ -9839,10 +9845,10 @@ spec:
98399845
configuration:
98409846
description: 'Projected volumes containing custom PostgreSQL
98419847
Exporter configuration. Currently supports the customization
9842-
of PostgreSQL Exporter queries. If a "queries.yaml"
9843-
file is detected in any volume projected using this
9844-
field, it will be loaded using the "extend.query-path"
9845-
flag: https://github.com/prometheus-community/postgres_exporter#flags
9848+
of PostgreSQL Exporter queries. If a "queries.yml" file
9849+
is detected in any volume projected using this field,
9850+
it will be loaded using the "extend.query-path" flag:
9851+
https://github.com/prometheus-community/postgres_exporter#flags
98469852
Changing the values of field causes PostgreSQL and the
98479853
exporter to restart.'
98489854
items:
@@ -10085,6 +10091,60 @@ spec:
1008510091
type: object
1008610092
type: object
1008710093
type: array
10094+
customTLSSecret:
10095+
description: Projected secret containing custom TLS certificates
10096+
to encrypt output from the exporter web server
10097+
properties:
10098+
items:
10099+
description: items if unspecified, each key-value
10100+
pair in the Data field of the referenced Secret
10101+
will be projected into the volume as a file whose
10102+
name is the key and content is the value. If specified,
10103+
the listed keys will be projected into the specified
10104+
paths, and unlisted keys will not be present. If
10105+
a key is specified which is not present in the Secret,
10106+
the volume setup will error unless it is marked
10107+
optional. Paths must be relative and may not contain
10108+
the '..' path or start with '..'.
10109+
items:
10110+
description: Maps a string key to a path within
10111+
a volume.
10112+
properties:
10113+
key:
10114+
description: key is the key to project.
10115+
type: string
10116+
mode:
10117+
description: 'mode is Optional: mode bits used
10118+
to set permissions on this file. Must be an
10119+
octal value between 0000 and 0777 or a decimal
10120+
value between 0 and 511. YAML accepts both
10121+
octal and decimal values, JSON requires decimal
10122+
values for mode bits. If not specified, the
10123+
volume defaultMode will be used. This might
10124+
be in conflict with other options that affect
10125+
the file mode, like fsGroup, and the result
10126+
can be other mode bits set.'
10127+
format: int32
10128+
type: integer
10129+
path:
10130+
description: path is the relative path of the
10131+
file to map the key to. May not be an absolute
10132+
path. May not contain the path element '..'.
10133+
May not start with the string '..'.
10134+
type: string
10135+
required:
10136+
- key
10137+
- path
10138+
type: object
10139+
type: array
10140+
name:
10141+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
10142+
type: string
10143+
optional:
10144+
description: optional field specify whether the Secret
10145+
or its key must be defined
10146+
type: boolean
10147+
type: object
1008810148
image:
1008910149
description: The image name to use for crunchy-postgres-exporter
1009010150
containers. The image may also be set using the RELATED_IMAGE_PGEXPORTER
@@ -11670,8 +11730,11 @@ spec:
1167011730
- port
1167111731
type: object
1167211732
tcpSocket:
11673-
description: TCPSocket specifies an action involving
11674-
a TCP port. TCP hooks not yet supported
11733+
description: Deprecated. TCPSocket is NOT supported
11734+
as a LifecycleHandler and kept for the backward
11735+
compatibility. There are no validation of
11736+
this field and lifecycle hooks will fail in
11737+
runtime when tcp handler is specified.
1167511738
properties:
1167611739
host:
1167711740
description: 'Optional: Host name to connect
@@ -11771,8 +11834,11 @@ spec:
1177111834
- port
1177211835
type: object
1177311836
tcpSocket:
11774-
description: TCPSocket specifies an action involving
11775-
a TCP port. TCP hooks not yet supported
11837+
description: Deprecated. TCPSocket is NOT supported
11838+
as a LifecycleHandler and kept for the backward
11839+
compatibility. There are no validation of
11840+
this field and lifecycle hooks will fail in
11841+
runtime when tcp handler is specified.
1177611842
properties:
1177711843
host:
1177811844
description: 'Optional: Host name to connect
@@ -11906,7 +11972,7 @@ spec:
1190611972
type: integer
1190711973
tcpSocket:
1190811974
description: TCPSocket specifies an action involving
11909-
a TCP port. TCP hooks not yet supported
11975+
a TCP port.
1191011976
properties:
1191111977
host:
1191211978
description: 'Optional: Host name to connect
@@ -12118,7 +12184,7 @@ spec:
1211812184
type: integer
1211912185
tcpSocket:
1212012186
description: TCPSocket specifies an action involving
12121-
a TCP port. TCP hooks not yet supported
12187+
a TCP port.
1212212188
properties:
1212312189
host:
1212412190
description: 'Optional: Host name to connect
@@ -12496,7 +12562,7 @@ spec:
1249612562
type: integer
1249712563
tcpSocket:
1249812564
description: TCPSocket specifies an action involving
12499-
a TCP port. TCP hooks not yet supported
12565+
a TCP port.
1250012566
properties:
1250112567
host:
1250212568
description: 'Optional: Host name to connect

0 commit comments

Comments
 (0)