Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinispan Service Binding #1

Closed
wants to merge 173 commits into from
Closed

Conversation

karesti
Copy link
Owner

@karesti karesti commented Dec 13, 2022

No description provided.

sberyozkin and others added 19 commits November 29, 2022 14:50
Also clean up the slow path
Bumps `httpclient.version` from 4.5.13 to 4.5.14.

Updates `httpclient` from 4.5.13 to 4.5.14

Updates `httpclient-cache` from 4.5.13 to 4.5.14

Updates `httpmime` from 4.5.13 to 4.5.14

---
updated-dependencies:
- dependency-name: org.apache.httpcomponents:httpclient
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.httpcomponents:httpclient-cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.httpcomponents:httpmime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
This commit updates the Cassandra quickstart guide and
clarifies the steps required in order to use the
Cassandra driver Object Mapper framework in a Quarkus
application.

It also makes it simpler to understand which beans
are automatically produced by the Object Mapper.

Finally, it brings some minor enhancements to the
"Eager vs Lazy Initialization" section.
Pool metrics cover Vert.x worker threads, the various connection pools (including the one for the Vert.x SQL clients), Redis...

The code is an adaptation of the Vert.x Micrometer pool metrics implementation to follow the Quarkus conventions.
Also includes
- version management of microprofile-openapi-api at version 2.0.1
- Jakarta rewrite version management of microprofile-openapi-api at
version 3.0
And also allows to not include the default content with a particular
extension.
….10.1

Upgrade Maven Compiler Plugin to 3.10.1

// Connection properties
public static final String INFINISPAN_SERVER_LIST = "serverlist";
public static final String INFINISPAN_USE_AUTH = "useauth";
Copy link

@ryanemerson ryanemerson Dec 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just auth and the value specified in this file could then be used to determine the auth mechanism to use in the future? If the value is false, then we set use-auth=false.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the evolution should go into the extension configuration too so both are equivalent. something to think about

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intent of ServiceBinding is not to provide a 1-1 mapping between files and the existing properties so I don't this needs to be the same tbh. A ServiceBinding secret containing the file mappings can either be explicitly created by a user, or more likely, will be provisioned by a ServiceBinding provider (Infinispan operator). So only providing mappings for a small number of bindings is fine as long as the server connection can be established.

public static final String BINDING_CONFIG_SOURCE_NAME = BINDING_TYPE + "-k8s-service-binding-source";

// Connection properties
public static final String INFINISPAN_SERVER_LIST = "serverlist";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just use the uri binding key now and use it's value to set the server-list property. The HotRodURI class can be used to parse the string and extract the addresses of the server.

Of course we can sitll add the serverlist binding, but uri is one of the well known keys proposed in the spec. It also means it's one less thing to deprecate/communicate when deprecating server-list in favour of uri in the application.properties.

The HotRodURI class also extracts the user/password combo, so we can set those properties from the uri binding if present.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will use url and pass this PR after the deprecation, but I did it before so that's why I used serverList
In any case, my issue is I don't know how to validate this

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can test by setting the quarkus.kubernetes-service-binding.root=/tmp property, you then need to create a file structure containing the servicebinding files, e.g:

/tmp/infinispan
├── username
├── password
└── type

Where each file contains the value associated with the filename.

If the ServiceBinding converter is working as expected, then the Infinispan client's properties should be configured with the values in those files.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did that, but in which environment did you do that ?

Copy link
Owner Author

@karesti karesti Dec 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

locally it does not work and I asked someone in the Quarkus team that worked on the Kafka one and he has told me I need to do it in kube deployment. which is totally fine, I just need to know if you could test it somewhere else or with kind/minikube + operator locally or how. thanks a lot Ryan! :))) before this PR in any case first we need to deprecate serverList

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did that, but in which environment did you do that ?

Just on my local dev machine.

Looking at the PR, I think I know why it didn't work.

