diff --git a/ocp_resources/jaeger.py b/ocp_resources/jaeger.py new file mode 100644 index 0000000000..0da7fe8cdc --- /dev/null +++ b/ocp_resources/jaeger.py @@ -0,0 +1,45 @@ +# Generated using https://github.com/RedHatQE/openshift-python-wrapper/blob/main/scripts/resource/README.md + + +from typing import Any +from ocp_resources.resource import NamespacedResource + + +class Jaeger(NamespacedResource): + """ + Jaeger is the Schema for the jaegers.jaegertracing.io API + """ + + api_group: str = NamespacedResource.ApiGroup.JAEGERTRACING_IO + + def __init__( + self, + strategy: str | None = None, + ingress: dict[str, Any] | None = None, + collector: dict[str, Any] | None = None, + **kwargs: Any, + ) -> None: + """ + Args: + strategy (str): Jaeger deployment strategy ("allInOne" or "production"). + ingress (dict[str, Any]): Optional ingress settings for Jaeger UI. + collector (dict[str, Any]): Optional collector configuration. + """ + super().__init__(**kwargs) + self.strategy = strategy + self.ingress = ingress + self.collector = collector + + def to_dict(self) -> None: + super().to_dict() + if not self.kind_dict and not self.yaml_file: + self.res["spec"] = {} + _spec = self.res["spec"] + if self.strategy is not None: + _spec["strategy"] = self.strategy + if self.ingress is not None: + _spec["ingress"] = self.ingress + if self.collector is not None: + _spec["collector"] = self.collector + + # End of generated code diff --git a/ocp_resources/resource.py b/ocp_resources/resource.py index 86d21c92a8..82fbf31197 100644 --- a/ocp_resources/resource.py +++ b/ocp_resources/resource.py @@ -501,6 +501,7 @@ class ApiGroup: IMAGEREGISTRY_OPERATOR_OPENSHIFT_IO: str = "imageregistry.operator.openshift.io" INSTANCETYPE_KUBEVIRT_IO: str = "instancetype.kubevirt.io" INTEGREATLY_ORG: str = "integreatly.org" + JAEGERTRACING_IO = "jaegertracing.io" K8S_CNI_CNCF_IO: str = "k8s.cni.cncf.io" K8S_MARIADB_COM: str = "k8s.mariadb.com" K8S_OVN_ORG: str = "k8s.ovn.org"