I tried to mount a volume from my K3s host to AWX using the guide from awx but I get the error:
strict decoding error: unknown field “spec.init_container_extra_volume_mounts[0].mount”, unknown field “spec.init_container_extra_volume_mounts[0].name”
My awx.yaml file is the next:
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx
spec:
# These parameters are designed for use with:
# - AWX Operator: 2.17.0
# https://github.com/ansible/awx-operator/blob/2.17.0/README.md
admin_user: admin
admin_password_secret: awx-admin-password
ingress_type: ingress
ingress_hosts:
- hostname: ###########
tls_secret: awx-secret-tls
postgres_configuration_secret: awx-postgres-configuration
postgres_data_volume_init: true
postgres_storage_class: awx-postgres-volume
postgres_storage_requirements:
requests:
storage: 8Gi
projects_persistence: true
projects_existing_claim: awx-projects-claim
web_replicas: 1
task_replicas: 1
web_resource_requirements:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 2000m
memory: 6Gi
task_resource_requirements:
requests:
cpu: 100m
memory: 128Mi
ephemeral-storage: 500M
limits:
cpu: 4000m
memory: 8Gi
ephemeral-storage: 4Gi
extra_volumes: |
- name: awx-data-volume
persistentVolumeClaim:
claimName: awx-data-claim
init_container_extra_volume_mounts:
- name: awx-data-volume
mount: /data_awx
init_container_extra_commands: |
chmod 775 /data_awx
chgrp 1000 /data_awx
ee_resource_requirements: {}
init_container_resource_requirements: {}
postgres_resource_requirements: {}
redis_resource_requirements: {}
rsyslog_resource_requirements: {}
# Uncomment to reveal "censored" logs
#no_log: false
My pv.yaml is the next:
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: awx-postgres-15-volume
spec:
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
capacity:
storage: 8Gi
storageClassName: awx-postgres-volume
hostPath:
path: /data_awx/postgres
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: awx-projects-volume
spec:
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
capacity:
storage: 2Gi
storageClassName: awx-projects-volume
hostPath:
path: /data_awx/project
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: awx-data-volume
spec:
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
capacity:
storage: 20Gi
storageClassName: awx-data-volume
hostPath:
path: /data_awx/data
And my pvc.yaml is:
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: awx-projects-claim
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 2Gi
storageClassName: awx-projects-volume
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: awx-data-claim
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 20Gi
storageClassName: awx-data-volume
Please your help. Thanks in advance.