feat(metallb/cloudnative-pg/CI): BREAKING CHANGE move to consume upstream helm charts (#14681)

**Description**

To ensure stability, we've decided to directly use upstream helm-charts
from their respective projects for operators specifically.
Mostly because they heavily rely on rbac, crds and crs, which could
cause conflicts between shipped rbac/crd and container versions.

also patches the ci for a few other operators to exclude them from
signing requirements

⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [x] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [x] 🔃 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.

- [x] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [x] 🖼️ 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-11-15 15:39:03 +01:00
committed by GitHub
parent 0b9c28ea82
commit 27664e7ff3
18 changed files with 73 additions and 15250 deletions
+5 -1
View File
@@ -11,6 +11,10 @@ dependencies:
- name: common
repository: https://library-charts.truecharts.org
version: 14.3.5
- name: metallb
repository: https://metallb.github.io/metallb
version: 0.13.12
alias: metallb
kubeVersion: ">=1.16.0-0"
maintainers:
- email: info@truecharts.org
@@ -22,7 +26,7 @@ sources:
- https://github.com/metallb/metallb
- https://metallb.universe.tf
type: application
version: 10.0.11
version: 11.0.0
annotations:
truecharts.org/category: operators
truecharts.org/SCALE-support: "true"
@@ -1,162 +0,0 @@
{{- define "metallb.webhooks" -}}
{{- $labels := (include "tc.v1.common.lib.metadata.allLabels" $ | fromYaml) }}
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: metallb-webhook-configuration
labels:
{{- with (include "tc.v1.common.lib.metadata.render" (dict "rootCtx" $ "labels" $labels) | trim) }}
{{- . | nindent 4 }}
{{- end }}
webhooks:
- admissionReviewVersions:
- v1
clientConfig:
service:
name: '{{ include "tc.v1.common.lib.chart.names.fullname" $ }}'
namespace: {{ .Release.Namespace }}
path: /validate-metallb-io-v1beta1-addresspool
failurePolicy: {{ .Values.validationFailurePolicy }}
name: addresspoolvalidationwebhook.metallb.io
rules:
- apiGroups:
- metallb.io
apiVersions:
- v1beta1
operations:
- CREATE
- UPDATE
resources:
- addresspools
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: '{{ include "tc.v1.common.lib.chart.names.fullname" $ }}'
namespace: {{ .Release.Namespace }}
path: /validate-metallb-io-v1beta2-bgppeer
failurePolicy: {{ .Values.validationFailurePolicy }}
name: bgppeervalidationwebhook.metallb.io
rules:
- apiGroups:
- metallb.io
apiVersions:
- v1beta2
operations:
- CREATE
- UPDATE
resources:
- bgppeers
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: '{{ include "tc.v1.common.lib.chart.names.fullname" $ }}'
namespace: {{ .Release.Namespace }}
path: /validate-metallb-io-v1beta1-ipaddresspool
failurePolicy: {{ .Values.validationFailurePolicy }}
name: ipaddresspoolvalidationwebhook.metallb.io
rules:
- apiGroups:
- metallb.io
apiVersions:
- v1beta1
operations:
- CREATE
- UPDATE
resources:
- ipaddresspools
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: '{{ include "tc.v1.common.lib.chart.names.fullname" $ }}'
namespace: {{ .Release.Namespace }}
path: /validate-metallb-io-v1beta1-bgpadvertisement
failurePolicy: {{ .Values.validationFailurePolicy }}
name: bgpadvertisementvalidationwebhook.metallb.io
rules:
- apiGroups:
- metallb.io
apiVersions:
- v1beta1
operations:
- CREATE
- UPDATE
resources:
- bgpadvertisements
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: '{{ include "tc.v1.common.lib.chart.names.fullname" $ }}'
namespace: {{ .Release.Namespace }}
path: /validate-metallb-io-v1beta1-community
failurePolicy: {{ .Values.validationFailurePolicy }}
name: communityvalidationwebhook.metallb.io
rules:
- apiGroups:
- metallb.io
apiVersions:
- v1beta1
operations:
- CREATE
- UPDATE
resources:
- communities
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: '{{ include "tc.v1.common.lib.chart.names.fullname" $ }}'
namespace: {{ .Release.Namespace }}
path: /validate-metallb-io-v1beta1-bfdprofile
failurePolicy: {{ .Values.validationFailurePolicy }}
name: bfdprofilevalidationwebhook.metallb.io
rules:
- apiGroups:
- metallb.io
apiVersions:
- v1beta1
operations:
- CREATE
- DELETE
resources:
- bfdprofiles
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: '{{ include "tc.v1.common.lib.chart.names.fullname" $ }}'
namespace: {{ .Release.Namespace }}
path: /validate-metallb-io-v1beta1-l2advertisement
failurePolicy: {{ .Values.validationFailurePolicy }}
name: l2advertisementvalidationwebhook.metallb.io
rules:
- apiGroups:
- metallb.io
apiVersions:
- v1beta1
operations:
- CREATE
- UPDATE
resources:
- l2advertisements
sideEffects: None
---
apiVersion: v1
kind: Secret
metadata:
name: webhook-server-cert
labels:
{{- with (include "tc.v1.common.lib.metadata.render" (dict "rootCtx" $ "labels" $labels) | trim) }}
{{- . | nindent 4 }}
{{- end }}
{{- end -}}
@@ -1,7 +1,5 @@
{{/* Make sure all variables are set properly */}}
{{- include "tc.v1.common.loader.init" . }}
{{- include "metallb.webhooks" . -}}
{{/* Render the templates */}}
{{ include "tc.v1.common.loader.apply" . }}
File diff suppressed because it is too large Load Diff
+10 -332
View File
@@ -1,347 +1,25 @@
image:
repository: tccr.io/truecharts/metallb-controller
tag: v0.13.12@sha256:0648f93b8c42b6531b05b1f2c197fd16d367b7a0c2b8b474b15fcb55baaf6867
pullPolicy:
speakerImage:
repository: tccr.io/truecharts/metallb-speaker
tag: v0.13.12@sha256:92d801d823bfe74e2e129573c9f88f9157616bd4128fddec585d5b6c0dc99bd8
pullPolicy:
workload:
main:
strategy: RollingUpdate
labels:
app.kubernetes.io/component: controller
podSpec:
labels:
app.kubernetes.io/component: controller
containers:
main:
args:
- --port=7472
- --log-level=all
- --cert-service-name={{ include "tc.v1.common.lib.chart.names.fullname" $ }}
- --webhook-mode=enabled
probes:
liveness:
port: controllermon
path: /metrics
readiness:
port: controllermon
path: /metrics
startup:
port: controllermon
type: tcp
env:
METALLB_ML_SECRET_NAME: "memberlist"
METALLB_DEPLOYMENT: '{{ include "tc.v1.common.lib.chart.names.fullname" $ }}'
METALLB_NAMESPACE: "{{$.Release.Namespace}}"
speaker:
enabled: true
type: DaemonSet
strategy: RollingUpdate
labels:
app.kubernetes.io/component: controller
podSpec:
labels:
app.kubernetes.io/component: controller
shareProcessNamespace: true
hostNetwork: true
containers:
speaker:
enabled: true
primary: true
imageSelector: speakerImage
args:
- --port=7473
- --log-level=all
probes:
liveness:
port: speakermon
path: /metrics
readiness:
port: speakermon
path: /metrics
startup:
port: speakermon
type: tcp
env:
METALLB_NODE_NAME:
fieldRef:
fieldPath: spec.nodeName
METALLB_HOST:
fieldRef:
fieldPath: status.hostIP
METALLB_ML_BIND_ADDR:
fieldRef:
fieldPath: status.podIP
METALLB_ML_LABELS: "release={{ $.Release.Name }},app.kubernetes.io/component=speaker"
METALLB_ML_BIND_PORT: "{{ $.Values.service.memberlist.ports.memberlisttcp.port }}"
METALLB_ML_SECRET_KEY_PATH: "/etc/ml_secret_key"
METALLB_NAMESPACE: "{{$.Release.Namespace}}"
securityContext:
runAsUser: 0
capabilities:
add:
- NET_RAW
podOptions:
automountServiceAccountToken: true
repository: tccr.io/truecharts/alpine
pullPolicy: IfNotPresent
tag: latest@sha256:17cd77e25d3fa829d168caec4db7bb5b52ceeb935d8ca0d1180de6f615553dc4
service:
main:
enabled: false
ports:
main:
port: 443
targetPort: 9443
memberlist:
enabled: true
targetSelector: speaker
ports:
memberlisttcp:
enabled: true
protocol: tcp
port: 7946
memberlistudp:
enabled: true
protocol: udp
port: 7946
speakermon:
enabled: true
targetSelector: speaker
clusterIP: None
ports:
speakermon:
enabled: true
port: 7473
controllermon:
enabled: true
clusterIP: None
ports:
controllermon:
enabled: true
port: 7472
enabled: false
operator:
register: true
workload:
main:
enabled: false
configmap:
metallb-excludel2:
enabled: true
data:
excludel2.yaml: |
announcedInterfacesToExclude:
- docker.*
- cbr.*
- dummy.*
- virbr.*
- lxcbr.*
- veth.*
- lo
- ^cali.*
- ^tunl.*
- flannel.*
- kube-ipvs.*
- cni.*
- ^nodelocaldns.*
persistence:
webhook-server-cert:
enabled: true
type: secret
objectName: webhook-server-cert
expandObjectName: false
defaultMode: "0420"
readOnly: true
targetSelector:
main:
main:
mountPath: "/tmp/k8s-webhook-server/serving-certs"
metallb-excludel2:
enabled: "{{ if $.Values.speaker.excludeInterfaces.enabled }}true{{ else }}false{{ end }}"
type: configmap
objectName: metallb-excludel2
defaultMode: "0256"
readOnly: true
targetSelector:
speaker:
speaker:
mountPath: "/etc/metallb"
memberlist:
enabled: true
type: secret
objectName: memberlist
expandObjectName: false
defaultMode: "0420"
targetSelector:
speaker:
speaker:
mountPath: "/etc/ml_secret_key"
portal:
open:
enabled: false
# -- Whether Role Based Access Control objects like roles and rolebindings should be created
rbac:
main:
enabled: true
primary: true
clusterWide: true
allServiceAccounts: true
rules:
- apiGroups: [""]
resources: ["services", "endpoints", "nodes", "namespaces"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["list"]
- apiGroups: [""]
resources: ["services/status"]
verbs: ["update"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create", "patch"]
- apiGroups: ["admissionregistration.k8s.io"]
resources:
["validatingwebhookconfigurations", "mutatingwebhookconfigurations"]
resourceNames: ["metallb-webhook-configuration"]
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
- apiGroups: ["admissionregistration.k8s.io"]
resources:
["validatingwebhookconfigurations", "mutatingwebhookconfigurations"]
verbs: ["list", "watch"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
resourceNames:
[
"addresspools.metallb.io",
"bfdprofiles.metallb.io",
"bgpadvertisements.metallb.io",
"bgppeers.metallb.io",
"ipaddresspools.metallb.io",
"l2advertisements.metallb.io",
"communities.metallb.io",
]
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["list", "watch"]
- apiGroups: ["discovery.k8s.io"]
resources: ["endpointslices"]
verbs: ["get", "list", "watch"]
controller:
enabled: true
primary: false
clusterWide: false
serviceAccounts:
- main
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["create", "get", "list", "watch"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["list"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"]
- apiGroups: ["metallb.io"]
resources: ["addresspools"]
verbs: ["get", "list", "watch"]
- apiGroups: ["metallb.io"]
resources: ["ipaddresspools"]
verbs: ["get", "list", "watch"]
- apiGroups: ["metallb.io"]
resources: ["bgppeers"]
verbs: ["get", "list"]
- apiGroups: ["metallb.io"]
resources: ["bgpadvertisements"]
verbs: ["get", "list"]
- apiGroups: ["metallb.io"]
resources: ["l2advertisements"]
verbs: ["get", "list"]
- apiGroups: ["metallb.io"]
resources: ["communities"]
verbs: ["get", "list", "watch"]
- apiGroups: ["metallb.io"]
resources: ["bfdprofiles"]
verbs: ["get", "list", "watch"]
pod-lister:
enabled: true
primary: false
clusterWide: false
serviceAccounts:
- speaker
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["list"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch"]
- apiGroups: ["metallb.io"]
resources: ["addresspools"]
verbs: ["get", "list", "watch"]
- apiGroups: ["metallb.io"]
resources: ["bfdprofiles"]
verbs: ["get", "list", "watch"]
- apiGroups: ["metallb.io"]
resources: ["bgppeers"]
verbs: ["get", "list", "watch"]
- apiGroups: ["metallb.io"]
resources: ["l2advertisements"]
verbs: ["get", "list", "watch"]
- apiGroups: ["metallb.io"]
resources: ["bgpadvertisements"]
verbs: ["get", "list", "watch"]
- apiGroups: ["metallb.io"]
resources: ["ipaddresspools"]
verbs: ["get", "list", "watch"]
- apiGroups: ["metallb.io"]
resources: ["communities"]
verbs: ["get", "list", "watch"]
# -- The service account the pods will use to interact with the Kubernetes API
serviceAccount:
main:
enabled: true
primary: true
targetSelector:
- main
speaker:
enabled: true
primary: false
targetSelector:
- speaker
# controller contains configuration specific to the MetalLB cluster
# controller.
controller:
enabled: true
# -- Controller log level. Must be one of: `all`, `debug`, `info`, `warn`, `error` or `none`
logLevel: info
# command: /controller
# webhookMode: enabled
# speaker contains configuration specific to the MetalLB speaker
# daemonset.
speaker:
enabled: true
# command: /speaker
# -- Speaker log level. Must be one of: `all`, `debug`, `info`, `warn`, `error` or `none`
logLevel: info
tolerateMaster: true
excludeInterfaces:
enabled: true
validationFailurePolicy: Fail
operator:
register: true
manifestManager:
enabled: false