mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
adds support for arm64 to microbot example of the kubernetes-worker charm
This commit is contained in:
parent
b46dad61c8
commit
db9e83f125
@ -21,7 +21,7 @@ from charmhelpers.core.hookenv import action_get
|
||||
from charmhelpers.core.hookenv import action_set
|
||||
from charmhelpers.core.hookenv import unit_public_ip
|
||||
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')
|
||||
|
||||
@ -30,6 +30,9 @@ context['replicas'] = action_get('replicas')
|
||||
context['delete'] = action_get('delete')
|
||||
context['public_address'] = unit_public_ip()
|
||||
|
||||
arch = check_output(['dpkg', '--print-architecture']).rstrip()
|
||||
context['arch'] = arch.decode('utf-8')
|
||||
|
||||
if not context['replicas']:
|
||||
context['replicas'] = 3
|
||||
|
||||
|
@ -18,7 +18,7 @@ spec:
|
||||
app: microbot
|
||||
spec:
|
||||
containers:
|
||||
- image: dontrebootme/microbot:v1
|
||||
- image: cdkbot/microbot-{{ arch }}:latest
|
||||
imagePullPolicy: ""
|
||||
name: microbot
|
||||
ports:
|
||||
|
Loading…
Reference in New Issue
Block a user