ansible / awx-resource-operator

41 stars 34 forks source link

build operator, runner, bundle images #21

Closed xiangjingli closed 4 years ago

xiangjingli commented 4 years ago

change list:

  1. Makefile - For building operator/ runner/ bundle images

  2. bundle.Dockerfile - The dockerfile for building bundle image

  3. operator bundle package files - operator CSV, CRD and meta annotation.yaml

  4. when create k8s runner job, we used to create a service account and bind it to the existing operator cluster role. It turns out not working if the operator is installed by operator CSV bundle, where the operator cluster role has been renamed by adding a random string suffix.

The fix is to create a new role and bind the service account to the new role when the k8s runner job is created. Thus the k8s runner job won't reply on operator cluster role any more.

arewm commented 4 years ago

This looks good to me... The only thing that I see missing from a reference bundle image is the com.redhat.* labels on the Dockerfile, i.e.

LABEL com.redhat.delivery.operator.bundle=true
LABEL com.redhat.openshift.versions="v4.5,v4.6"
LABEL com.redhat.delivery.backport=true

Is the awx-resource-operator named correctly, or should that have the name of our operator image (i.e. aap-resource-operator)?

xiangjingli commented 4 years ago

@arewm I have appened the three labels to the bundle image.

The awx-resource-operator is the operator github repo name. Our operator image name is aap-resource-operator. We have similar pracitce in our app lifecycle repos. e.g. our subscription github repo name is multicloud-operators-subscription, while its image name is multicluster-operators-subscription

@mikeshng These Makefile and operator bundle manifest files are necessary for buliding operator/runner/ bundle images in upstream and downstream. I will commit the PR to devel branch for upstream build and cherry pick to release-1.0 branch for downstream build.