예제 #1
0
 def __init__(
     self,
     namespace: str = None,
     name: str = None,
     labels: Dict[str, str] = None,
     annotations: Dict[str, str] = None,
     user_names: List[str] = None,
     group_names: List[str] = None,
     subjects: List["k8sv1.ObjectReference"] = None,
     role_ref: "k8sv1.ObjectReference" = None,
 ):
     super().__init__(
         api_version="authorization.openshift.io/v1",
         kind="RoleBinding",
         **({
             "namespace": namespace
         } if namespace is not None else {}),
         **({
             "name": name
         } if name is not None else {}),
         **({
             "labels": labels
         } if labels is not None else {}),
         **({
             "annotations": annotations
         } if annotations is not None else {}),
     )
     self.__user_names = user_names if user_names is not None else []
     self.__group_names = group_names if group_names is not None else []
     self.__subjects = subjects if subjects is not None else []
     self.__role_ref = role_ref if role_ref is not None else k8sv1.ObjectReference(
     )
예제 #2
0
파일: v1.py 프로젝트: machinezone/kubespec
 def __init__(
     self,
     name: str = None,
     labels: Dict[str, str] = None,
     annotations: Dict[str, str] = None,
     identity: "k8sv1.ObjectReference" = None,
     user: "******" = None,
 ):
     super().__init__(
         api_version="user.openshift.io/v1",
         kind="UserIdentityMapping",
         **({"name": name} if name is not None else {}),
         **({"labels": labels} if labels is not None else {}),
         **({"annotations": annotations} if annotations is not None else {}),
     )
     self.__identity = identity if identity is not None else k8sv1.ObjectReference()
     self.__user = user if user is not None else k8sv1.ObjectReference()
예제 #3
0
파일: v1.py 프로젝트: machinezone/kubespec
 def __init__(
     self,
     automatic: bool = None,
     container_names: List[str] = None,
     from_: "k8sv1.ObjectReference" = None,
     last_triggered_image: str = None,
 ):
     super().__init__()
     self.__automatic = automatic
     self.__container_names = container_names if container_names is not None else []
     self.__from_ = from_ if from_ is not None else k8sv1.ObjectReference()
     self.__last_triggered_image = last_triggered_image
예제 #4
0
파일: v1.py 프로젝트: machinezone/kubespec
 def __init__(
     self,
     from_: "k8sv1.ObjectReference" = None,
     revision: int = None,
     include_triggers: bool = False,
     include_template: bool = False,
     include_replication_meta: bool = False,
     include_strategy: bool = False,
 ):
     super().__init__()
     self.__from_ = from_ if from_ is not None else k8sv1.ObjectReference()
     self.__revision = revision
     self.__include_triggers = include_triggers
     self.__include_template = include_template
     self.__include_replication_meta = include_replication_meta
     self.__include_strategy = include_strategy
예제 #5
0
 def __init__(
     self,
     described_object: "k8sv1.ObjectReference" = None,
     metric: "MetricIdentifier" = None,
     timestamp: "base.Time" = None,
     window_seconds: int = None,
     value: "resource.Quantity" = None,
 ):
     super().__init__(api_version="custom.metrics.k8s.io/v1beta2",
                      kind="MetricValue")
     self.__described_object = (described_object if described_object
                                is not None else k8sv1.ObjectReference())
     self.__metric = metric if metric is not None else MetricIdentifier()
     self.__timestamp = timestamp
     self.__window_seconds = window_seconds
     self.__value = value
예제 #6
0
파일: v1.py 프로젝트: machinezone/kubespec
 def __init__(
     self,
     name: str = None,
     labels: Dict[str, str] = None,
     annotations: Dict[str, str] = None,
     provider_name: str = "",
     provider_user_name: str = "",
     user: "******" = None,
     extra: Dict[str, str] = None,
 ):
     super().__init__(
         api_version="user.openshift.io/v1",
         kind="Identity",
         **({"name": name} if name is not None else {}),
         **({"labels": labels} if labels is not None else {}),
         **({"annotations": annotations} if annotations is not None else {}),
     )
     self.__provider_name = provider_name
     self.__provider_user_name = provider_user_name
     self.__user = user if user is not None else k8sv1.ObjectReference()
     self.__extra = extra if extra is not None else {}
예제 #7
0
 def __init__(
     self,
     described_object: "k8sv1.ObjectReference" = None,
     metric_name: str = "",
     timestamp: "base.Time" = None,
     window: int = None,
     value: "resource.Quantity" = None,
     selector: "metav1.LabelSelector" = None,
 ):
     super().__init__(
         api_version="custom.metrics.k8s.io/v1beta1", kind="MetricValue"
     )
     self.__described_object = (
         described_object
         if described_object is not None
         else k8sv1.ObjectReference()
     )
     self.__metric_name = metric_name
     self.__timestamp = timestamp
     self.__window = window
     self.__value = value
     self.__selector = selector
예제 #8
0
파일: v1.py 프로젝트: machinezone/kubespec
 def __init__(self, container_name: str = "", to: "k8sv1.ObjectReference" = None):
     super().__init__()
     self.__container_name = container_name
     self.__to = to if to is not None else k8sv1.ObjectReference()