示例#1
0
    def __init__(self,
                 tiller_host=None,
                 tiller_port=None,
                 tiller_namespace=None,
                 dry_run=False):
        self.tiller_host = tiller_host
        self.tiller_port = tiller_port or CONF.tiller_port
        self.tiller_namespace = tiller_namespace or CONF.tiller_namespace

        self.dry_run = dry_run

        # init k8s connectivity
        self.k8s = K8s()

        # init Tiller channel
        self.channel = self.get_channel()

        # init timeout for all requests
        # and assume eventually this will
        # be fed at runtime as an override
        self.timeout = const.DEFAULT_TILLER_TIMEOUT

        LOG.debug('Armada is using Tiller at: %s:%s, namespace=%s, timeout=%s',
                  self.tiller_host, self.tiller_port, self.tiller_namespace,
                  self.timeout)
示例#2
0
    def __init__(self, tiller_host=None, tiller_port=TILLER_PORT):

        self.tiller_host = tiller_host
        self.tiller_port = tiller_port
        # init k8s connectivity
        self.k8s = K8s()

        # init tiller channel
        self.channel = self.get_channel()

        # init timeout for all requests
        # and assume eventually this will
        # be fed at runtime as an override
        self.timeout = TILLER_TIMEOUT
示例#3
0
文件: lock.py 项目: airshipit/armada
    def __init__(self, name, bearer_token=None, additional_data=None):
        self.name = name
        data = additional_data or dict()
        self.full_name = "{}.{}.{}".format(LOCK_PLURAL, LOCK_GROUP, self.name)
        self.metadata = {'name': self.full_name}
        self.body = {
            'kind': "Resource",
            'apiVersion': "{}/{}".format(LOCK_GROUP, LOCK_VERSION),
            'metadata': self.metadata,
            'data': data
        }
        self.delete_options = {}

        self.k8s = K8s(bearer_token=bearer_token)
示例#4
0
文件: helm.py 项目: airshipit/armada
    def __init__(self, bearer_token=None):
        self.bearer_token = bearer_token

        # init k8s connectivity
        self.k8s = K8s(bearer_token=self.bearer_token)