diff --git a/deploy/concierge/values.yaml b/deploy/concierge/values.yaml index 7bbfbfcd7..5964abb97 100644 --- a/deploy/concierge/values.yaml +++ b/deploy/concierge/values.yaml @@ -31,8 +31,20 @@ into_namespace: "" #@ not assume that there was a static install-time yaml namespace." #@schema/desc custom_labels_desc #@schema/examples ("Example set of labels", {"myCustomLabelName": "myCustomLabelValue", "otherCustomLabelName": "otherCustomLabelValue"}) +#@ def validate_labels(labels): +#@ """ +#@ Returns True if labels is an associative data structure string→string, +#@ and False otherwise. +#@ """ +#@ for label in labels: +#@ if type(label) != "string" or type(labels[label]) != "string": +#@ return False +#@ end +#@ end +#@ return True +#@ end #@schema/type any=True -#@schema/validation ("a map of keys and values", lambda v: type(v) in ["yamlfragment"]) +#@schema/validation ("a map of keys and values", validate_labels) custom_labels: {} #@schema/title "Replicas" diff --git a/deploy/supervisor/values.yaml b/deploy/supervisor/values.yaml index 8cf5e928f..223515ef1 100644 --- a/deploy/supervisor/values.yaml +++ b/deploy/supervisor/values.yaml @@ -31,8 +31,20 @@ into_namespace: "" #@ not assume that there was a static install-time yaml namespace." #@schema/desc custom_labels_desc #@schema/examples ("Example set of labels", {"myCustomLabelName": "myCustomLabelValue", "otherCustomLabelName": "otherCustomLabelValue"}) +#@ def validate_labels(labels): +#@ """ +#@ Returns True if labels is an associative data structure string→string, +#@ and False otherwise. +#@ """ +#@ for label in labels: +#@ if type(label) != "string" or type(labels[label]) != "string": +#@ return False +#@ end +#@ end +#@ return True +#@ end #@schema/type any=True -#@schema/validation ("a map of keys and values", lambda v: type(v) in ["yamlfragment"]) +#@schema/validation ("a map of keys and values", validate_labels) custom_labels: {} #@schema/title "Replicas"