Open cmoulliard opened 5 years ago
I did a new test with oc cluster up running in a VM on Mac and get more or less the same errors
make setup install run
#@echo Installing operator-sdk cli
#cd vendor/github.com/operator-framework/operator-sdk/commands/operator-sdk/ && go install .
Installing dep
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5110 100 5110 0 0 5110 0 0:00:01 --:--:-- 0:00:01 17440
ARCH = amd64
OS = darwin
Will install into /Users/dabou/Code/go-workspace/bin
Fetching https://github.com/golang/dep/releases/latest..
Release Tag = v0.5.0
Fetching https://github.com/golang/dep/releases/tag/v0.5.0..
Fetching https://github.com/golang/dep/releases/download/v0.5.0/dep-darwin-amd64..
Setting executable permissions.
Moving executable to /Users/dabou/Code/go-workspace/bin/dep
Installing errcheck
setup complete run make build deploy to build and deploy the operator to a local cluster
kubectl create -f deploy/crd.yaml
Unable to connect to the server: dial tcp 192.168.65.24:8443: i/o timeout
make: [install_crds] Error 1 (ignored)
oc new-project integration-services
Unable to connect to the server: dial tcp 192.168.65.24:8443: i/o timeout
make: [install] Error 1 (ignored)
kubectl create --insecure-skip-tls-verify -f deploy/rbac.yaml -n integration-services
Unable to connect to the server: dial tcp 192.168.65.24:8443: i/o timeout
make: [install] Error 1 (ignored)
operator-sdk up local --namespace=integration-services --operator-flags="--resync=20 --log-level=debug"
ERRO[0000] failed to initialize service object for operator metrics: OPERATOR_NAME must be set
INFO[0000] Go Version: go1.10.2
INFO[0000] Go OS/Arch: darwin/amd64
INFO[0000] operator-sdk Version: 0.0.6
INFO[0000] config: insecure requests to services with self signed certs are enabled: false
INFO[0000] config: EnMasse namespace is set to enmasse
INFO[0000] config: fuse namespace is set to integration-services
INFO[0000] config: resync interval is set to20
INFO[0000] consig: loglevel debug
E0927 20:15:35.609011 3562 memcache.go:144] couldn't get current server API group list; will keep using cached value. (Get https://192.168.65.24:8443/api: dial tcp 192.168.65.24:8443: i/o timeout)
panic: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory
goroutine 1 [running]:
main.main()
/Users/dabou/Code/go-workspace/src/github.com/integr8ly/integration-controller/cmd/integration-controller/main.go:123 +0xd03
exit status 2
Error: failed to run operator locally: exit status 1
make: *** [run] Error 1
Don't worry about messages such Unable to connect to the server: dial tcp 192.168.65.24:8443
. This is resolved as my kube/config file was not correct
How can we pass (ENV_VAr, ...) or define the serviceaccount that the controller would like to use panic: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory
?
@cmoulliard thanks for this info. You can set an env var SA_TOKEN
if not running in k8s. I will update the docs to reflect this change. It is also worth bearing in mind that it wont really do anything unless other products are also present.
you should now be able to do make install run
locally and it will start up the controller
I suspect that the error is related to this message
panic: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory
Do we need any specific version of openshift to install it ? Can we use minishift ? Why do you use
kubectl
within the makefile instead of oc askubectl
is perhaps not installed locally ?