rstudio / helm

Helm Resources for RStudio Products
MIT License
35 stars 28 forks source link

workbench launcher.kubernetes.profiles.conf order in yaml doesn't matter, in configuration file its in alphabetical order #415

Open samssann opened 1 year ago

samssann commented 1 year ago

In my values.yaml file I have the following configuration:

  profiles:
    launcher.kubernetes.profiles.conf:
      "*":
        allow-unknown-images: 0
        allow-custom-resources: 0
        resource-profiles: small
      "@rsw_user":
        resource-profiles: small
        allow-unknown-images: 0
      "@rsw_power":
        resource-profiles: small,power
        allow-unknown-images: 0
      "@rsw_advanced":
        resource-profiles: small,power,advanced
        allow-unknown-images: 1
        allow-custom-resources: 1

If i've understood correctly, the basic idea is that these configurations are iterated from top to bottom, so that the configurations in bottom override configurations in the top. say a user belongs to group rsw_user and rsw_advanced. this way the user should have the permissions defined in rsw_advanced. somehow however, the configuration file which is passed on to the workbench pod via configmap gets sorted in alphabetical order. meaning that in the configuration file, the order becomes: *, rsw_advanced, rsw_power, rsw_user.

colearendt commented 1 year ago

😭 Indeed. This is a real tragedy.

Discussed here with a few very less-than-ideal workarounds 😞

https://github.com/rstudio/helm/issues/336