Skip to content

Commit

Permalink
feat: extend configuration (#2135)
Browse files Browse the repository at this point in the history
feat: extend configuration

add storage class for Sandcastle PVCs
add appcode for MP+

Related to packit/sandcastle#190
TODO:

 Write new tests or update the old ones to cover new functionality.
 Update doc-strings where appropriate.
 Update or write new documentation in packit/packit.dev.
 ‹fill in›

Reviewed-by: Maja Massarini
Reviewed-by: Laura Barcziová
  • Loading branch information
2 parents 17fed5e + 8709ee9 commit d0e9c77
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packit_service/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ def __init__(
comment_command_prefix: str = "/packit",
redhat_api_refresh_token: str = None,
package_config_path_override: Optional[str] = None,
command_handler_storage_class: Optional[str] = None,
appcode: Optional[str] = None,
**kwargs,
):
super().__init__(**kwargs)
Expand Down Expand Up @@ -173,6 +175,12 @@ def __init__(
# default names.
self.package_config_path_override = package_config_path_override

# Storage class that is used for temporary volumes used by Sandcastle
self.command_handler_storage_class = command_handler_storage_class

# Appcode used in MP+ to differentiate applications
self.appcode = appcode

service_config = None

def __repr__(self):
Expand Down
2 changes: 2 additions & 0 deletions packit_service/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ class ServiceConfigSchema(UserConfigSchema):
enabled_projects_for_srpm_in_copr = fields.List(fields.String())
comment_command_prefix = fields.String()
package_config_path_override = fields.String()
command_handler_storage_class = fields.String(missing="gp2")
appcode = fields.String()

@post_load
def make_instance(self, data, **kwargs):
Expand Down

0 comments on commit d0e9c77

Please sign in to comment.