GitLab has strong Kubernetes integration. Unfortunately, GitLab has its own idea of how apps are deployed in the cluster. This is not necessarily the method of choice, especially for existing clusters. But you can reach your goal very easily without the existing integration. And with RBAC you can secure your CI job so that it is not allowed to do more than is absolutely necessary.
First we need a deployment (configurations for service, ingress, etc. omitted).
The name of the deployment
my-app is important, we will need that later.
In order for GitLab to have access to the deployment, we have to create a
ServieAccount and set up the necessary authorizations. …
If you create a Java application with the Gradle Application Plugin, you will sooner or later encounter the problem that the application can not be started under Windows.
The error message:
command line too long
This limitation is documented in Windows Help.
But why does the error occur at all? (Needless to say, Microsoft just can not get it to develop a working OS?)
The problem can be found in Gradle’s Starter Script. It builds a
CLASSPATH environment variable that contains the paths to all dependent JARs.
It will look like that:
It’s clear that this variable gets bigger as the application gets more dependencies. The variable is then simply appended to the Java command as a
-classpath parameter. …
Normally one would use the SLF4J LoggerFactory and give it a Java class. Unfortunately, you can not directly pass the Kotlin class (KClass), but still have to add a .java. That makes the whole line somehow ugly.
With an extension function you can make the whole more beautiful and expressive.
From now on you can create a new logger with