davsclaus opened a new pull request, #28400:
URL: https://github.com/apache/camel/pull/28400
_Claude Code on behalf of davsclaus_
This group adds the catalog body types (CAMEL-24961) for the last seven
kubernetes components and the three openshift components:
kubernetes-persistent-volumes-claims, -persistent-volumes,
-replication-controllers, -resources-quota, -secrets, -service-accounts and
-services, and openshift-build-configs, -builds and -deploymentconfigs. Each
Endpoint class gets its own `@BodyTypes` annotation; the JSON it generates and
the catalog copy come with it. No doc page changes. With #28399, every
kubernetes and openshift component has body types.
**What the catalog says now**
The producers do not read the body: the operation (the operation option, or
else the CamelKubernetesOperation header) takes its input from headers, such as
the namespace, the name, the labels, and the spec, Secret, ServiceAccount or
replicas. The output is listed by operation, with the values of
`KubernetesOperations`.
| Component | Consumer | Producer output |
|---|---|---|
| persistent-volumes-claims, resources-quota, secrets, service-accounts,
services | services: the `Service` that changed, with the action in
CamelKubernetesEventAction | a List of the fabric8 type for the list
operations; the resource for get (null when not found), create and update; a
`Boolean` for delete (false when not found) |
| persistent-volumes, openshift-build-configs, openshift-builds | | list and
get only |
| replication-controllers, openshift-deploymentconfigs | the
`ReplicationController` or `DeploymentConfig` that changed | as the first row,
and an `Integer` (the replicas of the status) for scale |
**Checked at runtime.** A throwaway test, not part of the PR, used the
fabric8 mock server in CRUD mode, which also serves the OpenShift APIs.
- The list operations of each component were sent text, bytes, a stream, a
file, a Map, a POJO and no body. The body never mattered.
- Every operation was run, including get of a missing name and a second
delete.
- The services, replication-controllers and deploymentconfigs consumers were
checked with real watch events.
A successful scale was not run, as the mock leaves the status empty.
**Choices**
- The default producer output is the union of the operations, as the
operation can come from a header.
- Three descriptions say where the namespace is not used: listBuilds and
listBuildConfigs list all namespaces, and the get and list operations of
openshift-deploymentconfigs use the namespace of the client.
**Bugs found, not fixed here.** The JIRAs will follow.
- **openshift-deploymentconfigs:**
- getDeploymentConfig, listDeploymentConfigs and
listDeploymentConfigsByLabels ignore the CamelKubernetesNamespaceName header,
which create, update, delete and scale read. A DeploymentConfig created in
namespace "other" was not found by a get with the same header.
- **openshift-deploymentconfigs, replication-controllers:**
- scale gives `getStatus().getReplicas()`, which fails with a
NullPointerException when the resource has no status yet. Otherwise it is the
current count, which can lag the count that was asked for.
- **persistent-volumes, openshift-build-configs:**
- The ByLabels lists without the labels header fail with a
NullPointerException (`"m" is null`), not a clear error. openshift-builds and
openshift-deploymentconfigs have the same code; this was read, not run.
- **openshift-builds, openshift-build-configs:**
- listBuilds and listBuildConfigs always list all namespaces, while their
ByLabels variants use the namespace header.
- **All ten:**
- The `namespace` option is used only by the consumers; the producers read
only the header.
- **kubernetes-secrets:**
- With the annotations header, createSecret and updateSecret change the
Secret of the CamelKubernetesSecret header in place. They fail with a
NullPointerException when it has no metadata. This was read from the code.
- **kubernetes-services:**
- The page leaves updateService out of the producer operations.
**Local checks**
- camel-kubernetes builds, with no change to the generated files after the
build.
- The 10 catalog copies equal their module.
- camel-catalog, camel-yaml-dsl-validator and camel-jbang-core tests pass.
- The Endpoint and Component DSLs regenerate with no change.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]