diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index b024d92..1e3e140 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -25,8 +25,12 @@ spec: value: "{{ .Values.manageClaimsInterval }}" - name: MANAGE_HANDLES_INTERVAL value: "{{ .Values.manageHandlesInterval }}" + - name: MANAGE_POOLS_INTERVAL + value: "{{ .Values.managePoolsInterval }}" - name: OPERATOR_DOMAIN value: {{ include "poolboy.operatorDomain" . }} + - name: RESOURCE_REFRESH_INTERVAL + value: "{{ .Values.resourceRefreshInterval }}" image: "{{ include "poolboy.image" . }}" imagePullPolicy: {{ .Values.image.pullPolicy }} resources: diff --git a/helm/values.yaml b/helm/values.yaml index b215b30..f2862c9 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -22,6 +22,8 @@ operatorDomain: manageClaimsInterval: 60 manageHandlesInterval: 60 +managePoolsInterval: 10 +resourceRefreshInterval: 600 anarchy: # Control whether anarchy integration should be created diff --git a/operator/resourceclaim.py b/operator/resourceclaim.py index 81bcd76..396e257 100644 --- a/operator/resourceclaim.py +++ b/operator/resourceclaim.py @@ -942,16 +942,19 @@ async def validate_with_provider(self, parameter_states = self.status.get('provider', {}).get('parameterValues') # Collect parameter values from status and resource provider defaults + parameters_from_defaults = set() for parameter in resource_provider.get_parameters(): if parameter.name not in parameter_values: if parameter_states and parameter.name in parameter_states: parameter_values[parameter.name] = parameter_states[parameter.name] elif parameter.default_template != None: + parameters_from_defaults.add(parameter.name) parameter_values[parameter.name] = recursive_process_template_strings( parameter.default_template, variables = { **vars_, **parameter_values } ) elif parameter.default_value != None: + parameters_from_defaults.add(parameter.name) parameter_values[parameter.name] = parameter.default_value parameter_names = set() @@ -964,6 +967,9 @@ async def validate_with_provider(self, # Unchanged from current state is automatically considered valid # even if validation rules have changed. continue + if parameter.name in parameters_from_defaults: + # New parameter set from default is automatically valid + continue if not parameter.allow_update: validation_errors.append(f"Parameter {parameter.name} is immutable.") continue