This is an example of operator development using the Kubebuilder operator framework.
Detailed explanation of this project can be found here
AbstractWorkload
- is a Kubernetes CRD which serve as an abstraction for stateless and stateful applications.
apiVersion: examples.itamar.marom/v1alpha1
kind: AbstractWorkload
metadata:
name:
spec:
containerImage: # Container Image to deploy
replicas: # Number of replicas to deploy
workloadType: # stateful / stateless
apiVersion: examples.itamar.marom/v1alpha1
kind: AbstractWorkload
metadata:
name: test-stateless
spec:
containerImage: "nginx:latest"
replicas: 2
workloadType: stateless
apiVersion: examples.itamar.marom/v1alpha1
kind: AbstractWorkload
metadata:
name: test-stateful
spec:
containerImage: "nginx:latest"
replicas: 1
workloadType: stateful