srl-labs / srl-controller

k8s controller for SR Linux nodes scheduled by KNE
BSD 3-Clause "New" or "Revised" License
16 stars 3 forks source link

feat: dont error out on version parse if we fail, just skip dealing w/ license secret #40

Closed carlmontanari closed 10 months ago

carlmontanari commented 10 months ago

title! some folks are wanting to use arbitrary tags and currently this results in us returning an error from the image/tag parsing which prevents us from getting a pod deployed. this pr simply returns an empty version object rather than an error if we can't parse things. worst case folks will have no secret.

holler if this needs tweaking and ill get whatever sorted!

codecov[bot] commented 10 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (1844b46) 50.93% compared to head (1cd1e85) 50.87%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #40 +/- ## ========================================== - Coverage 50.93% 50.87% -0.07% ========================================== Files 8 8 Lines 799 804 +5 ========================================== + Hits 407 409 +2 - Misses 365 369 +4 + Partials 27 26 -1 ``` | [Files](https://app.codecov.io/gh/srl-labs/srl-controller/pull/40?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=srl-labs) | Coverage Δ | | |---|---|---| | [api/v1/srl\_version.go](https://app.codecov.io/gh/srl-labs/srl-controller/pull/40?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=srl-labs#diff-YXBpL3YxL3NybF92ZXJzaW9uLmdv) | `100.00% <100.00%> (ø)` | | | [api/v1/srlinux\_types.go](https://app.codecov.io/gh/srl-labs/srl-controller/pull/40?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=srl-labs#diff-YXBpL3YxL3NybGludXhfdHlwZXMuZ28=) | `100.00% <100.00%> (ø)` | | | [controllers/secret.go](https://app.codecov.io/gh/srl-labs/srl-controller/pull/40?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=srl-labs#diff-Y29udHJvbGxlcnMvc2VjcmV0Lmdv) | `41.23% <88.88%> (-0.07%)` | :arrow_down: |
hellt commented 10 months ago

LGTM, @carlmontanari Feel free to merge this one