The jenkins-operator creates a (config map with a) Groovy script.
jenkins-operator
https://github.com/jenkinsci/kubernetes-operator/blob/d919a2a11cf1b6417daaa414ad315cf3cc985fcc/pkg/configuration/base/resources/base_configuration_configmap.go#L80
They call the deprecated setAgentProtocols method which triggers the warning.
setAgentProtocols