Please first look at CRD Operator documentation. It contains more common information, which is applicable to ConfigMap operator too.
ConfigMap is a native resource, so that no custom definition needs to be created in Kubernetes before we start creating
ConfigMap option, our target custom resource will look like this:
Please note, above
data.config section does not define any Custom Resources in terms of Kubernetes, we just leverage
ConfigMap to emulate custom resource.
There are 3 steps to implement ConfigMap Operator:
CmController class adds
isSupported method, which allows to skip particular ConfigMaps if they do not
satisfy to logical condition.
ConfigMapHelper provides the same functionality as
CrdHelper, but with respect to ConfigMap kind:
currentConfigMaps - a method to return current current ConfigMap resources based on passed earlier Operator
freya.Configuration.ConfigMapConfig- configuration which is passed on operator construction
io.fabric8.kubernetes.client.KubernetesClient- K8s client
Option[Boolean]- isOpenShift property
freya.resource.ConfigMapParser- ConfigMap parser to parse
configkey of data map to target