Skip to content

Conversation

@andreaskaris
Copy link
Contributor

@andreaskaris andreaskaris commented Oct 9, 2025

This PR is just to run CI and to keep API review changes and actual code in sync

API review is here: openshift/api#2521

Conventions: https://github.com/openshift/enhancements/blob/master/dev-guide/api-conventions.md

@andreaskaris andreaskaris changed the title WIP: Branch for testing s WIP: Branch for testing API review Oct 9, 2025
@andreaskaris andreaskaris marked this pull request as draft October 9, 2025 16:09
@andreaskaris andreaskaris force-pushed the conditions-api-changes branch 15 times, most recently from b26b2a7 to 09760ca Compare October 15, 2025 17:47
Implements status conditions and component status tracking for the
Config custom resource to provide visibility into the reconciliation
state of managed components (ConfigMap, DaemonSets, CSIDriver, SCC).

- Add ConfigComponentStatuses type with status for each component
- Implement Progressing and Available conditions following Kubernetes
  conventions
- Add event recording for status changes
- Update controller with status subresource RBAC permissions
- Add test coverage for all status states
- Integrate status checks into lifecycle tests

The status system tracks individual component readiness and sets
overall conditions to indicate when the Config is progressing or
fully available.

Signed-off-by: Andreas Karis <[email protected]>
@andreaskaris andreaskaris force-pushed the conditions-api-changes branch 9 times, most recently from c0630da to 8d2cd36 Compare October 17, 2025 21:56
Add checkResourcesInDesiredState function to verify that the default
health probe port (8175) is correctly applied to bpfman and metrics
proxy DaemonSets when not explicitly set in the Config spec.

This test ensures the default value handling introduced in the API
standards compliance changes works correctly at runtime.

Signed-off-by: Andreas Karis <[email protected]>
@andreaskaris andreaskaris force-pushed the conditions-api-changes branch from f07437a to 1b3b8ad Compare October 21, 2025 12:36
@andreaskaris andreaskaris force-pushed the conditions-api-changes branch 6 times, most recently from 11aff3f to 909959a Compare October 21, 2025 12:47
Make the following changes to align with OpenShift API standards:

- Update field documentation to use lowercase descriptions per
  OpenShift style guidelines
- Add explicit field descriptions for metadata, spec, and status
  on Config type
- Remove redundant +kubebuilder:validation:Required tags (implied
  by +required marker)
- Add validation constraints (MinLength, MaxLength) to string fields
- Change HealthProbePort type from int to int32 for consistency
- Make HealthProbePort optional, with default value 8175 applied
  in controller instead of API layer
- Add enum validation for AgentSpec.LogLevel
- Use omitzero JSON tag for required Spec field
- Add MaxItems validation for status Conditions array
- Add documentation for ConfigComponentStatus constants

Signed-off-by: Andreas Karis <[email protected]>
@andreaskaris andreaskaris force-pushed the conditions-api-changes branch from 909959a to 6f44f20 Compare October 21, 2025 13:08
API review: remove BpfApplicationState GetClientObject

Method GetClientObject is not used and removing it removes
the dependency on sigs.k8s.io/controller-runtime/pkg/client

Signed-off-by: Andreas Karis <[email protected]>
@andreaskaris andreaskaris force-pushed the conditions-api-changes branch 2 times, most recently from e02a213 to 1add523 Compare October 21, 2025 15:23
This commit updates the v1alpha1 API types to follow OpenShift API
standards by:

- Adding `omitempty` JSON tags to all optional and status fields
- Using `omitzero` for required spec fields to ensure they're validated
- Adding field-level documentation comments for metadata, spec, and status
- Adding validation constraints (MaxItems, MinLength, MaxLength) to arrays
  and strings
- Setting proper list types (atomic, map) for arrays
- Reordering Status fields to place Conditions first per convention
- Improving consistency in field documentation across all types

Signed-off-by: Andreas Karis <[email protected]>
@andreaskaris andreaskaris force-pushed the conditions-api-changes branch from 1add523 to 85d1f01 Compare October 21, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant