mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #63341 from wwwtyro/rye/arm64-microbot
Automatic merge from submit-queue (batch tested with PRs 63138, 63091, 63201, 63341). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Adds support for arm64 to microbot example of the kubernetes-worker charm. **What this PR does / why we need it**: Adds support for arm64 to microbot example of the kubernetes-worker charm. **Release note**: ```release-note NONE ```
This commit is contained in:
commit
62b58e625e
@ -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
|
||||||
|
|
||||||
|
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user