Coder Social home page Coder Social logo

bf2fc6cc711aee1a0c2a / cos-fleetshard Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 21.0 2.8 MB

The cos-fleetshard-operator is responsible for provisioning and managing connectors instances on a cluster.

License: Apache License 2.0

Java 87.51% Shell 0.16% Gherkin 7.57% Groovy 3.23% Mustache 1.52%

cos-fleetshard's People

Contributors

abkieling avatar ani-sha avatar asmigala avatar astefanutti avatar chirino avatar dependabot[bot] avatar dhirajsb avatar gunnarmorling avatar hdamarcelo avatar igarashitm avatar lburgazzoli avatar lgarciaaco avatar lucamolteni avatar naros avatar nicolaferraro avatar rinaldodev avatar rk3rn3r avatar shivam-gu avatar shivamg640 avatar vaibhavjainwiz avatar valdar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cos-fleetshard's Issues

Update to fabric8 kubernetes-client 5.3.0

These are the features and fixes included in 5.3.0:

  • Fix #2620: Add support for config.openshift.io/v1 Ingress [2]
  • Fix #2784: Not able to deserialize ClusterServiceVersion [3]
  • Fix #2935: CRD generator no longer treat enum values as properties (performance) [4]
  • Fix #2812: SharedIndexInformer EventHandler sees double updates at resync interval [5]
  • Fix #2937: SharedInformerFactory#getExistingSharedIndexInformer returns null when @kind is configured [6]
  • Fix #2924: Creating a CustomResourceInfo from a class doesn't result in the expected information [7]
  • Fix #2967: Copy to/from pods: fixed error message; removed debug output [8]
  • Fix #2923: Edit a CustomResource should result in a patch [9]
  • Fix #2950: RawCustomResourceOperationsImpl should also work with standard resources [10]
  • Fix #2938: Make it possible to manage Tekton Triggers directly [11]
  • Fix #2921: Kubernetes server mock will generate missing metadata fields [12]
  • Fix #2946: Kubernetes server mock watch will generate initial ADDED events [13]
  • Fix #2925: Add CustomResource.getShortNames(Class) method [14]
  • Fix #2971: Upgrade to sundrio 0.30.0 [15]
  • Fix #2837: Add Support for events.k8s.io APIGroup DSL [16]
  • Fix #2854: Introduce CamelK extension [17]

Observatorium config secret is created with wrong name

Fix typo in

It should be getName not namespaces.

When the observability secret is present the sync is unable to start with:

2022-11-24 11:27:38,803 INFO  [org.bf2.cos.fleetshard.sync.client.FleetShardObservabilityClient] (main) Configuring Observatorium SSO secret                                                          
2022-11-24 11:27:39,212 ERROR [io.quarkus.runtime.Application] (main) Failed to start application (with profile prod): io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: https://172.30.0.1/api/v1/namespaces/redhat-openshift-connectors/secrets/redhat-openshift-connectors. Message: secrets "redhat-openshift-connectors" not found. Received status: Status(apiVersion
=v1, code=404, details=StatusDetails(causes=[], group=null, kind=secrets, name=redhat-openshift-connectors, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=secrets "
redhat-openshift-connectors" not found, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=NotFound, status=Failure, additionalProperties={})

The sync fails with: Unrecognized field "migrated"

Log entry looks like:

2023-03-06 13:35:50,205 INFO [org.bf2.cos.fleetshard.sync.client.FleetShardObservabilityClient] (main) Creating Observability resource
2023-03-06 13:35:50,937 ERROR [io.quarkus.runtime.Application] (main) Failed to start application (with profile prod): com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "migrated" (class com.redhat.observability.v1.ObservabilityStatus), not marked as ignorable (6 known properties: "lastSynced", "lastMessage", "clusterId", "tokenExpires", "stage", "stageStatus"])
at [Source: (BufferedInputStream); line: 1, column: 2510] (through reference chain: com.redhat.observability.v1.Observability["status"]->com.redhat.observability.v1.ObservabilityStatus["migrated"])

This is related with the latest changes in the Observability operator where a new field Migrated was introduced

[model generation] map generic `object` types to JsonNode

The openapi-generator-maven-plugin has an option typeMappings to sets mappings between OpenAPI spec types and generated code types we can use to map generic object types to JsonNode. Having a JsonNode node helps to navigate the object using Jackson facilities like JSON Pointers instead to having to manually navigate a map.

<typeMappings>object=com.fasterxml.jackson.databind.JsonNode</typeMappings>

Improve annotation checking based on secret configurations values.

In BDD scenarios we chould be able to change somethink like:

And the klb has annotations containing:
          | trait.camel.apache.org/container.image | quay.io/lburgazzoli/mci:0.1.2-log-sink-0.1 |

in something like:

And the klb has annotations containing:
          | trait.camel.apache.org/container.image | ${secret:.data.meta.conenctor_image} |

In essence, be sure that the annotation matches what it is in the managed connector secret, without having to hard-code it.

[model generator] Get rid of the AllOf classes

The ConnectorDeployment metadata is defined as ConnectorDeploymentAllOfMetadata where tha "AllOf" adds nothing:

public class ConnectorDeployment {
  public static final String JSON_PROPERTY_METADATA = "metadata";
  private ConnectorDeploymentAllOfMetadata metadata;

We should investigate if simpler names are possible, like ConnectorDeploymentMetadata

Clarify: "Received error for watch, will try to reconnect"

Stumbled upon this one:

2021-10-05 14:32:49,815 WARN  [org.bf2.cos.fleetshard.operator.connector.ConnectorOperatorEventSource] (OkHttp https://172.21.0.1/...) Received error for watch, will try to reconnect.: io.fabric8.kubernetes.client.WatcherException: too old resource version: 30632126 (48104904)
	at io.fabric8.kubernetes.client.dsl.internal.AbstractWatchManager.onStatus(AbstractWatchManager.java:273)
	at io.fabric8.kubernetes.client.dsl.internal.AbstractWatchManager.onMessage(AbstractWatchManager.java:257)
	at io.fabric8.kubernetes.client.dsl.internal.WatcherWebSocketListener.onMessage(WatcherWebSocketListener.java:93)
	at okhttp3.internal.ws.RealWebSocket.onReadMessage(RealWebSocket.java:322)
	at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:219)
	at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:105)
	at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:273)
	at okhttp3.internal.ws.RealWebSocket$1.onResponse(RealWebSocket.java:209)
	at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174)
	at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: io.fabric8.kubernetes.client.KubernetesClientException: too old resource version: 30632126 (48104904)
	... 13 more

Is it something to be expected?

[model generation] filter models we don't need

As today we generate the classes for every component defined in the kas-fleet-manager-private OpenApi definition but we don't need all of them so:

  • clean-up the OpenApi definition to include only what we need
  • configure the openapi-generator-maven-plugin to generate the model only for the component we need

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.