Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(etcd-operator): Remove kausal from root element #480

Merged

Commits on Feb 26, 2021

  1. refactor(etcd-operator): Remove kausal from root element

    Instead, declare it explicitly, because it is an implementation detail
    that is leaking to the consumers of the libraries, polluting the root
    element.
    
    Particularly, this solves one use case, which is importing
    `etcd_cluster`:
    
    ```
    local etcd_cluster = import 'etcd-operator/etcd-cluster.libsonnet';
    
    {
      etcd_cluster: etcd_cluster.etcd_cluster('etcd')
    }
    ```
    
    won't work if kausal is not available on the root element.
    
    To solve that we would need to do:
    
    ```
    local etcd_cluster = import 'etcd-operator/etcd-cluster.libsonnet';
    local k = import 'ksonnet-util/kausal.libsonnet';
    
    {
      etcd_cluster: (k + etcd_cluster).etcd_cluster('etcd')
    }
    ```
    
    For what is worth, that behaviour was not present when importing
    'etcd-operator/etcd-operator.libsonnet'.
    jvrplmlmn committed Feb 26, 2021
    Configuration menu
    Copy the full SHA
    06a135a View commit details
    Browse the repository at this point in the history