adds support for arm64 to microbot example of the kubernetes-worker charm

This commit is contained in:
Rye Terrell 2018-05-01 14:49:18 -05:00
parent b46dad61c8
commit db9e83f125
2 changed files with 5 additions and 2 deletions

View File

@ -21,7 +21,7 @@ from charmhelpers.core.hookenv import action_get
from charmhelpers.core.hookenv import action_set from charmhelpers.core.hookenv import action_set
from charmhelpers.core.hookenv import unit_public_ip from charmhelpers.core.hookenv import unit_public_ip
from charms.templating.jinja2 import render from charms.templating.jinja2 import render
from subprocess import call from subprocess import call, check_output
os.environ['PATH'] += os.pathsep + os.path.join(os.sep, 'snap', 'bin') os.environ['PATH'] += os.pathsep + os.path.join(os.sep, 'snap', 'bin')
@ -30,6 +30,9 @@ context['replicas'] = action_get('replicas')
context['delete'] = action_get('delete') context['delete'] = action_get('delete')
context['public_address'] = unit_public_ip() context['public_address'] = unit_public_ip()
arch = check_output(['dpkg', '--print-architecture']).rstrip()
context['arch'] = arch.decode('utf-8')
if not context['replicas']: if not context['replicas']:
context['replicas'] = 3 context['replicas'] = 3

View File

@ -18,7 +18,7 @@ spec:
app: microbot app: microbot
spec: spec:
containers: containers:
- image: dontrebootme/microbot:v1 - image: cdkbot/microbot-{{ arch }}:latest
imagePullPolicy: "" imagePullPolicy: ""
name: microbot name: microbot
ports: ports: