aerokube / charts

Aerokube Helm Charts Repository
https://charts.aerokube.com/
Apache License 2.0
12 stars 35 forks source link

allow disabling the creation of namespaces defined in quotas #220

Closed croemmich closed 1 year ago

croemmich commented 1 year ago

In our environment, namespaces are provisioned from information pulled from our IAM system. This causes conflicts with the moon2 chart which expects to be able to make the namespace referenced in the quota values, which will already exist.

This PR adds a createNamespace boolean value to each quota definition that allows for disabling the creation of the namespace. The value defaults to true to maintain backwards compatibility for users who do not set the value.

In the following example, the alpha namespace will NOT be created and the beta and gamma namespaces WILL be created:

quota:
  moon: null
  alpha-team:
    namespace: alpha
    createNamespace: false
  beta-team:
    namespace: beta
    createNamespace: true
  gamma-team:
    namespace: gamma
vania-pooh commented 1 year ago

@aandryashin please take a look.

vania-pooh commented 1 year ago

@croemmich this PR changes our default logic because createNamespace default value is false, so by default namespace will not be created. We'll implement this ourselves in https://github.com/aerokube/charts/issues/221.

croemmich commented 1 year ago

Sounds good, thanks!

When I tested it, the default value was null rather than false so this worked as intended.

vania-pooh commented 1 year ago

Implemented in https://github.com/aerokube/charts/pull/226.