Comments (3)
The flag is defined in an init
function by controller-runtime here which is imported by various files in the oci package so it really is on controller-runtime to fix this. There exists an issue for this behaviour but it looks like they won't change this anytime soon so the only workaround is the one that you already implemented which is to check if the flag has already been defined and if it has, not re-define it.
from pkg.
We just had an interesting discussion about this at Bug Scrub, It looks like the controller-runtime are aware of this issue and I might have found this by clicking through @makkes links.
The working theory is that by importing fluxcd/pkg
to get the oci package, we've changed the dependency order and moved controller-runtime up the import stack, and so this flag gets defined by controller-runtime in the updated version. Whereas it was getting defined by kyverno before and controller-runtime was observing the flag already defined, and avoiding redefining it. That explains it wasn't a problem in the prior order, because controller-runtime checks for existence of the flag, so kyverno just needs to do the same now based on the updated import paths with flux. @vishal-chdhry Thanks for the tour of this issue 👍
The redefinition is between controller-runtime and kyverno, it's a fun coincidence that fluxcd/pkg causes this, but the indirect dependency explanation appears to be the correct one.
from pkg.
controller-runtime registers the flag in the initialization phase using an init
function while Kyverno does not. Therefore, controller-runtime's registration always happens first, according to Go's initialization procedure. There is no way for the Kyverno app to change that because dependencies are always initialized first.
from pkg.
Related Issues (20)
- cloneRefName() does not support annotated git tags
- `patch.Helper` doesn't work with secrets and configmaps HOT 4
- feature request: add support for providing propagationPolicy (i.e orphan) when deleting immutable resources HOT 3
- ApplyAll: parallell dry run / diffing
- Cache registry credentials for cloud providers
- Feature Request: Make tree command a library in this repo HOT 2
- Optimize cloning Git repositories for the refname checkout strategy
- Remove the usage of `goGitError`
- Build order gives higher priority to ASO ServiceBus Namespace kind above Kubernetes core API Namespace kind HOT 19
- Extend `ssa.Apply` with field ignore rules
- Improve kstatus output for `failed early due to stalled resources`
- Detect namespaced objects without a namespace specified
- When setting AWS_STS_REGIONAL_ENDPOINTS=regional` its using the region from the registry url for STS.
- Feature Request: Make the `pkg/http/fetch` library expose a method on the `ArchiveFetcher` to download the tarball without extracting
- Refactor oci client
- kubeconfig cluster.proxy-url is being ignored by kube client HOT 1
- Why do we need to check for a strict semver in ParseVersion?
- Is go 1.22 mandatory for gittestserver? HOT 3
- bug(ssa): allow changes to only `metadata.ownerReferences`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pkg.