Reloader icon indicating copy to clipboard operation
Reloader copied to clipboard

Reloader keeps logging warnings about `DeploymentConfig`s

Open Stef16Robbe opened this issue 1 year ago • 13 comments
trafficstars

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

  1. Install on OpenShift 4.14/4.15
  2. Leave reloader.isOpenshift to it's default false, haven't tried setting it to true but 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

Stef16Robbe avatar Oct 31 '24 08:10 Stef16Robbe

We will attempt to reproduce it on Kind cluster to verify it's an OpenShift specific issue

karl-johan-grahn avatar Nov 13 '24 09:11 karl-johan-grahn

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.

rasheedamir avatar Nov 19 '24 05:11 rasheedamir

@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 avatar Nov 20 '24 09:11 MuneebAijaz

@MuneebAijaz That makes sense. Do you have a fix in mind? 😄

Stef16Robbe avatar Nov 21 '24 09:11 Stef16Robbe

This deprecation warning is literally spamming in our logs 24/7 and sometimes even cause CPU throttling on the reloader pod

juv avatar Dec 09 '24 15:12 juv

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

sachinavina avatar Feb 28 '25 12:02 sachinavina

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 avatar Mar 20 '25 10:03 Ivanello

@Ivanello you should set isOpenshift in values file to true,

hFti avatar Apr 09 '25 08:04 hFti

Hello,

Any news to remove this log ? Or remove the check of this API in the code ?

Thx a lot

lleroyconsult avatar Apr 16 '25 12:04 lleroyconsult

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

juv avatar Apr 24 '25 13:04 juv

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+                                             │

ibalat avatar May 14 '25 11:05 ibalat

Any update on this?

Lolelinus13 avatar Jun 17 '25 14:06 Lolelinus13

Hi!

Yes we have allocated time for this and it should be resolved within a few days.

Felix-Stakater avatar Jun 17 '25 14:06 Felix-Stakater

@Felix-Stakater any updates?

Stef16Robbe avatar Oct 20 '25 12:10 Stef16Robbe