Comments (5)
Thanks for the report! Looks like ParseNormalizedNamed
is returning an error, which we're ignoring. I'll have to dig a bit to see why we're ignoring the error and what exactly it's returning. I'll try to reproduce the problem and then fix it.
from clusterlint.
@joannelynch92 I created a pod in my own cluster using the jaegertracing/all-in-one:latest
image, and was able to run clusterlint successfully:
% clusterlint run -c latest-tag
[warning] default/pod/jaeger: Avoid using latest tag for container 'jaeger'
This makes me think that pod/container is not actually the one causing trouble in your case - but clearly some pod is causing us to crash. I've created PR #72 to add a check for the error we're ignoring; if you're able to build a clusterlint binary from that PR and run it on your cluster, I'd be interested to see the output of kubectl get -o yaml
for any pod that gets the new Image name for container '<name>' could not be parsed
warning.
If you're not able to build your own clusterlint from that branch, feel free to wait until we merge the PR and do a release, then give it a try.
As a bit of background: we were ignoring the error from reference.ParseNormalizedNamed
because that's the same function k8s itself calls to parse image names when you deploy a workload, so we expect images in a running workload would always have a name the function can parse. It seems like there's something running in your cluster that has an image name that doesn't parse successfully; I'm very curious what that might be :-).
from clusterlint.
So someone fixed the problem pod on the cluster over the weekend but I had the output of all the cluster's pods saved and noticed one image was missing its tag.
$ kubectl get pod hello-release-hello-world-76bc67557d-4g565 -o yaml
apiVersion: v1
kind: Pod
spec:
containers:
- image: 'redacted.dkr.ecr.us-east-1.amazonaws.com/redacted/redacted:'
status:
containerStatuses:
- image: 'redacted.dkr.ecr.us-east-1.amazonaws.com/redacted/redacted:'
imageID: ""
lastState: {}
name: hello-world
ready: false
restartCount: 0
state:
waiting:
message: 'Failed to apply default image tag "redacted.dkr.ecr.us-east-1.amazonaws.com/redacted/redacted:":
couldn''t parse image reference "redacted.dkr.ecr.us-east-1.amazonaws.com/redacted/redacted:":
invalid reference format'
reason: InvalidImageName
I put the broken image back in as a test and the clusterlint program crashed again (v0.1.3, not with changes) so looks like that was the image name at fault. Thanks for your help!
from clusterlint.
@joannelynch92 Ah, thanks for the update - I am able to reproduce the problem with a missing tag. #72 fixes the issue.
from clusterlint.
Closing this since it was fixed by #72.
from clusterlint.
Related Issues (20)
- Cluster upgrade issue with cert manager HOT 8
- Cluster linter messages point to missing docs section HOT 5
- Check if pods referencing dobs volumes are owned by a statefulset
- Pods referencing DOBS volumes don't support Rolling deployments HOT 4
- Missing doc on warn Pod referencing dobs volumes must be owned by statefulset HOT 8
- Warn about containers pulling from docker.pkg.github.com
- False positives for "volumes must be owned by statefulset" and "fully qualified image name"? HOT 1
- false positive for webhooks with TimeoutSeconds value greater than 29s HOT 2
- Fatal error when building clusterlint on Go 1.17 HOT 1
- Running the tool in-cluster ? HOT 1
- upgrade to 1.22.7-do.0, incompatible ingress not detected
- Official Docker image ?
- No version number provided
- should be able to retrieve storageClassName from annotation
- Subcommand to lint manifests before they are deployed onto a cluster HOT 3
- Admission control webhook check in the "basic" group HOT 6
- Admission control webhook check should check apiGroups HOT 4
- admission-controller-webhook-replacement check needs more details HOT 4
- Add a check for cronjobs with a concurrencyPolicy of Allow HOT 2
- Add resource requirements check to doks group HOT 3
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 clusterlint.