fix(cnpg): use hardcoded and fixed cnpg-webhook-service servicename (#9429)

**Description**
It seems cnpg uses a hardcoded servicename, we need to adapt for that as
well.

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [x] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [ ] ⚖️ My code follows the style guidelines of this project
- [ ] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [ ] ⬆️ I increased versions for any altered app according to semantic
versioning

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
This commit is contained in:
Kjeld Schouten
2023-06-06 12:55:54 +02:00
committed by GitHub
parent 618f00a727
commit a8494c6713
4 changed files with 24 additions and 21 deletions

View File

@@ -11,7 +11,7 @@ keywords:
dependencies:
- name: common
repository: https://library-charts.truecharts.org
version: 12.12.1
version: 12.12.3
kubeVersion: ">=1.16.0-0"
maintainers:
- email: info@truecharts.org
@@ -23,7 +23,7 @@ sources:
- https://github.com/cloudnative-pg
- https://cloudnative-pg.io/
type: application
version: 0.0.1
version: 0.0.2
annotations:
truecharts.org/catagories: |
- operators

View File

@@ -22,7 +22,7 @@ webhooks:
- v1
clientConfig:
service:
name: {{ include "tc.v1.common.lib.chart.names.fullname" $ }}
name: cnpg-webhook-service
namespace: {{ .Release.Namespace }}
path: /mutate-postgresql-cnpg-io-v1-backup
port: {{ .Values.service.main.ports.main.port }}
@@ -43,7 +43,7 @@ webhooks:
- v1
clientConfig:
service:
name: {{ include "tc.v1.common.lib.chart.names.fullname" $ }}
name: cnpg-webhook-service
namespace: {{ .Release.Namespace }}
path: /mutate-postgresql-cnpg-io-v1-cluster
port: {{ .Values.service.main.ports.main.port }}
@@ -64,7 +64,7 @@ webhooks:
- v1
clientConfig:
service:
name: {{ include "tc.v1.common.lib.chart.names.fullname" $ }}
name: cnpg-webhook-service
namespace: {{ .Release.Namespace }}
path: /mutate-postgresql-cnpg-io-v1-scheduledbackup
port: {{ .Values.service.main.ports.main.port }}

View File

@@ -22,7 +22,7 @@ webhooks:
- v1
clientConfig:
service:
name: {{ include "tc.v1.common.lib.chart.names.fullname" $ }}
name: cnpg-webhook-service
namespace: {{ .Release.Namespace }}
path: /validate-postgresql-cnpg-io-v1-backup
port: {{ .Values.service.main.ports.main.port }}
@@ -43,7 +43,7 @@ webhooks:
- v1
clientConfig:
service:
name: {{ include "tc.v1.common.lib.chart.names.fullname" $ }}
name: cnpg-webhook-service
namespace: {{ .Release.Namespace }}
path: /validate-postgresql-cnpg-io-v1-cluster
port: {{ .Values.service.main.ports.main.port }}
@@ -64,7 +64,7 @@ webhooks:
- v1
clientConfig:
service:
name: {{ include "tc.v1.common.lib.chart.names.fullname" $ }}
name: cnpg-webhook-service
namespace: {{ .Release.Namespace }}
path: /validate-postgresql-cnpg-io-v1-scheduledbackup
port: {{ .Values.service.main.ports.main.port }}
@@ -85,7 +85,7 @@ webhooks:
- v1
clientConfig:
service:
name: {{ include "tc.v1.common.lib.chart.names.fullname" $ }}
name: cnpg-webhook-service
namespace: {{ .Release.Namespace }}
path: /validate-postgresql-cnpg-io-v1-pooler
port: {{ .Values.service.main.ports.main.port }}

View File

@@ -13,18 +13,20 @@ workload:
- --leader-elect
- --config-map-name={{ include "tc.v1.common.lib.chart.names.fullname" $ }}-config
- --secret-name={{ include "tc.v1.common.lib.chart.names.fullname" $ }}-config
- --webhook-port={{ $.Values.service.main.ports.main.targetPort }}
- --webhook-port=9443
command:
- /manager
probes:
liveness:
port: main
port: webhook
type: https
path: /readyz
readiness:
port: main
port: webhook
type: https
path: /readyz
startup:
port: main
port: webhook
type: tcp
env:
OPERATOR_IMAGE_NAME: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
@@ -40,16 +42,17 @@ service:
main:
ports:
main:
protocol: http
port: 8080
cnpg-webhook-service:
enabled: true
expandObjectName: false
ports:
webhook:
enabled: true
protocol: https
port: 443
targetPort: 9443
metrics:
enabled: true
ports:
metrics:
enabled: true
protocol: http
port: 8080
operator:
register: true
@@ -81,7 +84,7 @@ metrics:
enabled: false
type: "podmonitor"
endpoints:
- port: metrics
- port: main
interval: 5s
scrapeTimeout: 5s
path: /