Comments (5)
Looks like golang supports plugin loading through https://pkg.go.dev/plugin.
I think this is halfly baked feature :(
We are thinking about having a way to declare CRDs maybe this could be done in some kind of scripting language #24
from kube-linter.
Why do you think so? I`m just curious, as don`t program in Go a lot, mostly Python and Typescript. On first glance sounds like a cool feature. For example we can define each custom linting rule as separate file, then compile it in docker build and load it in runtime when we call kube-linter.
from kube-linter.
Why do you think so?
Good question so I've asked chat gpt about it ๐
- Limited platform support: Go plugins were primarily designed for Unix-like operating systems. They were not well-supported on all platforms, which limited their portability.
- Limited dynamic loading: Go plugins were capable of dynamic loading and unloading, but the implementation was not as flexible as some other languages. Loading and unloading plugins could be tricky and had some restrictions.
- Limited access to symbols: Plugins in Go had limitations in terms of accessing symbols (functions and variables) defined in the host program. This was due to concerns about maintaining type safety and avoiding symbol conflicts.
- Compatibility issues: Plugins were sensitive to changes in the host program's code. If the host program was updated or recompiled, it could lead to incompatibility issues with existing plugins.
- Lack of official support: While Go plugins existed, they were not part of the official Go standard library, indicating that they were not fully matured or recommended for production use.
In my experience although they look like java jars or dynamic libs they are not close to this. Another thing is popularity, I've not seen many projects using it (although there are some. Even golangci/golangci-lint which could be perfect case for a plugin system is based on including a linters and compile them all into a single binary and other projects prefer subprocesses or some other solutions like traefik/yaegi or hashicorp/go-plugin
Other sources:
from kube-linter.
ChatGPT saver of all) Yeah it makes sense, subprocess approach would be much better, only thing that can go wrong is performance.
from kube-linter.
I'm also looking to extend with fully custom checks but based on the examples it looks like only way is to fork and rebuild, is this correct?
from kube-linter.
Related Issues (20)
- [BUG] Some releases are not published on pkg.go.dev HOT 1
- [BUG]: annotation `ignore-check.kube-linter.io/access-to-secrets` does not work HOT 1
- [BUG] failed to decode: no kind "Pipeline" is registered for version "tekton.dev/v1beta1" HOT 1
- [FEATURE_REQUEST] Support HPA maxReplicas HOT 2
- [FEATURE_REQUEST] Support Restart Policy
- [BUG] Linter reporting a low number of replicas for deployments with PDB and HPA minReplicas HOT 4
- [FEATURE_REQUEST] Add OpenShift SecurityContextConstraints
- [FEATURE_REQUEST] Explicit check for `securityContext.allowPrivilegeEscalation=false` on containers
- [Bug] no pods found matching service labels HOT 1
- [BUG] Release assets name HOT 1
- [FEATURE_REQUEST] Common target platforms (ie: linux/arm64)
- Change unset-cpu-requirements check
- Change unset-memory-requirements check
- [BUG] - since v0.6.6 linting from stdin doesn't work anymore with the command: kube-linter lint -
- [FEATURE_REQUEST] EnvVar ValueFrom checks
- [FEATURE_REQUEST] Merge arbitrary values.yaml when checking a helm chart
- [BUG] - service has no selector specified raised when using Endpoint
- [FEATURE_REQUEST] Expand `run-as-non-root` template to verify `runAsGroup` field is nonzero. HOT 1
- Include line and column number ranges for errors HOT 1
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 kube-linter.