Feature Description
Problem Statement:
Kubernetes clusters contain global state, such as Cluster Name, Kubernetes Version, Network CIDRs, etc. This state would be broadly useful for RGD authors to reduce undifferentiated parameterization of their APIs.
For example, ACK/EKS requires cluster name in the spec when configuring a PodIdentity resource. This introduces needless complexity for RGD authors who aim to distribute the same configurations across clusters -- clusterName must be parameterized. This pattern occurs broadly in the Kubernetes ecosystem, e.g. Karpenter's SubnetSelector and SecurityGroupSelector or any Helm Chart that changes behavior based on Kubernetes Version
One design path to achieve this would be to configure the KRO process with a set of environment variables (i.e. KRO_GLOBAL_XXX) that are automatically injected into the CEL runtime. They could be validated by the RGD validator to avoid misbehavior when values are not defined. When KRO is restarted with new variables, the changes would be propagated through the graph. Platforms that provide KRO as a service (e.g. EKS) could inject arbitrary domain specific globals that are relevant to their domain.
Open questions
- When should data be a variable be a Global vs sourced from an ExternalRef?
- How much type flexibility might we want in globals (e.g. lists/structs)?
- Please vote on this issue by adding a 👍 reaction to the original issue
- If you are interested in working on this feature, please leave a comment
Feature Description
Problem Statement:
Kubernetes clusters contain global state, such as Cluster Name, Kubernetes Version, Network CIDRs, etc. This state would be broadly useful for RGD authors to reduce undifferentiated parameterization of their APIs.
For example, ACK/EKS requires cluster name in the spec when configuring a PodIdentity resource. This introduces needless complexity for RGD authors who aim to distribute the same configurations across clusters -- clusterName must be parameterized. This pattern occurs broadly in the Kubernetes ecosystem, e.g. Karpenter's SubnetSelector and SecurityGroupSelector or any Helm Chart that changes behavior based on Kubernetes Version
One design path to achieve this would be to configure the KRO process with a set of environment variables (i.e. KRO_GLOBAL_XXX) that are automatically injected into the CEL runtime. They could be validated by the RGD validator to avoid misbehavior when values are not defined. When KRO is restarted with new variables, the changes would be propagated through the graph. Platforms that provide KRO as a service (e.g. EKS) could inject arbitrary domain specific globals that are relevant to their domain.
Open questions