Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 3
0
    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)
Exemplo n.º 4
0
    def __init__(self, bearer_token=None):
        self.bearer_token = bearer_token

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