Replies: 1 comment 1 reply
-
Not familiar with Kubernetes. But a quick glance at some of the linked documentation suggests that we could have a set of objects representing e.g. the different types of resources (such as PVC in your example) with a public predicate that would take the configurable parameter values and generate the corresponding YAML fragment. Given the number of tools that are available to work with Kubernetes, it would be interesting to know of any pain points that could be solved or at least alleviated using a more declarative, logic programming approach. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I've been working lately a lot with YAML files and started wondering if it'd make sense to create a library that would convert Logtalk code to YAML, as a way to generate long YAML files in a more automatic/optimal way.
I know that there's more or less the opposite (YAML to Prolog parsers).
As it's probably known, YAML is a declarative markup language used heavily in the kubernetes (k8s) space for configuration/specification files.
Here is an example of a specification of a typical Kubernetes resource called PersistentVolumeClaim (PVC). Pretty much with this the user/admin makes a claim to the kubernetes cluster for a PersistentVolume to be allocated, according to the parameters defined in the PVC yaml file:
Pushing the question even further, do you think it'd make sense to create an operator framework in Logtalk? I've been working lately in creating event-based software (operators) that run on Kubernetes.
These "operators" work as "guards" in a container inside k8s and make sure that certain things that are specified in the operator have the desired behavior.
The operator framework what it does is that one defines the Resources (custom or not) that the operator has to operate on, and if it's a custom resource then a custom API gets created that interracts with the k8s API. The framework generates all the necessary YAML files, so this is where the previous project/library could be used.
A somewhat popular operator framework in golang is kubebuilder if you want to have a look for a static typed OOP C-like language-based framework.
But since Logtalk supports event-based programming, I believe it should be possible to create an operator framework in Logtalk, and also that perhaps it would be more productive/efficient to work with it than with a framework based on golang.
Sharing here after the gentle suggestion of Paulo.
Feel free to share your thoughts, comments etc.
Michail
Beta Was this translation helpful? Give feedback.
All reactions