Yupiik chords is a simple Java application, it has several flavors but all are based on Java capabilities.

Standalone

It is a matter of creating the right java command: java -cp $classpath io.yupiik.fusion.framework.api.main.CliLauncher $args.

The classpath is composed of these dependencies:

  • io.yupiik.kubernetes.chords:core:1.0-SNAPSHOT
  • io.yupiik.fusion:fusion-api:1.0.34-SNAPSHOT:jar
  • io.yupiik.fusion:fusion-cli:1.0.34-SNAPSHOT:jar
  • io.yupiik.fusion:fusion-httpclient:1.0.34-SNAPSHOT:jar
  • io.yupiik.fusion:fusion-json:1.0.34-SNAPSHOT:jar
  • io.yupiik.fusion:fusion-kubernetes-client:1.0.34-SNAPSHOT:jar
  • io.yupiik.kubernetes:kubernetes-java-1.35.x:1.0.2-SNAPSHOT:jar:versionless
  • io.yupiik.kubernetes.chords:api:1.0-SNAPSHOT:jar
  • io.yupiik.logging:yupiik-logging-jul:1.0.8:jar

So it can look to:

java \
 -cp "core-1.0-SNAPSHOT.jar::fusion-api-1.0.34-SNAPSHOT.jar:fusion-cli-1.0.34-SNAPSHOT.jar:fusion-httpclient-1.0.34-SNAPSHOT.jar:fusion-json-1.0.34-SNAPSHOT.jar:fusion-kubernetes-client-1.0.34-SNAPSHOT.jar:kubernetes-java-1.35.x-1.0.2-SNAPSHOT-versionless.jar:api-1.0-SNAPSHOT.jar:yupiik-logging-jul-1.0.8.jar" \
 io.yupiik.fusion.framework.api.main.CliLauncher \
 reconcile \
 ....

or if you put all libraries in lib/ folder: java -cp lib/*.jar io.yupiik.fusion.framework.api.main.CliLauncher $args.

TIP

all libraries are available on maven central .

Kubernetes

It is recommended to configure the reconcile command as a CronJob which can't be concurrent:

apiVersion: batch/v1
kind: CronJob
metadata:
  name: chords-reconcilier
spec:
  schedule: "*/5 * * * *"
  concurrencyPolicy: Forbid
  successfulJobsHistoryLimit: 20
  failedJobsHistoryLimit: 20
  jobTemplate:
    spec:
      backoffLimit: 1
      template:
        spec:
          restartPolicy: Never
          containers:
            - name: reconcile
              image: ossyupiik/chords:1.0-SNAPSHOT
              imagePullPolicy: IfNotPresent
              envFrom:
                - configMapRef:
                    name: chords-reconcilier-config
              volumeMounts:
                - name: dags
                  mountPath: /opt/dags
                  readOnly: true
          volumes:
            - name: dags
              configMap:
                name: chords-reconcilier-dags
TIP

chords-reconcilier-config ConfigMap will use environment configuration from configuration page.

TIP

as explained in configuration page, it is more convenient to put the descriptors in files cause easier to write than inline in the environment, in such a case you will mount another ConfigMap and reference them from this ConfigMap containing the list of descriptors. It is common to call it chords-reconcilier-dags.

IMPORTANT

do not forget for production to harness your container (securityContext).

BundleBee

Since deploying to Kubernetes is simply deploying a CronJob, you can use Yupiik BundleBee to package and make your deployment configurable. Project provides out of the box an alveolus for BundleBee.

Others

Similarly to Yupiik BundleBee, Helm and Kustomize are options to deploy Yupiik Chords.