YAKC - Yet Another Kubernetes Client
Introduction In this example, I will show you how to access the Kubernetes cluster’s REST API from inside a Pod using YAKC (Yet Another Kubernetes Client), Eclipse JKube and Spring Boot. In the first part of the tutorial I’ll show how to create a very simple Spring Boot application with the required YAKC Kubernetes Client dependency (see the introductory post for YAKC). Next you’ll see how to quickly deploy the application into a Kubernetes cluster. I will also show you how to perform requests to the Pod’s exposed REST endpoints to retrieve information from the cluster. Example application The first […]

Access the Kuberntes API from a Pod in Java

YAKC - Yet Another Kubernetes Client
Introduction As some of you may know, I’m a proud member of the team maintaining Fabric8 Kubernetes Client (for a while now). Fabric8 is one of the most popular Java clients for Kubernetes and OpenShift. Fabric8 Kubernetes Client is great because it allows to perform most of the kubectl supported operations from Java with a very neat and fluent API. However, accessing low-level REST API operations or specific API versions is hard because some of these decisions are taken for you (for now). This is the main reason that drove me to implement Yet Another Kubernetes Client (YAKC) as a […]

Kubernetes Client for Java: Introducing YAKC

GitHub Actions 1
Introduction In this post, I’ll show you how one GitHub Actions workflow from a repository can invoke a workflow from a different repository. The first part describes the different events that can trigger a workflow, focusing on the repository_dispatch event. The second part is a practical example showing how two repositories trigger their workflows mutually. Events that trigger workflows As you may already know, there are several events that can trigger a GitHub Actions workflow execution. The most common events that can trigger this execution are push, pull_request and schedule. These events cover most of the use cases, as regularly […]

Triggering GitHub Actions across different repositories

Quarkus + GraalVM + Fabric8 Maven Plugin 2
Introduction In this tutorial, we’ll see how to develop and integrate a very simple Quarkus application with Fabric8 Maven Plugin in order to publish a native GraalVM image into Docker Hub. The first part of the tutorial describes how to build a very simple Quarkus application. The next part describes how to build a Quarkus native executable with GraalVM. The last section shows how to integrate the project with Fabric8 Maven Plugin and how to deploy the application images into Docker Hub. Quarkus example application This section describes how to build a simple application that will return a random quote […]

Quarkus + Fabric8 Maven Plugin + GraalVM integration

Isotope + Kuberentes
Introduction Isotope mail client is a free open source webmail application and one of the side projects in which I invested my spare time during the last year. You can read more about Isotope’s features in a previous blog post. Although there is still no official release, the application is quite stable and usable. In this post, I will show you how to deploy the application to a Kubernetes cluster. For the purpose of the tutorial I’ve used minikube + kubectl, but the same steps should be reproducible in a real K8s cluster. Traefik v1 Despite it’s not part of […]

Isotope Mail: How to deploy Isotope+Traefik into Kubernetes

What is Cinnamon? Cinnamon is a free desktop environment derived from GNOME 3, and the principal desktop environment for the Linux Mint distribution (And also my personal favorite). Fedora 30 comes with GNOME as the default X Window System desktop environment, however, there is a spin which is a variation of the official Fedora distribution with Cinnamon as the default desktop environment. Although you can download the Cinnamon spin, in this blog post we’ll see how to install the necessary packages to easily deploy Cinnamon in your system as the default desktop environment for the standard Fedora distribution. Install Cinnamon […]

Fedora: How to install Cinnamon desktop environment

Webpack ReactJS Gatsby
Introduction Gatsby is static site generator platform based in ReactJS and powered by GraphQL. I’ve been using Gatsby for a while now and most recently used it to rebuild my personal homepage. One of the things that has come to my attention is that transpiled Javascript source maps are published to production builds by default in V2. It’s nice to be transparent and to publish your source code and share with the software community, but maybe this is an undesirable effect (especially when building commercial websites). In this post we’ll see how we can configure Gatsby to publish source maps […]

Gatsby: Disable source maps in production

react webpack babel sass mn
Introduction Babel 7 comes after more than 2 years of active development and four thousand commits. The main advantage of the new version is the speed optimizations and configuration flexibility. In this tutorial we’ll see how to upgrade our React boilerplate application to support Babel 7. Bebel dependencies The first step in order to support Babel 7 is to replace our old dependencies in package.json: [crayon-60086c815e6da049141065/] with new ones: [crayon-60086c815e6e4302653861/] The main change compared to the older version is Babel’s switch to scoped packages. To summarize, from now on most of the packages named with the prefix babel- will now be named […]

React: Babel 7 support in boilerplate application

Isotope Mail Client 4
Introduction Isotope mail client is a free open source webmail application built with a microservice architecture vision in mind. As of now, the application is just an MVP offering the basic functionalities of any standard webmail client. The main purpose of this application is to personally expose, explore and learn new technologies, and development and design patterns. However, the application should be fully functional and solve many of the problems that other mail clients face. Features No database required Quick and easy deployment (docker images and deployment examples available) Rich text message editing Support for embedded images (paste into editor) Recipient […]

Isotope Mail Client: Introduction and features

react webpack babel sass mn 3
Introduction In this tutorial we’ll see how to build from scratch a React application with Webpack, Babel and Sass. The main requirement for this tutorial is to have a node installation with npm for your platform/OS. The tutorial is structured in several parts: Create an initial project directory Webpack setup Babel setup React Add support for Sass styles Initial project The first step is to create an initial empty project. For that purpose we’ll create an empty directory for the project and run the following command: [crayon-60086c8160ef4791846448/] This command will set up a new package.json file containing metadata for an […]

React : Babel + Webpack + Sass boilerplate application

Test Pyramid
Introduction In this post we’ll see how to use MockMvc to test Spring endpoints. This is the first post of a series, this post will highlight the advantages of using Spring MVC test framework compared to other ways of testing controller classes and what are the different ways to setup your tests. You can find the source code for this post at GitHub. The project contains a regular MVC controller that forwards requests to a static resource, and two rest controllers that return a list of languages and coffees. MockMvc and the test pyramid In his book, Succeeding with Agile: […]

MockMvc – Spring MVC testing framework introduction: Testing Spring endpoints

Introduction This is the second post on the series about Spring Bean Scopes. In the previous tutorial we saw that there were issues rising when a Prototype scoped Bean was injected in a Singleton scoped Bean. The main problem is that autowired Prototypes will be injected when the Singleton Bean is instantiated (which happens only once) thus even though they are prototypes in reality they’ll behave as singletons. The next code highlights this behavior: [crayon-60086c816391f326166804/] In the previous example, although the object requested with getAutowiredSample is defined with a Prototype scoped Bean, the instance of the object returned in both […]

Spring Bean Scopes: Singleton with Prototypes