Skip to content

swim-developer/swim-kubernetes-operator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

SWIM Kubernetes Operator

⚠️ Code Under Review — This repository is part of a reference implementation currently under technical review. Source code will be available soon.

Kubernetes Operator for deploying SWIM DNOTAM components on any Kubernetes cluster. Provides the same Custom Resources as the OpenShift variant but uses standard Kubernetes primitives (Ingress, generic storage classes) for maximum portability.

Looking for enterprise support? The swim-openshift-operator leverages Red Hat's certified operators, enterprise middleware, and OpenShift-native capabilities for production environments requiring vendor accountability.

Overview

This operator manages the complete lifecycle of SWIM DNOTAM components using Custom Resources. One CR deploys the full stack: application, database, message broker, certificates, and ingress.

Custom Resource Definitions

CRD Short Name Description
SwimDigitalNotamProvider sdnp Complete DNOTAM Provider stack
SwimDigitalNotamConsumer sdnc Complete DNOTAM Consumer stack
SwimDnotamMockServer sdms AISP simulation for testing
SwimDnotamMockClient sdmc Interactive test client

OpenShift vs Kubernetes Operator

Feature Kubernetes Operator OpenShift Operator
Installation Helm / Kustomize OLM (Operator Lifecycle Manager)
Ingress Kubernetes Ingress OpenShift Routes
Message Broker Community Artemis Red Hat AMQ (supported)
Kafka Community Strimzi AMQ Streams (supported)
Enterprise Support Community Red Hat
Target Any K8s 1.24+ OpenShift 4.12+

Prerequisites

  • Kubernetes 1.24+
  • cert-manager
  • Ingress Controller (nginx, traefik, etc.)
  • Strimzi Kafka Operator (for Provider/Consumer)
  • Helm 3.x (for Helm installation)

Installation

Via Helm (Recommended)

helm install swim-operator ./charts/swim-kubernetes-operator
--namespace swim-operator-system
--create-namespace
--set image.repository=quay.io/masales/swim-kubernetes-operator
--set image.tag=latest

Via Kustomize

Install CRDs

make install

Deploy operator

make deploy IMG=quay.io/masales/swim-kubernetes-operator:latest

Full Installation (Build + Deploy)

make install-full IMG=quay.io/yourorg/swim-kubernetes-operator:tag

Quick Start

Deploy MockServer

apiVersion: apps.swim-developer.github.io/v1alpha1
kind: SwimDnotamMockServer
metadata:
  name: mockserver
spec:
  certManager:
    issuerName: swim-ca-issuer
    issuerKind: ClusterIssuer
  appConfig:
    amqp:
      username: admin
      password: admin
  replicaCount: 1

Deploy Provider

apiVersion: apps.swim-developer.github.io/v1alpha1
kind: SwimDigitalNotamProvider
metadata:
  name: swim-dnotam-provider
spec:
  certManager:
    issuerName: swim-ca-issuer
  postgres:
    database: swim-dnotam
    user: swim
    password: swim
  artemis:
    adminUser: admin
    adminPassword: admin

Deploy Consumer

apiVersion: apps.swim-developer.github.io/v1alpha1
kind: SwimDigitalNotamConsumer
metadata:
  name: swim-dnotam-consumer
spec:
  certManager:
    issuerName: swim-ca-issuer
  client:
    config:
      swimServiceBaseURL: "https://provider-api.example.com"
      amqpBrokerHost: "broker.example.com"
      amqpBrokerPort: 5671

Deploy MockClient

apiVersion: apps.swim-developer.github.io/v1alpha1
kind: SwimDnotamMockClient
metadata:
  name: dnotam-mockclient
spec:
  keycloak:
    url: "https://keycloak.example.com/"
    realm: swim
    clientId: swim-public-client
  providerAPIURLs: "https://provider-api.example.com"
  amqp:
    host: "broker.example.com"
    port: 5671

Standards Alignment

Standard Status
SWIM-TI Yellow Profile ✅ Implemented, ⏳ Pending Validation
cert-manager Integration ✅ Implemented
Helm Chart Distribution ✅ Implemented
HorizontalPodAutoscaler ✅ Implemented

Technology Stack

  • Language: Go 1.24+
  • Framework: Kubebuilder
  • Distribution: Helm Chart / Kustomize
  • API Version: apps.swim-developer.github.io/v1alpha1

Development

Run locally

make run

Run tests

make test

Build image

make docker-build IMG=quay.io/yourorg/swim-kubernetes-operator:tag

Push image

make docker-push IMG=quay.io/yourorg/swim-kubernetes-operator:tag

Cleanup

Full cleanup (CRs + CRDs + operator)

make cleanup-full

Or step by step

kubectl delete swimdnotammockserver --all
kubectl delete swimdigitalnotamprovider --all
kubectl delete swimdigitalnotamconsumer --all
kubectl delete swimdnotammockclient --all
make undeploy
make uninstall

License

BSD 3-Clause License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published