11# Generated using https://github.com/RedHatQE/openshift-python-wrapper/blob/main/scripts/resource/README.md
22
3+ from ocp_resources .exceptions import MissingRequiredArgumentError
34
45from typing import Any
5- from ocp_resources .resource import NamespacedResource , MissingRequiredArgumentError
6+ from ocp_resources .resource import NamespacedResource
67
78
89class GuardrailsOrchestrator (NamespacedResource ):
@@ -14,35 +15,46 @@ class GuardrailsOrchestrator(NamespacedResource):
1415
1516 def __init__ (
1617 self ,
18+ auto_config : dict [str , Any ] | None = None ,
1719 enable_built_in_detectors : bool | None = None ,
1820 enable_guardrails_gateway : bool | None = None ,
1921 guardrails_gateway_config : str | None = None ,
22+ log_level : str | None = None ,
2023 orchestrator_config : str | None = None ,
2124 otel_exporter : dict [str , Any ] | None = None ,
2225 replicas : int | None = None ,
2326 ** kwargs : Any ,
2427 ) -> None :
2528 r"""
2629 Args:
30+ auto_config (dict[str, Any]): Settings governing the automatic configuration of the orchestrator.
31+ Replaces `OrchestratorConfig`.
32+
2733 enable_built_in_detectors (bool): Boolean flag to enable/disable built-in detectors
2834
2935 enable_guardrails_gateway (bool): Boolean flag to enable/disable the guardrails sidecar gateway
3036
3137 guardrails_gateway_config (str): Name of the configmap containing guadrails sidecar gateway arguments
3238
39+ log_level (str): Set log level in the orchestrator deployment
40+
3341 orchestrator_config (str): Name of configmap containing generator,detector,and chunker arguments
3442
3543 otel_exporter (dict[str, Any]): List of orchestrator enviroment variables for configuring the OTLP
3644 exporter
3745
38- replicas (int): Number of replicas
46+ replicas (int): INSERT ADDITIONAL SPEC FIELDS - desired state of cluster Important:
47+ Run "make" to regenerate code after modifying this file Number of
48+ replicas
3949
4050 """
4151 super ().__init__ (** kwargs )
4252
53+ self .auto_config = auto_config
4354 self .enable_built_in_detectors = enable_built_in_detectors
4455 self .enable_guardrails_gateway = enable_guardrails_gateway
4556 self .guardrails_gateway_config = guardrails_gateway_config
57+ self .log_level = log_level
4658 self .orchestrator_config = orchestrator_config
4759 self .otel_exporter = otel_exporter
4860 self .replicas = replicas
@@ -51,18 +63,17 @@ def to_dict(self) -> None:
5163 super ().to_dict ()
5264
5365 if not self .kind_dict and not self .yaml_file :
54- if self .orchestrator_config is None :
55- raise MissingRequiredArgumentError (argument = "self.orchestrator_config" )
56-
5766 if self .replicas is None :
5867 raise MissingRequiredArgumentError (argument = "self.replicas" )
5968
6069 self .res ["spec" ] = {}
6170 _spec = self .res ["spec" ]
6271
63- _spec ["orchestratorConfig" ] = self .orchestrator_config
6472 _spec ["replicas" ] = self .replicas
6573
74+ if self .auto_config is not None :
75+ _spec ["autoConfig" ] = self .auto_config
76+
6677 if self .enable_built_in_detectors is not None :
6778 _spec ["enableBuiltInDetectors" ] = self .enable_built_in_detectors
6879
@@ -72,6 +83,12 @@ def to_dict(self) -> None:
7283 if self .guardrails_gateway_config is not None :
7384 _spec ["guardrailsGatewayConfig" ] = self .guardrails_gateway_config
7485
86+ if self .log_level is not None :
87+ _spec ["logLevel" ] = self .log_level
88+
89+ if self .orchestrator_config is not None :
90+ _spec ["orchestratorConfig" ] = self .orchestrator_config
91+
7592 if self .otel_exporter is not None :
7693 _spec ["otelExporter" ] = self .otel_exporter
7794
0 commit comments