Operator sdk: Manager-controller image not found.

33 views
Skip to first unread message

Majid M A

unread,
Nov 24, 2020, 11:28:57 AM11/24/20
to Operator Framework
Hello All,

I am running the ansible playbook in operator-sdk from jenkins job. 

I am giving certain inputs to jenkins job that triggers the reconciliation and after the controller-manager pod goes into "CrashLoopBackOff" state, but if we run this locally the controller-manager pod creates without any issues.

Moreover if i see the manager.yaml deployment file (config/manager/manager.yaml), the controller is not pulled from any repo, its says image: controller:latest

My question is how can i specify the controller image which should be pulled from a repo ?
How can i generate the image so that i can put this in repo and pull it ?

Any advice is really appreciated.

The following is the deployment yaml for controller manager.

apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
namespace: system
labels:
control-plane: controller-manager
spec:
selector:
matchLabels:
control-plane: controller-manager
replicas: 1
template:
metadata:
labels:
control-plane: controller-manager
spec:
containers:
- name: manager
args:
- "--enable-leader-election"
- "--leader-election-id=ab-xx-yy-zz"
env:
- name: ANSIBLE_GATHERING
value: explicit
image: controller:latest
terminationGracePeriodSeconds: 10

Thanks & Regards,
Majid M A

Eric Stroczynski

unread,
Nov 24, 2020, 3:08:49 PM11/24/20
to Majid M A, Operator Framework
Hi Majid,

You'll notice in the Ansible tutorial that the `IMG=<your operator image>` variable is set before deploying your operator. By doing so, `make deploy` will run `kustomize edit set image controller=<your operator image>` before deploying your operator, which will update your deployment. Try running `make deploy IMG=<your operator image>`. Hope that helps!

Eric

--
You received this message because you are subscribed to the Google Groups "Operator Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to operator-framew...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/operator-framework/9cc64a30-3365-4004-892b-d2e314a27d9fn%40googlegroups.com.


--
Eric Stroczynski
Senior Software Engineer
Operator SDK Team
Red Hat Inc. San Francisco Office

Majid M A

unread,
Nov 25, 2020, 10:21:45 AM11/25/20
to Eric Stroczynski, Operator Framework
Hello Eric,

Many Thanks, your suggestion of using `make deploy IMG=<your operator image>` works.

Thanks & Regards,
Majid M A
Reply all
Reply to author
Forward
0 new messages