apache / apache/camel-k

Consider using metav1.Condition instead of own condition structs

Open
#5,191 5 comments 1 reaction 0 assignees View on GitHub
good first issue kind/feature status/never-stale
Dominant language
Go
Stars
927
Forks
387
Avg merge
15h 5m
Merged PRs (30d)
36

Description

### Requirement

Use the default `metav1.Condition` as conditions on Camel K custom resources.

### Problem

The conditions used in the Camel K custom resources usually are structs that alias to strings.

Instead of this we could try to just reuse `metav1.Condition`, which would allow to manipulate conditions using some [k8s utilities](https://github.com/kubernetes/apimachinery/blob/master/pkg/api/meta/conditions.go).

The downside is that we won't have the specific condition type, but given 99% of the time is just an alias to strings and there are no real enums in go, I don't see anymore a very strong benefit.

### Proposal

_No response_

### Open questions

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the Camel K custom resource condition structs and the code that reads or updates their conditions. Compare those uses with metav1.Condition and the Kubernetes conditions utilities; done means affected custom resources consistently use the default condition type and relevant tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
infrastructure
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.