|
| 1 | +# Generated using https://github.com/RedHatQE/openshift-python-wrapper/blob/main/scripts/resource/README.md |
| 2 | + |
| 3 | + |
| 4 | +from typing import Any |
| 5 | +from ocp_resources.resource import NamespacedResource |
| 6 | + |
| 7 | + |
| 8 | +class Jaeger(NamespacedResource): |
| 9 | + """ |
| 10 | + Jaeger is the Schema for the jaegers.jaegertracing.io API |
| 11 | + """ |
| 12 | + |
| 13 | + api_group: str = NamespacedResource.ApiGroup.JAEGERTRACING_IO |
| 14 | + |
| 15 | + def __init__( |
| 16 | + self, |
| 17 | + strategy: str | None = None, |
| 18 | + ingress: dict[str, Any] | None = None, |
| 19 | + collector: dict[str, Any] | None = None, |
| 20 | + **kwargs: Any, |
| 21 | + ) -> None: |
| 22 | + """ |
| 23 | + Args: |
| 24 | + strategy (str): Jaeger deployment strategy ("allInOne" or "production"). |
| 25 | + ingress (dict[str, Any]): Optional ingress settings for Jaeger UI. |
| 26 | + collector (dict[str, Any]): Optional collector configuration. |
| 27 | + """ |
| 28 | + super().__init__(**kwargs) |
| 29 | + self.strategy = strategy |
| 30 | + self.ingress = ingress |
| 31 | + self.collector = collector |
| 32 | + |
| 33 | + def to_dict(self) -> None: |
| 34 | + super().to_dict() |
| 35 | + if not self.kind_dict and not self.yaml_file: |
| 36 | + self.res["spec"] = {} |
| 37 | + _spec = self.res["spec"] |
| 38 | + if self.strategy is not None: |
| 39 | + _spec["strategy"] = self.strategy |
| 40 | + if self.ingress is not None: |
| 41 | + _spec["ingress"] = self.ingress |
| 42 | + if self.collector is not None: |
| 43 | + _spec["collector"] = self.collector |
| 44 | + |
| 45 | + # End of generated code |
0 commit comments