Commit 1f7d38a1 authored by Rye Terrell's avatar Rye Terrell

Add support for arm64 to the registry action of the kuberntes-worker juju charm.

parent d4b4f5aa
...@@ -25,7 +25,7 @@ from base64 import b64encode ...@@ -25,7 +25,7 @@ from base64 import b64encode
from charmhelpers.core.hookenv import action_get from charmhelpers.core.hookenv import action_get
from charmhelpers.core.hookenv import action_set from charmhelpers.core.hookenv import action_set
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')
...@@ -33,6 +33,9 @@ deletion = action_get('delete') ...@@ -33,6 +33,9 @@ deletion = action_get('delete')
context = {} context = {}
arch = check_output(['dpkg', '--print-architecture']).rstrip()
context['arch'] = arch.decode('utf-8')
# These config options must be defined in the case of a creation # These config options must be defined in the case of a creation
param_error = False param_error = False
for param in ('tlscert', 'tlskey', 'domain', 'htpasswd', 'htpasswd-plain'): for param in ('tlscert', 'tlskey', 'domain', 'htpasswd', 'htpasswd-plain'):
......
...@@ -37,7 +37,7 @@ spec: ...@@ -37,7 +37,7 @@ spec:
spec: spec:
containers: containers:
- name: registry - name: registry
image: registry:2 image: cdkbot/registry-{{ arch }}:2.6
resources: resources:
# keep request = limit to keep this container in guaranteed class # keep request = limit to keep this container in guaranteed class
limits: limits:
......
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