You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have experience working with Helm charts, where I frequently read and write YAML files to define Kubernetes resources. Recently, I’ve been working on creating an operator with KubeOps, and in that process, I realized that having a method like ApplyInlineYaml and DeleteInlineYaml in the C# Kubernetes client would make it much easier to follow exactly what is being created and deleted.
While it is not difficult to read C# code and understand how it is converted into YAML, it would be much more intuitive (at least for me) if I could define my resources using inline YAML. This would simplify the process of defining and managing resources directly in the code, reducing the mental overhead of mapping between C# objects and their YAML representations.
Proposal
Adding two new methods to the IKubernetes interface:
ApplyInlineYaml: This method would allow users to apply Kubernetes resources defined as YAML strings directly to a cluster. DeleteInlineYaml: This method would allow users to delete Kubernetes resources defined as YAML strings directly from a cluster.
There is already an example in the official C# Kubernetes client repository (Program.cs) that demonstrates how to load and apply Kubernetes resources from YAML. This approach works, but it is not ideal for operator development, where the simplicity of applying or deleting resources from inline YAML would be more efficient. Simplifying this process into a single method call for each action (apply and delete) would streamline workflows, especially in operator development.
The text was updated successfully, but these errors were encountered:
Background
I have experience working with Helm charts, where I frequently read and write YAML files to define Kubernetes resources. Recently, I’ve been working on creating an operator with KubeOps, and in that process, I realized that having a method like ApplyInlineYaml and DeleteInlineYaml in the C# Kubernetes client would make it much easier to follow exactly what is being created and deleted.
While it is not difficult to read C# code and understand how it is converted into YAML, it would be much more intuitive (at least for me) if I could define my resources using inline YAML. This would simplify the process of defining and managing resources directly in the code, reducing the mental overhead of mapping between C# objects and their YAML representations.
Proposal
Adding two new methods to the IKubernetes interface:
ApplyInlineYaml
: This method would allow users to apply Kubernetes resources defined as YAML strings directly to a cluster.DeleteInlineYaml
: This method would allow users to delete Kubernetes resources defined as YAML strings directly from a cluster.Example Usage
Existing Example:
There is already an example in the official C# Kubernetes client repository (Program.cs) that demonstrates how to load and apply Kubernetes resources from YAML. This approach works, but it is not ideal for operator development, where the simplicity of applying or deleting resources from inline YAML would be more efficient. Simplifying this process into a single method call for each action (apply and delete) would streamline workflows, especially in operator development.
The text was updated successfully, but these errors were encountered: