Esempio n. 1
0
    def __init__(self,
                 resource_name,
                 opts=None,
                 items=None,
                 metadata=None,
                 __name__=None,
                 __opts__=None):
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated",
                          DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn(
                "explicit use of __opts__ is deprecated, use 'opts' instead",
                DeprecationWarning)
            opts = __opts__
        if not resource_name:
            raise TypeError(
                'Missing resource name argument (for URN creation)')
        if not isinstance(resource_name, str):
            raise TypeError('Expected resource name to be a string')
        if opts and not isinstance(opts, kulado.ResourceOptions):
            raise TypeError(
                'Expected resource options to be a ResourceOptions instance')

        __props__ = dict()

        __props__['apiVersion'] = 'networking.k8s.io/v1beta1'
        __props__['kind'] = 'IngressList'
        if items is None:
            raise TypeError('Missing required property items')
        __props__['items'] = items
        __props__['metadata'] = metadata

        if opts is None:
            opts = kulado.ResourceOptions()
        if opts.version is None:
            opts.version = version.get_version()

        super(IngressList, self).__init__(
            "kubernetes:networking.k8s.io/v1beta1:IngressList", resource_name,
            __props__, opts)
Esempio n. 2
0
    def __init__(self,
                 resource_name,
                 opts=None,
                 metadata=None,
                 spec=None,
                 status=None,
                 __name__=None,
                 __opts__=None):
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated",
                          DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn(
                "explicit use of __opts__ is deprecated, use 'opts' instead",
                DeprecationWarning)
            opts = __opts__
        if not resource_name:
            raise TypeError(
                'Missing resource name argument (for URN creation)')
        if not isinstance(resource_name, str):
            raise TypeError('Expected resource name to be a string')
        if opts and not isinstance(opts, kulado.ResourceOptions):
            raise TypeError(
                'Expected resource options to be a ResourceOptions instance')

        __props__ = dict()

        __props__['apiVersion'] = 'policy/v1beta1'
        __props__['kind'] = 'PodDisruptionBudget'
        __props__['metadata'] = metadata
        __props__['spec'] = spec
        __props__['status'] = status

        if opts is None:
            opts = kulado.ResourceOptions()
        if opts.version is None:
            opts.version = version.get_version()

        super(PodDisruptionBudget,
              self).__init__("kubernetes:policy/v1beta1:PodDisruptionBudget",
                             resource_name, __props__, opts)
Esempio n. 3
0
    def __init__(self,
                 resource_name,
                 opts=None,
                 metadata=None,
                 target=None,
                 __name__=None,
                 __opts__=None):
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated",
                          DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn(
                "explicit use of __opts__ is deprecated, use 'opts' instead",
                DeprecationWarning)
            opts = __opts__
        if not resource_name:
            raise TypeError(
                'Missing resource name argument (for URN creation)')
        if not isinstance(resource_name, str):
            raise TypeError('Expected resource name to be a string')
        if opts and not isinstance(opts, kulado.ResourceOptions):
            raise TypeError(
                'Expected resource options to be a ResourceOptions instance')

        __props__ = dict()

        __props__['apiVersion'] = 'v1'
        __props__['kind'] = 'Binding'
        if target is None:
            raise TypeError('Missing required property target')
        __props__['target'] = target
        __props__['metadata'] = metadata

        if opts is None:
            opts = kulado.ResourceOptions()
        if opts.version is None:
            opts.version = version.get_version()

        super(Binding, self).__init__("kubernetes:core/v1:Binding",
                                      resource_name, __props__, opts)
Esempio n. 4
0
    def __init__(self,
                 resource_name,
                 opts=None,
                 metadata=None,
                 webhooks=None,
                 __name__=None,
                 __opts__=None):
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated",
                          DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn(
                "explicit use of __opts__ is deprecated, use 'opts' instead",
                DeprecationWarning)
            opts = __opts__
        if not resource_name:
            raise TypeError(
                'Missing resource name argument (for URN creation)')
        if not isinstance(resource_name, str):
            raise TypeError('Expected resource name to be a string')
        if opts and not isinstance(opts, kulado.ResourceOptions):
            raise TypeError(
                'Expected resource options to be a ResourceOptions instance')

        __props__ = dict()

        __props__['apiVersion'] = 'admissionregistration.k8s.io/v1beta1'
        __props__['kind'] = 'MutatingWebhookConfiguration'
        __props__['metadata'] = metadata
        __props__['webhooks'] = webhooks

        if opts is None:
            opts = kulado.ResourceOptions()
        if opts.version is None:
            opts.version = version.get_version()

        super(MutatingWebhookConfiguration, self).__init__(
            "kubernetes:admissionregistration.k8s.io/v1beta1:MutatingWebhookConfiguration",
            resource_name, __props__, opts)
Esempio n. 5
0
    def __init__(self,
                 resource_name,
                 opts=None,
                 metadata=None,
                 rules=None,
                 __name__=None,
                 __opts__=None):
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated",
                          DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn(
                "explicit use of __opts__ is deprecated, use 'opts' instead",
                DeprecationWarning)
            opts = __opts__
        if not resource_name:
            raise TypeError(
                'Missing resource name argument (for URN creation)')
        if not isinstance(resource_name, str):
            raise TypeError('Expected resource name to be a string')
        if opts and not isinstance(opts, kulado.ResourceOptions):
            raise TypeError(
                'Expected resource options to be a ResourceOptions instance')

        __props__ = dict()

        __props__['apiVersion'] = 'rbac.authorization.k8s.io/v1alpha1'
        __props__['kind'] = 'Role'
        __props__['metadata'] = metadata
        __props__['rules'] = rules

        if opts is None:
            opts = kulado.ResourceOptions()
        if opts.version is None:
            opts.version = version.get_version()

        super(Role, self).__init__(
            "kubernetes:rbac.authorization.k8s.io/v1alpha1:Role",
            resource_name, __props__, opts)
Esempio n. 6
0
    def __init__(self,
                 __name__,
                 __opts__=None,
                 api_version=None,
                 kind=None,
                 metadata=None,
                 spec=None):
        if not __name__:
            raise TypeError(
                'Missing resource name argument (for URN creation)')
        if not isinstance(__name__, str):
            raise TypeError('Expected resource name to be a string')
        if __opts__ and not isinstance(__opts__, kulado.ResourceOptions):
            raise TypeError(
                'Expected resource options to be a ResourceOptions instance')

        __props__ = dict()

        if not api_version:
            raise TypeError('Missing required property apiVersion')
        __props__['apiVersion'] = api_version
        if not kind:
            raise TypeError('Missing required property kind')
        __props__['kind'] = kind
        if spec is None:
            raise TypeError('Missing required property spec')
        __props__['spec'] = spec
        __props__['metadata'] = metadata

        if __opts__ is None:
            __opts__ = kulado.ResourceOptions()
        if __opts__.version is None:
            __opts__.version = version.get_version()

        super(CustomResource,
              self).__init__("kubernetes:%s:%s" % (api_version, kind),
                             __name__, __props__, __opts__)
Esempio n. 7
0
    def __init__(self, resource_name, opts=None, description=None, global_default=None, metadata=None, preemption_policy=None, value=None, __name__=None, __opts__=None):
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
            opts = __opts__
        if not resource_name:
            raise TypeError('Missing resource name argument (for URN creation)')
        if not isinstance(resource_name, str):
            raise TypeError('Expected resource name to be a string')
        if opts and not isinstance(opts, kulado.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')

        __props__ = dict()

        __props__['apiVersion'] = 'scheduling.k8s.io/v1'
        __props__['kind'] = 'PriorityClass'
        if value is None:
            raise TypeError('Missing required property value')
        __props__['value'] = value
        __props__['description'] = description
        __props__['globalDefault'] = global_default
        __props__['metadata'] = metadata
        __props__['preemptionPolicy'] = preemption_policy

        if opts is None:
            opts = kulado.ResourceOptions()
        if opts.version is None:
            opts.version = version.get_version()

        super(PriorityClass, self).__init__(
            "kubernetes:scheduling.k8s.io/v1:PriorityClass",
            resource_name,
            __props__,
            opts)
Esempio n. 8
0
    def __init__(self,
                 resource_name,
                 opts=None,
                 action=None,
                 count=None,
                 event_time=None,
                 first_timestamp=None,
                 involved_object=None,
                 last_timestamp=None,
                 message=None,
                 metadata=None,
                 reason=None,
                 related=None,
                 reporting_component=None,
                 reporting_instance=None,
                 series=None,
                 source=None,
                 type=None,
                 __name__=None,
                 __opts__=None):
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated",
                          DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn(
                "explicit use of __opts__ is deprecated, use 'opts' instead",
                DeprecationWarning)
            opts = __opts__
        if not resource_name:
            raise TypeError(
                'Missing resource name argument (for URN creation)')
        if not isinstance(resource_name, str):
            raise TypeError('Expected resource name to be a string')
        if opts and not isinstance(opts, kulado.ResourceOptions):
            raise TypeError(
                'Expected resource options to be a ResourceOptions instance')

        __props__ = dict()

        __props__['apiVersion'] = 'v1'
        __props__['kind'] = 'Event'
        if involved_object is None:
            raise TypeError('Missing required property involved_object')
        __props__['involvedObject'] = involved_object
        if metadata is None:
            raise TypeError('Missing required property metadata')
        __props__['metadata'] = metadata
        __props__['action'] = action
        __props__['count'] = count
        __props__['eventTime'] = event_time
        __props__['firstTimestamp'] = first_timestamp
        __props__['lastTimestamp'] = last_timestamp
        __props__['message'] = message
        __props__['reason'] = reason
        __props__['related'] = related
        __props__['reportingComponent'] = reporting_component
        __props__['reportingInstance'] = reporting_instance
        __props__['series'] = series
        __props__['source'] = source
        __props__['type'] = type

        if opts is None:
            opts = kulado.ResourceOptions()
        if opts.version is None:
            opts.version = version.get_version()

        super(Event, self).__init__("kubernetes:core/v1:Event", resource_name,
                                    __props__, opts)