move to helm. S3 secret
This commit is contained in:
23
liquid-code-chart/.helmignore
Normal file
23
liquid-code-chart/.helmignore
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*.orig
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
||||||
|
.vscode/
|
||||||
24
liquid-code-chart/Chart.yaml
Normal file
24
liquid-code-chart/Chart.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: liquid-code-chart
|
||||||
|
description: A Helm chart for Kubernetes
|
||||||
|
|
||||||
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
|
#
|
||||||
|
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||||
|
# to be deployed.
|
||||||
|
#
|
||||||
|
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||||
|
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||||
|
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||||
|
type: application
|
||||||
|
|
||||||
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
|
# to the chart and its templates, including the app version.
|
||||||
|
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||||
|
version: 0.1.0
|
||||||
|
|
||||||
|
# This is the version number of the application being deployed. This version number should be
|
||||||
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
|
# It is recommended to use it with quotes.
|
||||||
|
appVersion: "1.16.0"
|
||||||
36
liquid-code-chart/charts/cloudnative-pg/Chart.yaml
Normal file
36
liquid-code-chart/charts/cloudnative-pg/Chart.yaml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
#
|
||||||
|
# Copyright The CloudNativePG Contributors
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
apiVersion: v2
|
||||||
|
name: cloudnative-pg
|
||||||
|
description: CloudNativePG Helm Chart
|
||||||
|
icon: https://raw.githubusercontent.com/cloudnative-pg/artwork/main/cloudnativepg-logo.svg
|
||||||
|
type: application
|
||||||
|
version: "0.20.1"
|
||||||
|
# This is the version number of the application being deployed. This version number should be
|
||||||
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
|
# follow Semantic Versioning, they should reflect the version the application is using.
|
||||||
|
# It is recommended to use it with quotes.
|
||||||
|
appVersion: "1.22.1"
|
||||||
|
sources:
|
||||||
|
- https://github.com/cloudnative-pg/charts
|
||||||
|
keywords:
|
||||||
|
- postgresql
|
||||||
|
- postgres
|
||||||
|
- database
|
||||||
|
home: https://cloudnative-pg.io
|
||||||
|
maintainers:
|
||||||
|
- name: phisco
|
||||||
|
email: p.scorsolini@gmail.com
|
||||||
202
liquid-code-chart/charts/cloudnative-pg/LICENSE
Normal file
202
liquid-code-chart/charts/cloudnative-pg/LICENSE
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
63
liquid-code-chart/charts/cloudnative-pg/README.md
Normal file
63
liquid-code-chart/charts/cloudnative-pg/README.md
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
18
liquid-code-chart/charts/cloudnative-pg/templates/NOTES.txt
Normal file
18
liquid-code-chart/charts/cloudnative-pg/templates/NOTES.txt
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
CloudNativePG operator should be installed in namespace "{{ .Release.Namespace }}".
|
||||||
|
You can now create a PostgreSQL cluster with 3 nodes in the current namespace as follows:
|
||||||
|
|
||||||
|
cat <<EOF | kubectl apply -f -
|
||||||
|
# Example of PostgreSQL cluster
|
||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Cluster
|
||||||
|
metadata:
|
||||||
|
name: cluster-example
|
||||||
|
spec:
|
||||||
|
instances: 3
|
||||||
|
storage:
|
||||||
|
size: 1Gi
|
||||||
|
EOF
|
||||||
|
|
||||||
|
kubectl get cluster
|
||||||
|
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "cloudnative-pg.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "cloudnative-pg.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride }}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||||
|
{{- if contains $name .Release.Name }}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "cloudnative-pg.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "cloudnative-pg.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "cloudnative-pg.chart" . }}
|
||||||
|
{{ include "cloudnative-pg.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "cloudnative-pg.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "cloudnative-pg.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "cloudnative-pg.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create }}
|
||||||
|
{{- default (include "cloudnative-pg.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else }}
|
||||||
|
{{- default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
#
|
||||||
|
# Copyright The CloudNativePG Contributors
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
{{- if .Values.config.create }}
|
||||||
|
{{- if not .Values.config.secret }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.config.name }}
|
||||||
|
labels:
|
||||||
|
{{- include "cloudnative-pg.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.commonAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
data:
|
||||||
|
{{- toYaml .Values.config.data | nindent 2 }}
|
||||||
|
{{- else }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
type: Opaque
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.config.name }}
|
||||||
|
labels:
|
||||||
|
{{- include "cloudnative-pg.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.commonAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
stringData:
|
||||||
|
{{- toYaml .Values.config.data | nindent 2 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
13421
liquid-code-chart/charts/cloudnative-pg/templates/crds/crds.yaml
Normal file
13421
liquid-code-chart/charts/cloudnative-pg/templates/crds/crds.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,138 @@
|
|||||||
|
#
|
||||||
|
# Copyright The CloudNativePG Contributors
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ include "cloudnative-pg.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "cloudnative-pg.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.commonAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "cloudnative-pg.selectorLabels" . | nindent 6 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }}
|
||||||
|
{{- with .Values.podAnnotations }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- include "cloudnative-pg.selectorLabels" . | nindent 8 }}
|
||||||
|
{{- with .Values.podLabels }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- controller
|
||||||
|
- --leader-elect
|
||||||
|
{{- if .Values.config.name }}
|
||||||
|
{{- if not .Values.config.secret }}
|
||||||
|
- --config-map-name={{ .Values.config.name }}
|
||||||
|
{{- else }}
|
||||||
|
- --secret-name={{ .Values.config.name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
- --webhook-port={{ .Values.webhook.port }}
|
||||||
|
{{- range .Values.additionalArgs }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
command:
|
||||||
|
- /manager
|
||||||
|
env:
|
||||||
|
- name: OPERATOR_IMAGE_NAME
|
||||||
|
value: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||||
|
- name: OPERATOR_NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
- name: MONITORING_QUERIES_CONFIGMAP
|
||||||
|
value: "{{ .Values.monitoringQueriesConfigMap.name }}"
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /readyz
|
||||||
|
port: {{ .Values.webhook.port }}
|
||||||
|
scheme: HTTPS
|
||||||
|
{{- if .Values.webhook.livenessProbe.initialDelaySeconds }}
|
||||||
|
initialDelaySeconds: {{ .Values.webhook.livenessProbe.initialDelaySeconds }}
|
||||||
|
{{- end }}
|
||||||
|
name: manager
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
name: metrics
|
||||||
|
protocol: TCP
|
||||||
|
- containerPort: {{ .Values.webhook.port }}
|
||||||
|
name: webhook-server
|
||||||
|
protocol: TCP
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /readyz
|
||||||
|
port: {{ .Values.webhook.port }}
|
||||||
|
scheme: HTTPS
|
||||||
|
{{- if .Values.webhook.readinessProbe.initialDelaySeconds }}
|
||||||
|
initialDelaySeconds: {{ .Values.webhook.readinessProbe.initialDelaySeconds }}
|
||||||
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.resources | nindent 10 }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.containerSecurityContext | nindent 10 }}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /controller
|
||||||
|
name: scratch-data
|
||||||
|
- mountPath: /run/secrets/cnpg.io/webhook
|
||||||
|
name: webhook-certificates
|
||||||
|
{{- if .Values.priorityClassName }}
|
||||||
|
priorityClassName: {{ .Values.priorityClassName }}
|
||||||
|
{{- end }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
serviceAccountName: {{ include "cloudnative-pg.serviceAccountName" . }}
|
||||||
|
terminationGracePeriodSeconds: 10
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- emptyDir: {}
|
||||||
|
name: scratch-data
|
||||||
|
- name: webhook-certificates
|
||||||
|
secret:
|
||||||
|
defaultMode: 420
|
||||||
|
optional: true
|
||||||
|
secretName: cnpg-webhook-cert
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{{- if .Values.monitoring.grafanaDashboard.create -}}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.monitoring.grafanaDashboard.configMapName }}
|
||||||
|
namespace: {{ default .Release.Namespace .Values.monitoring.grafanaDashboard.namespace }}
|
||||||
|
labels:
|
||||||
|
{{ .Values.monitoring.grafanaDashboard.sidecarLabel }}: {{ .Values.monitoring.grafanaDashboard.sidecarLabelValue | quote }}
|
||||||
|
data:
|
||||||
|
cnp.json: |-
|
||||||
|
{{ .Files.Get "monitoring/grafana-dashboard.json" | indent 6 }}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#
|
||||||
|
# Copyright The CloudNativePG Contributors
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.monitoringQueriesConfigMap.name }}
|
||||||
|
labels:
|
||||||
|
{{- include "cloudnative-pg.labels" . | nindent 4 }}
|
||||||
|
cnpg.io/reload: ""
|
||||||
|
{{- with .Values.commonAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
data:
|
||||||
|
queries: {{- toYaml .Values.monitoringQueriesConfigMap.queries | nindent 4 }}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
#
|
||||||
|
# Copyright The CloudNativePG Contributors
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
{{- if .Values.webhook.mutating.create }}
|
||||||
|
---
|
||||||
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
|
kind: MutatingWebhookConfiguration
|
||||||
|
metadata:
|
||||||
|
name: cnpg-mutating-webhook-configuration
|
||||||
|
{{- with .Values.commonAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- include "cloudnative-pg.labels" . | nindent 4 }}
|
||||||
|
webhooks:
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
clientConfig:
|
||||||
|
service:
|
||||||
|
name: {{ .Values.service.name }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
path: /mutate-postgresql-cnpg-io-v1-backup
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
failurePolicy: {{ .Values.webhook.mutating.failurePolicy }}
|
||||||
|
name: mbackup.cnpg.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
apiVersions:
|
||||||
|
- v1
|
||||||
|
operations:
|
||||||
|
- CREATE
|
||||||
|
- UPDATE
|
||||||
|
resources:
|
||||||
|
- backups
|
||||||
|
sideEffects: None
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
clientConfig:
|
||||||
|
service:
|
||||||
|
name: {{ .Values.service.name }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
path: /mutate-postgresql-cnpg-io-v1-cluster
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
failurePolicy: {{ .Values.webhook.mutating.failurePolicy }}
|
||||||
|
name: mcluster.cnpg.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
apiVersions:
|
||||||
|
- v1
|
||||||
|
operations:
|
||||||
|
- CREATE
|
||||||
|
- UPDATE
|
||||||
|
resources:
|
||||||
|
- clusters
|
||||||
|
sideEffects: None
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
clientConfig:
|
||||||
|
service:
|
||||||
|
name: {{ .Values.service.name }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
path: /mutate-postgresql-cnpg-io-v1-scheduledbackup
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
failurePolicy: {{ .Values.webhook.mutating.failurePolicy }}
|
||||||
|
name: mscheduledbackup.cnpg.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
apiVersions:
|
||||||
|
- v1
|
||||||
|
operations:
|
||||||
|
- CREATE
|
||||||
|
- UPDATE
|
||||||
|
resources:
|
||||||
|
- scheduledbackups
|
||||||
|
sideEffects: None
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{{- if .Values.monitoring.podMonitorEnabled }}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: PodMonitor
|
||||||
|
metadata:
|
||||||
|
name: {{ include "cloudnative-pg.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "cloudnative-pg.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.commonAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "cloudnative-pg.selectorLabels" . | nindent 6 }}
|
||||||
|
podMetricsEndpoints:
|
||||||
|
- port: metrics
|
||||||
|
{{- end }}
|
||||||
443
liquid-code-chart/charts/cloudnative-pg/templates/rbac.yaml
Normal file
443
liquid-code-chart/charts/cloudnative-pg/templates/rbac.yaml
Normal file
@@ -0,0 +1,443 @@
|
|||||||
|
#
|
||||||
|
# Copyright The CloudNativePG Contributors
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
{{- if .Values.serviceAccount.create }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ include "cloudnative-pg.serviceAccountName" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "cloudnative-pg.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.commonAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.rbac.create }}
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: {{ include "cloudnative-pg.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "cloudnative-pg.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.commonAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- configmaps
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- configmaps/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- events
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- patch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- namespaces
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- nodes
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- persistentvolumeclaims
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods/exec
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- secrets
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- secrets/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- serviceaccounts
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- services
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- admissionregistration.k8s.io
|
||||||
|
resources:
|
||||||
|
- mutatingwebhookconfigurations
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- admissionregistration.k8s.io
|
||||||
|
resources:
|
||||||
|
- validatingwebhookconfigurations
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- apiextensions.k8s.io
|
||||||
|
resources:
|
||||||
|
- customresourcedefinitions
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- batch
|
||||||
|
resources:
|
||||||
|
- jobs
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- coordination.k8s.io
|
||||||
|
resources:
|
||||||
|
- leases
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- monitoring.coreos.com
|
||||||
|
resources:
|
||||||
|
- podmonitors
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- policy
|
||||||
|
resources:
|
||||||
|
- poddisruptionbudgets
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
resources:
|
||||||
|
- backups
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
resources:
|
||||||
|
- backups/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
resources:
|
||||||
|
- clusters
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
resources:
|
||||||
|
- clusters/finalizers
|
||||||
|
verbs:
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
resources:
|
||||||
|
- clusters/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
resources:
|
||||||
|
- poolers
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
resources:
|
||||||
|
- poolers/finalizers
|
||||||
|
verbs:
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
resources:
|
||||||
|
- poolers/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
resources:
|
||||||
|
- scheduledbackups
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
resources:
|
||||||
|
- scheduledbackups/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- rbac.authorization.k8s.io
|
||||||
|
resources:
|
||||||
|
- rolebindings
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- rbac.authorization.k8s.io
|
||||||
|
resources:
|
||||||
|
- roles
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- snapshot.storage.k8s.io
|
||||||
|
resources:
|
||||||
|
- volumesnapshots
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- watch
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ include "cloudnative-pg.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "cloudnative-pg.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.commonAnnotations.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: {{ include "cloudnative-pg.fullname" . }}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ include "cloudnative-pg.serviceAccountName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: {{ include "cloudnative-pg.fullname" . }}-view
|
||||||
|
labels:
|
||||||
|
{{- include "cloudnative-pg.labels" . | nindent 4 }}
|
||||||
|
{{- if .Values.rbac.aggregateClusterRoles }}
|
||||||
|
rbac.authorization.k8s.io/aggregate-to-view: "true"
|
||||||
|
rbac.authorization.k8s.io/aggregate-to-edit: "true"
|
||||||
|
rbac.authorization.k8s.io/aggregate-to-admin: "true"
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
resources:
|
||||||
|
- backups
|
||||||
|
- clusters
|
||||||
|
- poolers
|
||||||
|
- scheduledbackups
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: {{ include "cloudnative-pg.fullname" . }}-edit
|
||||||
|
labels:
|
||||||
|
{{- include "cloudnative-pg.labels" . | nindent 4 }}
|
||||||
|
{{- if .Values.rbac.aggregateClusterRoles }}
|
||||||
|
rbac.authorization.k8s.io/aggregate-to-edit: "true"
|
||||||
|
rbac.authorization.k8s.io/aggregate-to-admin: "true"
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
resources:
|
||||||
|
- backups
|
||||||
|
- clusters
|
||||||
|
- poolers
|
||||||
|
- scheduledbackups
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
---
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
#
|
||||||
|
# Copyright The CloudNativePG Contributors
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.service.name }}
|
||||||
|
labels:
|
||||||
|
{{- include "cloudnative-pg.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.commonAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.service.port }}
|
||||||
|
targetPort: webhook-server
|
||||||
|
name: webhook-server
|
||||||
|
selector:
|
||||||
|
{{- include "cloudnative-pg.selectorLabels" . | nindent 4 }}
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
#
|
||||||
|
# Copyright The CloudNativePG Contributors
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
{{- if .Values.webhook.validating.create }}
|
||||||
|
---
|
||||||
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
|
kind: ValidatingWebhookConfiguration
|
||||||
|
metadata:
|
||||||
|
name: cnpg-validating-webhook-configuration
|
||||||
|
labels:
|
||||||
|
{{- include "cloudnative-pg.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.rbac.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
webhooks:
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
clientConfig:
|
||||||
|
service:
|
||||||
|
name: {{ .Values.service.name }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
path: /validate-postgresql-cnpg-io-v1-backup
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
failurePolicy: {{ .Values.webhook.validating.failurePolicy }}
|
||||||
|
name: vbackup.cnpg.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
apiVersions:
|
||||||
|
- v1
|
||||||
|
operations:
|
||||||
|
- CREATE
|
||||||
|
- UPDATE
|
||||||
|
resources:
|
||||||
|
- backups
|
||||||
|
sideEffects: None
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
clientConfig:
|
||||||
|
service:
|
||||||
|
name: {{ .Values.service.name }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
path: /validate-postgresql-cnpg-io-v1-cluster
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
failurePolicy: {{ .Values.webhook.validating.failurePolicy }}
|
||||||
|
name: vcluster.cnpg.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
apiVersions:
|
||||||
|
- v1
|
||||||
|
operations:
|
||||||
|
- CREATE
|
||||||
|
- UPDATE
|
||||||
|
resources:
|
||||||
|
- clusters
|
||||||
|
sideEffects: None
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
clientConfig:
|
||||||
|
service:
|
||||||
|
name: {{ .Values.service.name }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
path: /validate-postgresql-cnpg-io-v1-scheduledbackup
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
failurePolicy: {{ .Values.webhook.validating.failurePolicy }}
|
||||||
|
name: vscheduledbackup.cnpg.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
apiVersions:
|
||||||
|
- v1
|
||||||
|
operations:
|
||||||
|
- CREATE
|
||||||
|
- UPDATE
|
||||||
|
resources:
|
||||||
|
- scheduledbackups
|
||||||
|
sideEffects: None
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
clientConfig:
|
||||||
|
service:
|
||||||
|
name: {{ .Values.service.name }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
path: /validate-postgresql-cnpg-io-v1-pooler
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
failurePolicy: {{ .Values.webhook.validating.failurePolicy }}
|
||||||
|
name: vpooler.cnpg.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- postgresql.cnpg.io
|
||||||
|
apiVersions:
|
||||||
|
- v1
|
||||||
|
operations:
|
||||||
|
- CREATE
|
||||||
|
- UPDATE
|
||||||
|
resources:
|
||||||
|
- poolers
|
||||||
|
sideEffects: None
|
||||||
|
{{- end }}
|
||||||
257
liquid-code-chart/charts/cloudnative-pg/values.schema.json
Normal file
257
liquid-code-chart/charts/cloudnative-pg/values.schema.json
Normal file
@@ -0,0 +1,257 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/schema#",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"additionalArgs": {
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
"affinity": {
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"commonAnnotations": {
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"create": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"secret": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"containerSecurityContext": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"allowPrivilegeEscalation": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"capabilities": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"drop": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"readOnlyRootFilesystem": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"runAsGroup": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"runAsUser": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"seccompProfile": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"crds": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"create": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fullnameOverride": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"image": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"pullPolicy": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tag": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"imagePullSecrets": {
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
"monitoring": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"grafanaDashboard": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"configMapName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"create": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"namespace": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"sidecarLabel": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"sidecarLabelValue": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"podMonitorEnabled": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"monitoringQueriesConfigMap": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"queries": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nameOverride": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"nodeSelector": {
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"podAnnotations": {
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"podLabels": {
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"podSecurityContext": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"runAsNonRoot": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"seccompProfile": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"priorityClassName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"rbac": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"aggregateClusterRoles": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"create": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"replicaCount": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"resources": {
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"service": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"port": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"serviceAccount": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"create": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tolerations": {
|
||||||
|
"type": "array"
|
||||||
|
},
|
||||||
|
"webhook": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"livenessProbe": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"initialDelaySeconds": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mutating": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"create": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"failurePolicy": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"port": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"readinessProbe": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"initialDelaySeconds": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"validating": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"create": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"failurePolicy": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
538
liquid-code-chart/charts/cloudnative-pg/values.yaml
Normal file
538
liquid-code-chart/charts/cloudnative-pg/values.yaml
Normal file
@@ -0,0 +1,538 @@
|
|||||||
|
#
|
||||||
|
# Copyright The CloudNativePG Contributors
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
# Default values for CloudNativePG.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Please declare variables to be passed to your templates.
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/cloudnative-pg/cloudnative-pg
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
# -- Overrides the image tag whose default is the chart appVersion.
|
||||||
|
tag: ""
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
crds:
|
||||||
|
# -- Specifies whether the CRDs should be created when installing the chart.
|
||||||
|
create: true
|
||||||
|
|
||||||
|
# -- The webhook configuration.
|
||||||
|
webhook:
|
||||||
|
port: 9443
|
||||||
|
mutating:
|
||||||
|
create: true
|
||||||
|
failurePolicy: Fail
|
||||||
|
validating:
|
||||||
|
create: true
|
||||||
|
failurePolicy: Fail
|
||||||
|
livenessProbe:
|
||||||
|
initialDelaySeconds: 3
|
||||||
|
readinessProbe:
|
||||||
|
initialDelaySeconds: 3
|
||||||
|
|
||||||
|
# -- Operator configuration.
|
||||||
|
config:
|
||||||
|
# -- Specifies whether the secret should be created.
|
||||||
|
create: true
|
||||||
|
# -- The name of the configmap/secret to use.
|
||||||
|
name: cnpg-controller-manager-config
|
||||||
|
# -- Specifies whether it should be stored in a secret, instead of a configmap.
|
||||||
|
secret: false
|
||||||
|
# -- The content of the configmap/secret, see
|
||||||
|
# https://cloudnative-pg.io/documentation/current/operator_conf/#available-options
|
||||||
|
# for all the available options.
|
||||||
|
data: {}
|
||||||
|
# INHERITED_ANNOTATIONS: categories
|
||||||
|
# INHERITED_LABELS: environment, workload, app
|
||||||
|
# WATCH_NAMESPACE: namespace-a,namespace-b
|
||||||
|
|
||||||
|
# -- Additinal arguments to be added to the operator's args list.
|
||||||
|
additionalArgs: []
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# -- Specifies whether the service account should be created.
|
||||||
|
create: true
|
||||||
|
# -- The name of the service account to use.
|
||||||
|
# If not set and create is true, a name is generated using the fullname template.
|
||||||
|
name: ""
|
||||||
|
|
||||||
|
rbac:
|
||||||
|
# -- Specifies whether ClusterRole and ClusterRoleBinding should be created.
|
||||||
|
create: true
|
||||||
|
# -- Aggregate ClusterRoles to Kubernetes default user-facing roles.
|
||||||
|
# Ref: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
|
||||||
|
aggregateClusterRoles: false
|
||||||
|
|
||||||
|
# -- Annotations to be added to all other resources.
|
||||||
|
commonAnnotations: {}
|
||||||
|
# -- Annotations to be added to the pod.
|
||||||
|
podAnnotations: {}
|
||||||
|
# -- Labels to be added to the pod.
|
||||||
|
podLabels: {}
|
||||||
|
|
||||||
|
# -- Container Security Context.
|
||||||
|
containerSecurityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
runAsUser: 10001
|
||||||
|
runAsGroup: 10001
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- "ALL"
|
||||||
|
|
||||||
|
# -- Security Context for the whole pod.
|
||||||
|
podSecurityContext:
|
||||||
|
runAsNonRoot: true
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
# fsGroup: 2000
|
||||||
|
|
||||||
|
# -- Priority indicates the importance of a Pod relative to other Pods.
|
||||||
|
priorityClassName: ""
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
# -- DO NOT CHANGE THE SERVICE NAME as it is currently used to generate the certificate
|
||||||
|
# and can not be configured
|
||||||
|
name: cnpg-webhook-service
|
||||||
|
port: 443
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
# If you want to specify resources, uncomment the following
|
||||||
|
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||||
|
#
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 200Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 100Mi
|
||||||
|
|
||||||
|
# -- Nodeselector for the operator to be installed.
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
# -- Tolerations for the operator to be installed.
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
# -- Affinity for the operator to be installed.
|
||||||
|
affinity: {}
|
||||||
|
|
||||||
|
monitoring:
|
||||||
|
# -- Specifies whether the monitoring should be enabled. Requires Prometheus Operator CRDs.
|
||||||
|
podMonitorEnabled: false
|
||||||
|
grafanaDashboard:
|
||||||
|
create: false
|
||||||
|
# -- Allows overriding the namespace where the ConfigMap will be created, defaulting to the same one as the Release.
|
||||||
|
namespace: ""
|
||||||
|
# -- The name of the ConfigMap containing the dashboard.
|
||||||
|
configMapName: "cnpg-grafana-dashboard"
|
||||||
|
# -- Label that ConfigMaps should have to be loaded as dashboards.
|
||||||
|
sidecarLabel: "grafana_dashboard"
|
||||||
|
# -- Label value that ConfigMaps should have to be loaded as dashboards.
|
||||||
|
sidecarLabelValue: ""
|
||||||
|
|
||||||
|
# Default monitoring queries
|
||||||
|
monitoringQueriesConfigMap:
|
||||||
|
# -- The name of the default monitoring configmap.
|
||||||
|
name: cnpg-default-monitoring
|
||||||
|
# -- A string representation of a YAML defining monitoring queries.
|
||||||
|
queries: |
|
||||||
|
backends:
|
||||||
|
query: |
|
||||||
|
SELECT sa.datname
|
||||||
|
, sa.usename
|
||||||
|
, sa.application_name
|
||||||
|
, states.state
|
||||||
|
, COALESCE(sa.count, 0) AS total
|
||||||
|
, COALESCE(sa.max_tx_secs, 0) AS max_tx_duration_seconds
|
||||||
|
FROM ( VALUES ('active')
|
||||||
|
, ('idle')
|
||||||
|
, ('idle in transaction')
|
||||||
|
, ('idle in transaction (aborted)')
|
||||||
|
, ('fastpath function call')
|
||||||
|
, ('disabled')
|
||||||
|
) AS states(state)
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT datname
|
||||||
|
, state
|
||||||
|
, usename
|
||||||
|
, COALESCE(application_name, '') AS application_name
|
||||||
|
, COUNT(*)
|
||||||
|
, COALESCE(EXTRACT (EPOCH FROM (max(now() - xact_start))), 0) AS max_tx_secs
|
||||||
|
FROM pg_catalog.pg_stat_activity
|
||||||
|
GROUP BY datname, state, usename, application_name
|
||||||
|
) sa ON states.state = sa.state
|
||||||
|
WHERE sa.usename IS NOT NULL
|
||||||
|
metrics:
|
||||||
|
- datname:
|
||||||
|
usage: "LABEL"
|
||||||
|
description: "Name of the database"
|
||||||
|
- usename:
|
||||||
|
usage: "LABEL"
|
||||||
|
description: "Name of the user"
|
||||||
|
- application_name:
|
||||||
|
usage: "LABEL"
|
||||||
|
description: "Name of the application"
|
||||||
|
- state:
|
||||||
|
usage: "LABEL"
|
||||||
|
description: "State of the backend"
|
||||||
|
- total:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Number of backends"
|
||||||
|
- max_tx_duration_seconds:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Maximum duration of a transaction in seconds"
|
||||||
|
|
||||||
|
backends_waiting:
|
||||||
|
query: |
|
||||||
|
SELECT count(*) AS total
|
||||||
|
FROM pg_catalog.pg_locks blocked_locks
|
||||||
|
JOIN pg_catalog.pg_locks blocking_locks
|
||||||
|
ON blocking_locks.locktype = blocked_locks.locktype
|
||||||
|
AND blocking_locks.database IS NOT DISTINCT FROM blocked_locks.database
|
||||||
|
AND blocking_locks.relation IS NOT DISTINCT FROM blocked_locks.relation
|
||||||
|
AND blocking_locks.page IS NOT DISTINCT FROM blocked_locks.page
|
||||||
|
AND blocking_locks.tuple IS NOT DISTINCT FROM blocked_locks.tuple
|
||||||
|
AND blocking_locks.virtualxid IS NOT DISTINCT FROM blocked_locks.virtualxid
|
||||||
|
AND blocking_locks.transactionid IS NOT DISTINCT FROM blocked_locks.transactionid
|
||||||
|
AND blocking_locks.classid IS NOT DISTINCT FROM blocked_locks.classid
|
||||||
|
AND blocking_locks.objid IS NOT DISTINCT FROM blocked_locks.objid
|
||||||
|
AND blocking_locks.objsubid IS NOT DISTINCT FROM blocked_locks.objsubid
|
||||||
|
AND blocking_locks.pid != blocked_locks.pid
|
||||||
|
JOIN pg_catalog.pg_stat_activity blocking_activity ON blocking_activity.pid = blocking_locks.pid
|
||||||
|
WHERE NOT blocked_locks.granted
|
||||||
|
metrics:
|
||||||
|
- total:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Total number of backends that are currently waiting on other queries"
|
||||||
|
|
||||||
|
pg_database:
|
||||||
|
query: |
|
||||||
|
SELECT datname
|
||||||
|
, pg_catalog.pg_database_size(datname) AS size_bytes
|
||||||
|
, pg_catalog.age(datfrozenxid) AS xid_age
|
||||||
|
, pg_catalog.mxid_age(datminmxid) AS mxid_age
|
||||||
|
FROM pg_catalog.pg_database
|
||||||
|
metrics:
|
||||||
|
- datname:
|
||||||
|
usage: "LABEL"
|
||||||
|
description: "Name of the database"
|
||||||
|
- size_bytes:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Disk space used by the database"
|
||||||
|
- xid_age:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Number of transactions from the frozen XID to the current one"
|
||||||
|
- mxid_age:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Number of multiple transactions (Multixact) from the frozen XID to the current one"
|
||||||
|
|
||||||
|
pg_postmaster:
|
||||||
|
query: |
|
||||||
|
SELECT EXTRACT(EPOCH FROM pg_postmaster_start_time) AS start_time
|
||||||
|
FROM pg_catalog.pg_postmaster_start_time()
|
||||||
|
metrics:
|
||||||
|
- start_time:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Time at which postgres started (based on epoch)"
|
||||||
|
|
||||||
|
pg_replication:
|
||||||
|
query: "SELECT CASE WHEN (
|
||||||
|
NOT pg_catalog.pg_is_in_recovery()
|
||||||
|
OR pg_catalog.pg_last_wal_receive_lsn() = pg_catalog.pg_last_wal_replay_lsn())
|
||||||
|
THEN 0
|
||||||
|
ELSE GREATEST (0,
|
||||||
|
EXTRACT(EPOCH FROM (now() - pg_catalog.pg_last_xact_replay_timestamp())))
|
||||||
|
END AS lag,
|
||||||
|
pg_catalog.pg_is_in_recovery() AS in_recovery,
|
||||||
|
EXISTS (TABLE pg_stat_wal_receiver) AS is_wal_receiver_up,
|
||||||
|
(SELECT count(*) FROM pg_catalog.pg_stat_replication) AS streaming_replicas"
|
||||||
|
metrics:
|
||||||
|
- lag:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Replication lag behind primary in seconds"
|
||||||
|
- in_recovery:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Whether the instance is in recovery"
|
||||||
|
- is_wal_receiver_up:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Whether the instance wal_receiver is up"
|
||||||
|
- streaming_replicas:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Number of streaming replicas connected to the instance"
|
||||||
|
|
||||||
|
pg_replication_slots:
|
||||||
|
query: |
|
||||||
|
SELECT slot_name,
|
||||||
|
slot_type,
|
||||||
|
database,
|
||||||
|
active,
|
||||||
|
(CASE pg_catalog.pg_is_in_recovery()
|
||||||
|
WHEN TRUE THEN pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_last_wal_receive_lsn(), restart_lsn)
|
||||||
|
ELSE pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_current_wal_lsn(), restart_lsn)
|
||||||
|
END) as pg_wal_lsn_diff
|
||||||
|
FROM pg_catalog.pg_replication_slots
|
||||||
|
WHERE NOT temporary
|
||||||
|
metrics:
|
||||||
|
- slot_name:
|
||||||
|
usage: "LABEL"
|
||||||
|
description: "Name of the replication slot"
|
||||||
|
- slot_type:
|
||||||
|
usage: "LABEL"
|
||||||
|
description: "Type of the replication slot"
|
||||||
|
- database:
|
||||||
|
usage: "LABEL"
|
||||||
|
description: "Name of the database"
|
||||||
|
- active:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Flag indicating whether the slot is active"
|
||||||
|
- pg_wal_lsn_diff:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Replication lag in bytes"
|
||||||
|
|
||||||
|
pg_stat_archiver:
|
||||||
|
query: |
|
||||||
|
SELECT archived_count
|
||||||
|
, failed_count
|
||||||
|
, COALESCE(EXTRACT(EPOCH FROM (now() - last_archived_time)), -1) AS seconds_since_last_archival
|
||||||
|
, COALESCE(EXTRACT(EPOCH FROM (now() - last_failed_time)), -1) AS seconds_since_last_failure
|
||||||
|
, COALESCE(EXTRACT(EPOCH FROM last_archived_time), -1) AS last_archived_time
|
||||||
|
, COALESCE(EXTRACT(EPOCH FROM last_failed_time), -1) AS last_failed_time
|
||||||
|
, COALESCE(CAST(CAST('x'||pg_catalog.right(pg_catalog.split_part(last_archived_wal, '.', 1), 16) AS pg_catalog.bit(64)) AS pg_catalog.int8), -1) AS last_archived_wal_start_lsn
|
||||||
|
, COALESCE(CAST(CAST('x'||pg_catalog.right(pg_catalog.split_part(last_failed_wal, '.', 1), 16) AS pg_catalog.bit(64)) AS pg_catalog.int8), -1) AS last_failed_wal_start_lsn
|
||||||
|
, EXTRACT(EPOCH FROM stats_reset) AS stats_reset_time
|
||||||
|
FROM pg_catalog.pg_stat_archiver
|
||||||
|
metrics:
|
||||||
|
- archived_count:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of WAL files that have been successfully archived"
|
||||||
|
- failed_count:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of failed attempts for archiving WAL files"
|
||||||
|
- seconds_since_last_archival:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Seconds since the last successful archival operation"
|
||||||
|
- seconds_since_last_failure:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Seconds since the last failed archival operation"
|
||||||
|
- last_archived_time:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Epoch of the last time WAL archiving succeeded"
|
||||||
|
- last_failed_time:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Epoch of the last time WAL archiving failed"
|
||||||
|
- last_archived_wal_start_lsn:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Archived WAL start LSN"
|
||||||
|
- last_failed_wal_start_lsn:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Last failed WAL LSN"
|
||||||
|
- stats_reset_time:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Time at which these statistics were last reset"
|
||||||
|
|
||||||
|
pg_stat_bgwriter:
|
||||||
|
query: |
|
||||||
|
SELECT checkpoints_timed
|
||||||
|
, checkpoints_req
|
||||||
|
, checkpoint_write_time
|
||||||
|
, checkpoint_sync_time
|
||||||
|
, buffers_checkpoint
|
||||||
|
, buffers_clean
|
||||||
|
, maxwritten_clean
|
||||||
|
, buffers_backend
|
||||||
|
, buffers_backend_fsync
|
||||||
|
, buffers_alloc
|
||||||
|
FROM pg_catalog.pg_stat_bgwriter
|
||||||
|
metrics:
|
||||||
|
- checkpoints_timed:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of scheduled checkpoints that have been performed"
|
||||||
|
- checkpoints_req:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of requested checkpoints that have been performed"
|
||||||
|
- checkpoint_write_time:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Total amount of time that has been spent in the portion of checkpoint processing where files are written to disk, in milliseconds"
|
||||||
|
- checkpoint_sync_time:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Total amount of time that has been spent in the portion of checkpoint processing where files are synchronized to disk, in milliseconds"
|
||||||
|
- buffers_checkpoint:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of buffers written during checkpoints"
|
||||||
|
- buffers_clean:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of buffers written by the background writer"
|
||||||
|
- maxwritten_clean:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of times the background writer stopped a cleaning scan because it had written too many buffers"
|
||||||
|
- buffers_backend:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of buffers written directly by a backend"
|
||||||
|
- buffers_backend_fsync:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of times a backend had to execute its own fsync call (normally the background writer handles those even when the backend does its own write)"
|
||||||
|
- buffers_alloc:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of buffers allocated"
|
||||||
|
|
||||||
|
pg_stat_database:
|
||||||
|
query: |
|
||||||
|
SELECT datname
|
||||||
|
, xact_commit
|
||||||
|
, xact_rollback
|
||||||
|
, blks_read
|
||||||
|
, blks_hit
|
||||||
|
, tup_returned
|
||||||
|
, tup_fetched
|
||||||
|
, tup_inserted
|
||||||
|
, tup_updated
|
||||||
|
, tup_deleted
|
||||||
|
, conflicts
|
||||||
|
, temp_files
|
||||||
|
, temp_bytes
|
||||||
|
, deadlocks
|
||||||
|
, blk_read_time
|
||||||
|
, blk_write_time
|
||||||
|
FROM pg_catalog.pg_stat_database
|
||||||
|
metrics:
|
||||||
|
- datname:
|
||||||
|
usage: "LABEL"
|
||||||
|
description: "Name of this database"
|
||||||
|
- xact_commit:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of transactions in this database that have been committed"
|
||||||
|
- xact_rollback:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of transactions in this database that have been rolled back"
|
||||||
|
- blks_read:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of disk blocks read in this database"
|
||||||
|
- blks_hit:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of times disk blocks were found already in the buffer cache, so that a read was not necessary (this only includes hits in the PostgreSQL buffer cache, not the operating system's file system cache)"
|
||||||
|
- tup_returned:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of rows returned by queries in this database"
|
||||||
|
- tup_fetched:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of rows fetched by queries in this database"
|
||||||
|
- tup_inserted:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of rows inserted by queries in this database"
|
||||||
|
- tup_updated:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of rows updated by queries in this database"
|
||||||
|
- tup_deleted:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of rows deleted by queries in this database"
|
||||||
|
- conflicts:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of queries canceled due to conflicts with recovery in this database"
|
||||||
|
- temp_files:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of temporary files created by queries in this database"
|
||||||
|
- temp_bytes:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Total amount of data written to temporary files by queries in this database"
|
||||||
|
- deadlocks:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Number of deadlocks detected in this database"
|
||||||
|
- blk_read_time:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Time spent reading data file blocks by backends in this database, in milliseconds"
|
||||||
|
- blk_write_time:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Time spent writing data file blocks by backends in this database, in milliseconds"
|
||||||
|
|
||||||
|
pg_stat_replication:
|
||||||
|
primary: true
|
||||||
|
query: |
|
||||||
|
SELECT usename
|
||||||
|
, COALESCE(application_name, '') AS application_name
|
||||||
|
, COALESCE(client_addr::text, '') AS client_addr
|
||||||
|
, COALESCE(client_port::text, '') AS client_port
|
||||||
|
, EXTRACT(EPOCH FROM backend_start) AS backend_start
|
||||||
|
, COALESCE(pg_catalog.age(backend_xmin), 0) AS backend_xmin_age
|
||||||
|
, pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_current_wal_lsn(), sent_lsn) AS sent_diff_bytes
|
||||||
|
, pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_current_wal_lsn(), write_lsn) AS write_diff_bytes
|
||||||
|
, pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_current_wal_lsn(), flush_lsn) AS flush_diff_bytes
|
||||||
|
, COALESCE(pg_catalog.pg_wal_lsn_diff(pg_catalog.pg_current_wal_lsn(), replay_lsn),0) AS replay_diff_bytes
|
||||||
|
, COALESCE((EXTRACT(EPOCH FROM write_lag)),0)::float AS write_lag_seconds
|
||||||
|
, COALESCE((EXTRACT(EPOCH FROM flush_lag)),0)::float AS flush_lag_seconds
|
||||||
|
, COALESCE((EXTRACT(EPOCH FROM replay_lag)),0)::float AS replay_lag_seconds
|
||||||
|
FROM pg_catalog.pg_stat_replication
|
||||||
|
metrics:
|
||||||
|
- usename:
|
||||||
|
usage: "LABEL"
|
||||||
|
description: "Name of the replication user"
|
||||||
|
- application_name:
|
||||||
|
usage: "LABEL"
|
||||||
|
description: "Name of the application"
|
||||||
|
- client_addr:
|
||||||
|
usage: "LABEL"
|
||||||
|
description: "Client IP address"
|
||||||
|
- client_port:
|
||||||
|
usage: "LABEL"
|
||||||
|
description: "Client TCP port"
|
||||||
|
- backend_start:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "Time when this process was started"
|
||||||
|
- backend_xmin_age:
|
||||||
|
usage: "COUNTER"
|
||||||
|
description: "The age of this standby's xmin horizon"
|
||||||
|
- sent_diff_bytes:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Difference in bytes from the last write-ahead log location sent on this connection"
|
||||||
|
- write_diff_bytes:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Difference in bytes from the last write-ahead log location written to disk by this standby server"
|
||||||
|
- flush_diff_bytes:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Difference in bytes from the last write-ahead log location flushed to disk by this standby server"
|
||||||
|
- replay_diff_bytes:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Difference in bytes from the last write-ahead log location replayed into the database on this standby server"
|
||||||
|
- write_lag_seconds:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written it"
|
||||||
|
- flush_lag_seconds:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written and flushed it"
|
||||||
|
- replay_lag_seconds:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Time elapsed between flushing recent WAL locally and receiving notification that this standby server has written, flushed and applied it"
|
||||||
|
|
||||||
|
pg_settings:
|
||||||
|
query: |
|
||||||
|
SELECT name,
|
||||||
|
CASE setting WHEN 'on' THEN '1' WHEN 'off' THEN '0' ELSE setting END AS setting
|
||||||
|
FROM pg_catalog.pg_settings
|
||||||
|
WHERE vartype IN ('integer', 'real', 'bool')
|
||||||
|
ORDER BY 1
|
||||||
|
metrics:
|
||||||
|
- name:
|
||||||
|
usage: "LABEL"
|
||||||
|
description: "Name of the setting"
|
||||||
|
- setting:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Setting value"
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-backend-deployment
|
||||||
|
labels:
|
||||||
|
app: {{ .Release.Name }}-backend
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ .Release.Name }}-backend
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: {{ .Release.Name }}-backend
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: {{ .Release.Name }}-backend
|
||||||
|
image: ghcr.io/nullptroma/liquid-backend:1.0.0
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
env:
|
||||||
|
- name: S3_ACCESS_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ required "secretname!" .Values.s3.secretName | quote }}
|
||||||
|
key: {{ required "acces-key-key!" .Values.s3.accessKeyKey | quote }}
|
||||||
|
- name: S3_SECRET_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ .Values.s3.secretName | quote }}
|
||||||
|
key: {{ required "secret-key-key!" .Values.s3.secretKeyKey | quote }}
|
||||||
|
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: github-registry
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: backend-service
|
name: {{ .Release.Name }}-backend-service
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: backend
|
app: {{ .Release.Name }}-backend
|
||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 80
|
port: 80
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: default-ingress
|
name: {{ .Release.Name }}-ingress
|
||||||
spec:
|
spec:
|
||||||
rules:
|
rules:
|
||||||
- host: api.nullptr.top
|
- host: api.nullptr.top
|
||||||
@@ -11,6 +11,6 @@ spec:
|
|||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: backend-service
|
name: {{ .Release.Name }}-backend-service
|
||||||
port:
|
port:
|
||||||
number: 80
|
number: 80
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
apiVersion: helm.cattle.io/v1
|
apiVersion: helm.cattle.io/v1
|
||||||
kind: HelmChartConfig
|
kind: HelmChartConfig
|
||||||
metadata:
|
metadata:
|
||||||
name: traefik
|
name: {{ .Release.Name }}-traefik
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
spec:
|
spec:
|
||||||
valuesContent: |-
|
valuesContent: |-
|
||||||
5
liquid-code-chart/values.yaml
Normal file
5
liquid-code-chart/values.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
s3:
|
||||||
|
secretName: s3-credentials
|
||||||
|
accessKeyKey: ACCESS_KEY_ID
|
||||||
|
secretKeyKey: ACCESS_SECRET_KEY
|
||||||
|
imagePullSecret: github-registry
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: backend-deployment
|
|
||||||
labels:
|
|
||||||
app: backend
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: backend
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: backend
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: backend
|
|
||||||
image: ghcr.io/nullptroma/liquid-backend:1.0.0
|
|
||||||
ports:
|
|
||||||
- containerPort: 8080
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: github-registry
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
./setup_cnpg.sh
|
|
||||||
|
|
||||||
cd $(git rev-parse --show-toplevel)/manifests
|
|
||||||
|
|
||||||
kubectl apply -f traefik-config.yaml
|
|
||||||
kubectl apply -f Deployments/backend-deployment.yaml
|
|
||||||
kubectl apply -f Services/backend-service.yaml
|
|
||||||
kubectl apply -f default-ingress.yaml
|
|
||||||
Reference in New Issue
Block a user