Commit db9e83f1 authored by Rye Terrell's avatar Rye Terrell

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

parent b46dad61
...@@ -21,7 +21,7 @@ from charmhelpers.core.hookenv import action_get ...@@ -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') ...@@ -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
......
...@@ -18,7 +18,7 @@ spec: ...@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment