FROM openshift/ose-ansible-operator:v4.1.0

# https://github.com/operator-framework/operator-registry#manifest-format
COPY manifests/bundle/ /manifests/

COPY roles/ /opt/ansible/roles/
COPY playbooks/ /opt/ansible/
COPY watches.yaml /opt/ansible/watches.yaml
COPY _defaults.yml /opt/ansible/_defaults.yml

COPY preprocess_template.py ${HOME}/
COPY patch.yaml ${HOME}/

USER root
RUN python ${HOME}/preprocess_template.py ${HOME}/patch.yaml /opt/ansible/roles/KubevirtCommonTemplatesBundle/files/
USER ${USER_UID}

LABEL com.redhat.component="kubevirt-ssp-operator-container" \
      name="container-native-virtualization/kubevirt-ssp-operator" \
      version="v2.0.0" \
      summary="Operator for maintaining the kubevirt components needed for scheduling, scale and performance of VMs." \
      io.openshift.expose-services="" \
      io.openshift.tags="cnv,operator" \
      io.k8s.display-name="kubevirt-ssp-operator" \
      maintainer="The KubeVirt Project <kubevirt-dev@googlegroups.com>" \
      description="This operator is responsible for maintaining the kubevirt components needed for scheduling, scale and performance of VMs."
