Merge pull request #48439 from juju-solutions/bug/namespaces-path
Automatic merge from submit-queue (batch tested with PRs 48439, 48440, 48394) Fix: namespace-create have kubectl in path **What this PR does / why we need it**: In juju deployed clusters namespace-create action is failing **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes https://github.com/juju-solutions/bundle-canonical-kubernetes/issues/326 **Special notes for your reviewer**: **Release note**: ```Fix: namespace-create action on Juju deployed clusters ```
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import os
|
||||||
from yaml import safe_load as load
|
from yaml import safe_load as load
|
||||||
from charmhelpers.core.hookenv import (
|
from charmhelpers.core.hookenv import (
|
||||||
action_get,
|
action_get,
|
||||||
@@ -11,6 +11,9 @@ from charms.templating.jinja2 import render
|
|||||||
from subprocess import check_output
|
from subprocess import check_output
|
||||||
|
|
||||||
|
|
||||||
|
os.environ['PATH'] += os.pathsep + os.path.join(os.sep, 'snap', 'bin')
|
||||||
|
|
||||||
|
|
||||||
def kubectl(args):
|
def kubectl(args):
|
||||||
cmd = ['kubectl'] + args
|
cmd = ['kubectl'] + args
|
||||||
return check_output(cmd)
|
return check_output(cmd)
|
||||||
|
Reference in New Issue
Block a user