You need to define the io.quarkus.kubernetes.service.binding.runtime.ServiceBindingConverter implementation as a Service in src/resources/META-INF/services/io.quarkus.kubernetes.service.binding.runtime.ServiceBindingConverter

https://github.com/gingersnap-project/db-syncer/blob/ae9ba3643b59d2dab87767983cad83d5fd290f96/src/main/resources/META-INF/services/io.quarkus.kubernetes.service.binding.runtime.ServiceBindingConverter#L3-L2

mkouba and others added 10 commits December 13, 2022 14:53
- make it possible to call other session scoped beans in a pre-destroy
callback; note that it's not recommended but it's not forbidden either
- resolves quarkusio#29783
Deprecate `@ServerRequestFilter(withBody)` in favour of `@WithFormRead`
…ed-auth-allow-disable-redirect

Improve Form based authentication with single-page application
Preparation for quarkusio/quarkus-github-bot#299

Also simplifies a couple of redundant rules.
Add id in quarkus-github-bot.yml rules
Introduce proper property name for controlling IT profile
Bump smallrye-open-api from 2.3.1 to 3.1.1
Bumps `artemis.version` from 2.27.0 to 2.27.1.

Updates `artemis-server` from 2.27.0 to 2.27.1
- [Release notes](https://github.com/apache/activemq-artemis/releases)
- [Commits](apache/activemq-artemis@2.27.0...2.27.1)

Updates `artemis-amqp-protocol` from 2.27.0 to 2.27.1

---
updated-dependencies:
- dependency-name: org.apache.activemq:artemis-server
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.activemq:artemis-amqp-protocol
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
geoand and others added 27 commits December 21, 2022 08:21
The behavior is now the same as RESTEasy Classic

Fixes: quarkusio#29983
…evtools/gradle/com.gradle.enterprise-3.12.1
Fix erroneous resource matching in RESTEasy Reactive
Improve header in README.md based on name and description
Do not set get action port to null in custom resources for Knative
Fix quarkusio#29885
Plus, this pull request also resolves an ambiguous bean resolution when injecting these resources.
…e-rule-dec22

Fix Quarkus Vale linter warning on words 'UNIX', 'Redis', and 'using'
…ction-runner

Introduce QuarkusTransaction#runner
…lowed-config-property-expression-lang

Support Smallrye Config property expression expansion for @RolesAllowed value
Fix AbstractMethodError when injecting generated resource
…s-client

Bump kubernetes-client-bom from 6.2.0 to 6.3.1
com.sun.xml.internal.bind.v2.ContextFactory is not available in Java > 8

Co-authored-by: Nicolas Filotto <[email protected]>
Bumps [docker-maven-plugin](https://github.com/fabric8io/docker-maven-plugin) from 0.40.2 to 0.40.3.
- [Release notes](https://github.com/fabric8io/docker-maven-plugin/releases)
- [Changelog](https://github.com/fabric8io/docker-maven-plugin/blob/master/doc/changelog.md)
- [Commits](fabric8io/docker-maven-plugin@v0.40.2...v0.40.3)

---
updated-dependencies:
- dependency-name: io.fabric8:docker-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
…ection

Add reflection configuration for JDK provided LoginModules
…-8-reflection-registrations

Remove reflective class registrations for Java 8
…ages-return

Fix broken Feature#runtimeInitializedPackages method
…bled

Do not support any Origin by default if CORS is enabled
….fabric8-docker-maven-plugin-0.40.3

Bump docker-maven-plugin from 0.40.2 to 0.40.3
…e-30011

Prevent repeated Quarkus Security exception handling that lead to duplicate headers during OIDC redirect
* Infinispan 14.0.4.Final
* Protostream 4.5.1.Final
* Deprecate serverList for hosts (consistency with other extensions)
* Deprecate authUsername for username
* Deprecate authPassowrd for password
* Provide uri connection configuration
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.