import typing
import datetime as _datetime
from kubernetes import client
from kuber import kube_api as _kube_api
from kuber import definitions as _kuber_definitions
from kuber.latest.meta_v1 import LabelSelector
from kuber.latest.meta_v1 import ListMeta
from kuber.latest.meta_v1 import MicroTime
from kuber.latest.meta_v1 import ObjectMeta
from kuber.latest.meta_v1 import Status
from kuber.latest.meta_v1 import StatusDetails
class AWSElasticBlockStoreVolumeSource(_kuber_definitions.Definition):
"""
Represents a Persistent Disk resource in AWS.
An AWS EBS
disk must exist before mounting to a container. The disk
must also be in the same AWS zone as the kubelet. An AWS EBS
disk can only be mounted as read/write once. AWS EBS volumes
support ownership management and SELinux relabeling.
"""
def __init__(
self,
fs_type: str = None,
partition: int = None,
read_only: bool = None,
volume_id: str = None,
):
"""Create AWSElasticBlockStoreVolumeSource instance."""
super(AWSElasticBlockStoreVolumeSource, self).__init__(
api_version='core/v1',
kind='AWSElasticBlockStoreVolumeSource'
)
self._properties = {
'fsType': fs_type or '',
'partition': partition or None,
'readOnly': read_only or None,
'volumeID': volume_id or '',
}
self._types = {
'fsType': (str, None),
'partition': (int, None),
'readOnly': (bool, None),
'volumeID': (str, None),
}
@property
def fs_type(self) -> str:
"""
Filesystem type of the volume that you want to mount. Tip:
Ensure that the filesystem type is supported by the host
operating system. Examples: "ext4", "xfs", "ntfs".
Implicitly inferred to be "ext4" if unspecified. More info:
https://kubernetes.io/docs/concepts/storage/volumes#awselast
icblockstore
"""
return self._properties.get('fsType')
@fs_type.setter
def fs_type(self, value: str):
"""
Filesystem type of the volume that you want to mount. Tip:
Ensure that the filesystem type is supported by the host
operating system. Examples: "ext4", "xfs", "ntfs".
Implicitly inferred to be "ext4" if unspecified. More info:
https://kubernetes.io/docs/concepts/storage/volumes#awselast
icblockstore
"""
self._properties['fsType'] = value
@property
def partition(self) -> int:
"""
The partition in the volume that you want to mount. If
omitted, the default is to mount by volume name. Examples:
For volume /dev/sda1, you specify the partition as "1".
Similarly, the volume partition for /dev/sda is "0" (or you
can leave the property empty).
"""
return self._properties.get('partition')
@partition.setter
def partition(self, value: int):
"""
The partition in the volume that you want to mount. If
omitted, the default is to mount by volume name. Examples:
For volume /dev/sda1, you specify the partition as "1".
Similarly, the volume partition for /dev/sda is "0" (or you
can leave the property empty).
"""
self._properties['partition'] = value
@property
def read_only(self) -> bool:
"""
Specify "true" to force and set the ReadOnly property in
VolumeMounts to "true". If omitted, the default is "false".
More info: https://kubernetes.io/docs/concepts/storage/volum
es#awselasticblockstore
"""
return self._properties.get('readOnly')
@read_only.setter
def read_only(self, value: bool):
"""
Specify "true" to force and set the ReadOnly property in
VolumeMounts to "true". If omitted, the default is "false".
More info: https://kubernetes.io/docs/concepts/storage/volum
es#awselasticblockstore
"""
self._properties['readOnly'] = value
@property
def volume_id(self) -> str:
"""
Unique ID of the persistent disk resource in AWS (Amazon EBS
volume). More info: https://kubernetes.io/docs/concepts/stor
age/volumes#awselasticblockstore
"""
return self._properties.get('volumeID')
@volume_id.setter
def volume_id(self, value: str):
"""
Unique ID of the persistent disk resource in AWS (Amazon EBS
volume). More info: https://kubernetes.io/docs/concepts/stor
age/volumes#awselasticblockstore
"""
self._properties['volumeID'] = value
def __enter__(self) -> 'AWSElasticBlockStoreVolumeSource':
return self
def __exit__(self, exc_type, exc_val, exc_tb):
return False
class Affinity(_kuber_definitions.Definition):
"""
Affinity is a group of affinity scheduling rules.
"""
def __init__(
self,
node_affinity: 'NodeAffinity' = None,
pod_affinity: 'PodAffinity' = None,
pod_anti_affinity: 'PodAntiAffinity' = None,
):
"""Create Affinity instance."""
super(Affinity, self).__init__(
api_version='core/v1',
kind='Affinity'
)
self._properties = {
'nodeAffinity': node_affinity or NodeAffinity(),
'podAffinity': pod_affinity or PodAffinity(),
'podAntiAffinity': pod_anti_affinity or PodAntiAffinity(),
}
self._types = {
'nodeAffinity': (NodeAffinity, None),
'podAffinity': (PodAffinity, None),
'podAntiAffinity': (PodAntiAffinity, None),
}
@property
def node_affinity(self) -> 'NodeAffinity':
"""
Describes node affinity scheduling rules for the pod.
"""
return self._properties.get('nodeAffinity')
@node_affinity.setter
def node_affinity(self, value: typing.Union['NodeAffinity', dict]):
"""
Describes node affinity scheduling rules for the pod.
"""
if isinstance(value, dict):
value = NodeAffinity().from_dict(value)
self._properties['nodeAffinity'] = value
@property
def pod_affinity(self) -> 'PodAffinity':
"""
Describes pod affinity scheduling rules (e.g. co-locate this
pod in the same node, zone, etc. as some other pod(s)).
"""
return self._properties.get('podAffinity')
@pod_affinity.setter
def pod_affinity(self, value: typing.Union['PodAffinity', dict]):
"""
Describes pod affinity scheduling rules (e.g. co-locate this
pod in the same node, zone, etc. as some other pod(s)).
"""
if isinstance(value, dict):
value = PodAffinity().from_dict(value)
self._properties['podAffinity'] = value
@property
def pod_anti_affinity(self) -> 'PodAntiAffinity':
"""
Describes pod anti-affinity scheduling rules (e.g. avoid
putting this pod in the same node, zone, etc. as some other
pod(s)).
"""
return self._properties.get('podAntiAffinity')
@pod_anti_affinity.setter
def pod_anti_affinity(self, value: typing.Union['PodAntiAffinity', dict]):
"""
Describes pod anti-affinity scheduling rules (e.g. avoid
putting this pod in the same node, zone, etc. as some other
pod(s)).
"""
if isinstance(value, dict):
value = PodAntiAffinity().from_dict(value)
self._properties['podAntiAffinity'] = value
def __enter__(self) -> 'Affinity':
return self
def __exit__(se
没有合适的资源?快使用搜索试试~ 我知道了~
PyPI 官网下载 | kuber-1.6.0.tar.gz
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 46 浏览量
2022-01-12
20:12:09
上传
评论
收藏 1.89MB GZ 举报
温馨提示
共333个文件
py:324个
txt:4个
pkg-info:2个
资源来自pypi官网。 资源全名:kuber-1.6.0.tar.gz
资源推荐
资源详情
资源评论
收起资源包目录
PyPI 官网下载 | kuber-1.6.0.tar.gz (333个子文件)
setup.cfg 102B
README.md 5KB
not-zip-safe 2B
PKG-INFO 7KB
PKG-INFO 7KB
core_v1.py 802KB
core_v1.py 802KB
core_v1.py 802KB
core_v1.py 802KB
core_v1.py 794KB
core_v1.py 790KB
core_v1.py 783KB
extensions_v1beta1.py 237KB
extensions_v1beta1.py 237KB
extensions_v1beta1.py 237KB
extensions_v1beta1.py 237KB
extensions_v1beta1.py 234KB
extensions_v1beta1.py 230KB
extensions_v1beta1.py 229KB
apps_v1beta2.py 170KB
apps_v1beta2.py 170KB
apps_v1beta2.py 170KB
apps_v1beta2.py 170KB
apps_v1beta2.py 170KB
apps_v1beta2.py 170KB
apps_v1beta2.py 170KB
apps_v1.py 158KB
apps_v1.py 158KB
apps_v1.py 158KB
apps_v1.py 158KB
apps_v1.py 158KB
apps_v1.py 158KB
apps_v1.py 158KB
apps_v1beta1.py 106KB
apps_v1beta1.py 106KB
apps_v1beta1.py 106KB
apps_v1beta1.py 106KB
apps_v1beta1.py 106KB
apps_v1beta1.py 106KB
apps_v1beta1.py 106KB
meta_v1.py 94KB
meta_v1.py 94KB
meta_v1.py 94KB
meta_v1.py 94KB
apiextensions_v1beta1.py 87KB
apiextensions_v1beta1.py 87KB
meta_v1.py 86KB
meta_v1.py 86KB
apiextensions_v1beta1.py 86KB
apiextensions_v1beta1.py 86KB
meta_v1.py 85KB
apiextensions_v1beta1.py 84KB
policy_v1beta1.py 75KB
policy_v1beta1.py 75KB
policy_v1beta1.py 75KB
policy_v1beta1.py 75KB
policy_v1beta1.py 72KB
policy_v1beta1.py 69KB
autoscaling_v2beta1.py 69KB
autoscaling_v2beta1.py 69KB
autoscaling_v2beta1.py 69KB
autoscaling_v2beta1.py 69KB
autoscaling_v2beta1.py 69KB
autoscaling_v2beta1.py 69KB
policy_v1beta1.py 68KB
apiextensions_v1beta1.py 67KB
apiextensions_v1beta1.py 67KB
autoscaling_v2beta2.py 64KB
autoscaling_v2beta2.py 64KB
autoscaling_v2beta2.py 64KB
autoscaling_v2beta2.py 64KB
autoscaling_v2beta2.py 64KB
autoscaling_v2beta2.py 64KB
storage_v1beta1.py 63KB
storage_v1beta1.py 63KB
storage_v1beta1.py 63KB
storage_v1beta1.py 63KB
autoscaling_v2beta1.py 62KB
authorization_v1beta1.py 60KB
authorization_v1beta1.py 60KB
authorization_v1beta1.py 60KB
authorization_v1beta1.py 60KB
authorization_v1beta1.py 60KB
authorization_v1beta1.py 60KB
authorization_v1beta1.py 60KB
authorization_v1.py 60KB
authorization_v1.py 60KB
authorization_v1.py 60KB
authorization_v1.py 60KB
authorization_v1.py 60KB
authorization_v1.py 60KB
authorization_v1.py 60KB
rbac_v1beta1.py 47KB
rbac_v1beta1.py 47KB
rbac_v1beta1.py 47KB
rbac_v1beta1.py 47KB
rbac_v1beta1.py 47KB
rbac_v1beta1.py 47KB
rbac_v1beta1.py 47KB
rbac_v1.py 46KB
共 333 条
- 1
- 2
- 3
- 4
资源评论
挣扎的蓝藻
- 粉丝: 12w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功