Remove logging-crd in order to rely on logging unit for all logging crds
What does this MR do and why?
Fix for #4768
The logging-operator chart ships the same 16 CRDs in its crds/dir as the logging-crd unit does in templates resulting in drift detection during upgrades (CreateReplace is default).
The logging-crd is deleted so logging can manage by itself all 16 crds. This works without any issues in fresh deployments however in upgrades the logging-crd helm release doesn't get deleted because of its prune configuration so a one-shot unit is required to clean up the logging-crd hr without helm uninstalling it, in order to not delete its crds. Additionally, there is a left over logging hr secret deleted by the same cleanup unit.
EDIT:
I also found loki depending on logging-crd which I assume should be monitoring-crd, changed in the mr.
loki:
-----
depends_on:
loki-init: true
loki-credentials-secret: true
rustfs-logging: '{{ .Values.logging.loki.storageConfig | empty }}'
logging-crd: '{{ tuple . "monitoring" | include "unit-enabled" }}'Related reference(s)
#4768 (comment 3982455267)
Results
Tested locally on fresh deployment as well as upgrade :
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.21.0
creationTimestamp: "2026-10-12T15:35:17Z"
generation: 1
labels:
helm.toolkit.fluxcd.io/name: logging
helm.toolkit.fluxcd.io/namespace: sylva-system
name: eventtailers.logging-extensions.banzaicloud.io
resourceVersion: "13709"
uid: a81b9078-855f-4965-b0d8-fbf75879a100No more drift detected.
Upgrade logs:
07:30:35.904Z logging-crd release not installed: no release in storage for object
07:30:35.921Z logging-crd running 'install' action with timeout of 5m0s
07:30:40.897Z logging-crd creating resource(s) (16 resources)
07:30:44.815Z Helm install succeeded for release kube-logging/logging-crd.v1 with chart logging-operator-crds@6.5.0 07:39:45.100Z logging release not installed: no release in storage for object
07:39:45.118Z logging running 'install' action with timeout of 5m0s
07:39:45.346Z logging applying CustomResourceDefinition(s) with policy Create
07:39:45.374Z logging CustomResourceDefinition eventtailers.logging-extensions.banzaicloud.io is already present. Skipping.Logging takeover:
09:34:20.417Z logging determining next Helm action based on state: 'OutOfSync' reason 'release chart changed'
09:34:20.451Z logging running 'upgrade' action with timeout of 5m0s
09:34:20.736Z logging applying CustomResourceDefinition(s) with policy CreateReplace
09:34:21.083Z logging using resource replace update strategy
09:34:21.211Z eventtailers.logging-extensions.banzaicloud.io replace succeeded 09:38:08.675Z logging-crd-cleanup deleting resourceCI configuration
Below you can choose test deployment variants to run in this MR's CI.
Click to open to CI configuration
Legend:
| Icon | Meaning | Available values |
|---|---|---|
| Infra Provider | capd, capo, capm3 |
|
| Bootstrap Provider | kubeadm (alias kadm), rke2, okd, ck8s |
|
| Node OS | ubuntu, suse, na, leapmicro |
|
| Deployment Options | Deployment option list and description | |
| Pipeline Scenarios | Available scenario list and description | |
| Enabled units | Any available units name, by default apply to management and workload cluster. Can be prefixed by mgmt: or wkld: to be applied only to a specific cluster type |
|
| Disabled units | Any available units name, by default apply to management and workload cluster. Can be prefixed by mgmt: or wkld: to be applied only to a specific cluster type |
|
| Target platform | Can be used to select specific deployment environment Available platform list and description | |
| Pipeline control | autorun, manual or blocking. Can be used to override global config and start a deployment pipeline the required way |
-
🎬 preview☁️ capd🚀 kadm🐧 ubuntu -
🎬 preview☁️ capo🚀 rke2🐧 suse -
🎬 preview☁️ capm3🚀 rke2🐧 ubuntu -
☁️ capd🚀 kadm🛠️ light-deploy🐧 ubuntu -
☁️ capd🚀 rke2🛠️ light-deploy🐧 suse -
☁️ capo🚀 rke2🐧 suse -
☁️ capo🚀 rke2🐧 leapmicro -
☁️ capo🚀 kadm🐧 ubuntu -
☁️ capo🚀 kadm🐧 ubuntu🟢 neuvector,mgmt:harbor -
☁️ capo🚀 rke2🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capo🚀 kadm🎬 wkld-k8s-upgrade🐧 ubuntu -
☁️ capo🚀 rke2🎬 rolling-update-no-wkld🛠️ ha🐧 suse -
☁️ capo🚀 rke2🎬 sylva-upgrade🛠️ ha🐧 ubuntu -
☁️ capo🚀 rke2🎬 sylva-upgrade-from-1.6.x🛠️ ha,misc🐧 ubuntu -
☁️ capo🚀 rke2🛠️ ha,misc🐧 ubuntu -
☁️ capo🚀 rke2|okd🎬 no-update🐧 ubuntu|na -
☁️ capo🚀 rke2🛠️ misc🐧 ubuntu🟢 mgmt:harbor🔴 neuvector -
☁️ capo🚀 rke2🛠️ ha,misc,openbao🐧 suse -
☁️ capo🚀 rke2🐧 suse🎬 upgrade-from-prev-tag -
☁️ capm3🚀 rke2🐧 suse -
☁️ capm3🚀 kadm🐧 ubuntu -
☁️ capm3🚀 rke2🛠️ external-openbao-no-tls🐧 ubuntu -
☁️ capm3🚀 rke2🛠️ external-openbao🐧 suse -
☁️ capm3🚀 kadm🛠️ external-openbao,openbao-namespace🐧 ubuntu -
☁️ capm3🚀 ck8s🐧 ubuntu -
☁️ capm3🚀 kadm🎬 rolling-update-no-wkld🛠️ ha,misc🐧 ubuntu -
☁️ capm3🚀 rke2🎬 wkld-k8s-upgrade🛠️ ha🐧 suse -
☁️ capm3🚀 kadm🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capm3🚀 rke2🎬 upgrade-from-prev-release-branch🛠️ ha🐧 suse -
☁️ capm3🚀 rke2🛠️ misc,ha🐧 suse -
☁️ capm3🚀 rke2🎬 sylva-upgrade🛠️ ha,misc🐧 suse -
☁️ capm3🚀 kadm🎬 rolling-update🛠️ ha🐧 suse -
☁️ capm3🚀 ck8s🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capm3🚀 rke2|okd🎬 no-update🐧 ubuntu|na -
☁️ capm3🚀 rke2🐧 suse🎬 upgrade-from-release-1.5 -
☁️ capm3🚀 rke2🐧 suse🎬 upgrade-to-main -
☁️ capm3🚀 rke2🐧 suse🛠️ ha,logging🎬 upgrade-from-release-1.7🏗️ virt-leaseweb -
☁️ capm3🚀 rke2🐧 suse🛠️ ha,logging🎬 upgrade-from-release-1.7 -
☁️ capo🚀 rke2🎬 rolling-update🛠️ ha,logging🐧 suse
Global config for deployment pipelines
- autorun pipelines
- allow failure on pipelines
- record sylvactl events
Notes:
- Enabling
autorunwill make deployment pipelines to be run automatically without human interaction - Disabling
allow failurewill make deployment pipelines mandatory for pipeline success. - if both
autorunandallow failureare disabled, deployment pipelines will need manual triggering but will be blocking the pipeline
Be aware: after configuration change, pipeline is not triggered automatically.
Please run it manually (by clicking the run pipeline button in Pipelines tab) or push new code.