Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ class DockerConfigJson(BaseModel):


class ManagedProviderConfiguration(BaseModel):
disable_downscaling: bool = False
manifest_template_dir: Path | None = None
self_registration_use_local_network: bool = Field(
default=False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
@blueprint.periodic(cron="*/1 * * * *")
@blueprint.task(queueing_lock="scale_down_providers", queue=str(Queues.CRON_PROVIDER))
@inject
async def scale_down_providers(timestamp: int, service: ProviderService):
async def scale_down_providers(timestamp: int, service: ProviderService, configuration: Configuration):
if configuration.provider.disable_downscaling:
return
await service.scale_down_providers()


Expand Down
4 changes: 2 additions & 2 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ spec:
- name: AUTH__DISABLE_AUTH
value: "true"
{{- end }}
{{- if .Values.features.selfRegistration }}
- name: PROVIDER__AUTO_REMOVE_ENABLED
{{- if .Values.disableProviderDownscaling }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To align with the suggested change in values.yaml for better organization, please update this to use the nested value. This improves consistency across the Helm chart.

            {{- if .Values.provider.disableDownscaling }}

- name: PROVIDER__DISABLE_DOWNSCALING
value: "true"
{{- end }}
- name: GENERATE_CONVERSATION_TITLE__ENABLED
Expand Down
2 changes: 2 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ providers: []
unmanagedProviders: [] # DEPRECATED: use providers instead
variables: {} # DEPRECATED: use server API to manage variables instead

disableProviderDownscaling: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better organization and consistency with other configuration blocks like auth and generateConversationTitle, consider nesting disableProviderDownscaling under a provider key and renaming it to disableDownscaling to avoid redundancy. This makes the values.yaml file easier to navigate and understand as more provider-specific configurations are added. I've added a related comment in helm/templates/deployment.yaml to adjust the value access.

provider:
  disableDownscaling: false


# External registries in the format: [name: githubURL]
# for example
# github: "https://github.com/i-am-bee/[email protected]#path=agent-registry.yaml"
Expand Down