mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
Fix awx_kube_devel (#1759)
* Fix awx_kube_devel * Sanitize version name for kube_dev When in development mode, awx version may look like 23.9.1.dev18+gee9eac15dc.d20240311 k8s job to the migration can only have a name with alphanumeric, and '.', '-' so we can just drop off the + Signed-off-by: Seth Foster <fosterbseth@gmail.com> --------- Signed-off-by: Seth Foster <fosterbseth@gmail.com> Co-authored-by: Seth Foster <fosterbseth@gmail.com>
This commit is contained in:
@@ -22,9 +22,9 @@
|
||||
changed_when: false
|
||||
register: version_check
|
||||
|
||||
- name: Update instance version
|
||||
- name: Sanitize instance version
|
||||
set_fact:
|
||||
version: "{{ version_check.stdout | trim }}"
|
||||
version: "{{ version_check.stdout.split('+')[0] | trim }}"
|
||||
|
||||
# It is possible to do a wait on this task to create the job and wait
|
||||
# until it completes. Unfortunately, if the job doesn't wait finish within
|
||||
|
||||
@@ -95,6 +95,10 @@ spec:
|
||||
mountPath: "/etc/tower/settings.py"
|
||||
subPath: settings.py
|
||||
readOnly: true
|
||||
{% if development_mode | bool %}
|
||||
- name: awx-devel
|
||||
mountPath: "/awx_devel"
|
||||
{% endif %}
|
||||
- name: init-receptor
|
||||
image: '{{ _init_container_image }}'
|
||||
imagePullPolicy: '{{ image_pull_policy }}'
|
||||
|
||||
@@ -13,7 +13,7 @@ spec:
|
||||
- name: "migration-job"
|
||||
image: '{{ _image }}'
|
||||
command:
|
||||
- /usr/bin/awx-manage
|
||||
- awx-manage
|
||||
- migrate
|
||||
- --noinput
|
||||
volumeMounts:
|
||||
@@ -29,6 +29,10 @@ spec:
|
||||
mountPath: "/etc/tower/settings.py"
|
||||
subPath: settings.py
|
||||
readOnly: true
|
||||
{% if development_mode | bool %}
|
||||
- name: awx-devel
|
||||
mountPath: "/awx_devel"
|
||||
{% endif %}
|
||||
volumes:
|
||||
- name: "{{ ansible_operator_meta.name }}-application-credentials"
|
||||
secret:
|
||||
@@ -52,6 +56,11 @@ spec:
|
||||
items:
|
||||
- key: settings
|
||||
path: settings.py
|
||||
{% if development_mode | bool %}
|
||||
- name: awx-devel
|
||||
hostPath:
|
||||
path: /awx_devel
|
||||
{% endif %}
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Never
|
||||
terminationGracePeriodSeconds: 30
|
||||
|
||||
Reference in New Issue
Block a user