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
Roadmap 2025/01 Default excludedFields ConfigMaps.
As the Platform Engineer of my team, I want to set defaults excludedFields ConfigMaps that will be applied for all of the RemoteSyncers of the cluster.
What to do
1. Check for the env var
In the convertToYaml() function, add some lines that check for all configmaps in the namespace where Syngit is installed (os.Getenv("MANAGER_NAMESPACE")) which has the syngit.io/cluster-default-excluded-fields: "true" label (using wrc.k8sClient).
2. Move the excludedFields remover block into a function
Move the following block into a function because it will be used twice. 1. For the remoteSyncer.Spec.ExcludedFieldsConfigMapRef (is specified) & 2. For the default excluded fields (if some exist).
Roadmap 2025/01 Default
excludedFields
ConfigMaps.As the Platform Engineer of my team, I want to set defaults
excludedFields
ConfigMaps that will be applied for all of theRemoteSyncers
of the cluster.What to do
1. Check for the env var
In the
convertToYaml()
function, add some lines that check for all configmaps in the namespace where Syngit is installed (os.Getenv("MANAGER_NAMESPACE")
) which has thesyngit.io/cluster-default-excluded-fields: "true"
label (usingwrc.k8sClient
).2. Move the excludedFields remover block into a function
Move the following block into a function because it will be used twice. 1. For the
remoteSyncer.Spec.ExcludedFieldsConfigMapRef
(is specified) & 2. For the default excluded fields (if some exist).syngit/internal/controller/webhook_request_checker.go
Lines 376 to 397 in 8442bb1
The function signature:
The function call:
In the function, search for the key
excludedFields
in the ConfigMap..3. Check for the excluded fields
For each ConfigMaps (with the correct label) retrieved, call the function.
4. Update the chart
Go to the latest chart version https://github.com/syngit-org/syngit/tree/main/charts. Create a
config
folder and create the ConfigMap.Add a
.config.defaultExcludedFields.enabled: true
to thevalues.yaml
.Additional context
If you have any questions, please tag @damsien.
The text was updated successfully, but these errors were encountered: