Reloader
Reloader copied to clipboard
Reloader keeps logging warnings about `DeploymentConfig`s
Describe the bug
Reloader operator produces dozens of logs per second warning about DeploymentConfigs (DC) being deprecated after OpenShift 4.14:
...
W1031 08:20:26.998706 1 warnings.go:70] apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
W1031 08:20:27.157885 1 warnings.go:70] apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
W1031 08:20:27.299301 1 warnings.go:70] apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
...
To Reproduce
- Install on OpenShift 4.14/4.15
- Leave
reloader.isOpenshiftto it's defaultfalse, haven't tried setting it totruebut we don't use DC's
Expected behavior No messages about DC's
Screenshots Log message should say enough
Environment
- Operator Version:
v1.1.0 - Kubernetes/OpenShift Version: Both on 4.14 and 4.15
Additional context
- This looks to be coming from the K8S api, it's shown regularly when using it, e.g.:
$ oc status
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
- My Deployment manifest:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: reloader-reloader
spec:
replicas: 1
revisionHistoryLimit: 2
selector:
matchLabels:
app: reloader-reloader
template:
metadata:
labels:
app: reloader-reloader
spec:
containers:
- image: "ghcr.io/stakater/reloader:v1.1.0"
args:
- --reload-strategy=annotations
imagePullPolicy: IfNotPresent
name: reloader-reloader
ports:
- name: http
containerPort: 9090
livenessProbe:
httpGet:
path: /live
port: http
timeoutSeconds: 5
failureThreshold: 5
periodSeconds: 10
successThreshold: 1
initialDelaySeconds: 10
readinessProbe:
httpGet:
path: /metrics
port: http
timeoutSeconds: 5
failureThreshold: 5
periodSeconds: 10
successThreshold: 1
initialDelaySeconds: 10
securityContext: {}
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: reloader-reloader
We will attempt to reproduce it on Kind cluster to verify it's an OpenShift specific issue
Yes @karl-johan-grahn this is OpenShift specific issue; as DC is OpenShift concept and NOT a Kubernetes concept; and DCs are going away soon.
@Stef16Robbe code is particularly checking for an API resource to exist to determine if its OCP or not, that causes this issue https://github.com/stakater/Reloader/blob/master/pkg/kube/client.go#L71
@MuneebAijaz That makes sense. Do you have a fix in mind? 😄
This deprecation warning is literally spamming in our logs 24/7 and sometimes even cause CPU throttling on the reloader pod
Same issue has been seen in OCP 4.16 as well. In a span of 5hrs it's printed 342 times.
$ oc logs reloader-8c4df5f54-z9b9d | grep -i "apps.openshift.io/v1 DeploymentConfig is deprecated" | wc -l
$ 342
Guys, still same issue
I try
isOpenshift:false , but another issue appears
reloader-reloader-76d44cf74b-znwv2 time="2025-03-20T10:35:46Z" level=error msg="Failed to list deploymentConfigs deploymentconfigs.apps.openshift.io is forbidden: User \"system:serviceaccount:reloader:reloader-reloader\" cannot list resource \"deploymentconfigs\" in API group \"apps.openshift.io\" in the namespace \"openshift-machine-api\""
Is it possible to define what kind of resources reloader will monitor? help please to suppress it.
@Ivanello you should set isOpenshift in values file to true,
Hello,
Any news to remove this log ? Or remove the check of this API in the code ?
Thx a lot
We will attempt to reproduce it on Kind cluster to verify it's an OpenShift specific issue
Hi @karl-johan-grahn, this is for sure an Openshift specific issue. The now deprecated CRD DeploymentConfig from RedHat is causing this problem. A simple flag in a config, environment variable, etc. to deactivate this DeploymentConfig related code -- even when running in an Openshift cluster -- would be enough to solve this.
Or, well, we just need to figure out how to disable the DeploymentConfig check without changes to the code, as the readme states (master branch) this:
OpenShift (
DeploymentConfig) and Argo Rollouts support must be explicitly enabled
same problem, I hope it can be solved.
Note: we don't have any DeploymentConfig resource
│ W0514 11:15:31.098217 1 warnings.go:70] apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+ │
Any update on this?
Hi!
Yes we have allocated time for this and it should be resolved within a few days.
@Felix-Stakater any updates?