Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

[kiali] use kiali operator to install and manage kiali #622

Closed
wants to merge 3 commits into from

Conversation

jmazzitelli
Copy link
Member

@jmazzitelli jmazzitelli commented Nov 19, 2019

(work on this PR is on hold until the monorepo PR is merged, then we can merge the work done here and istio/installer#556)

@jmazzitelli jmazzitelli added the do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. label Nov 19, 2019
@jmazzitelli jmazzitelli requested a review from a team as a code owner November 19, 2019 19:26
@istio-testing istio-testing removed the do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. label Nov 19, 2019
@googlebot googlebot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label Nov 19, 2019
@istio-testing istio-testing added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 19, 2019
Copy link
Member

@morvencao morvencao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run

BUILD_WITH_CONTAINER=0 make update-goldens
make clean gen

to make the tests pass.

@jmazzitelli jmazzitelli added the do-not-merge Block automatic merging of a PR. label Nov 20, 2019
@jmazzitelli
Copy link
Member Author

Please run...

In the CONTRIBUTING.adoc (or somewhere here - README maybe) you should explain to new developers what their GO env var should be. GOPATH / GOROOT. Mine are set for my own projects, but if I am to run BUILD_WITH_CONTAINER=0 make update-goldens I need to set my GO env vars to something else. I tried this but it isn't working:

$ export GOROOT=$(pwd)
$ export GOPATH=$(pwd)
$ BUILD_WITH_CONTAINER=0 make update-goldens
Building with your local toolchain.
REFRESH_GOLDEN=true go test ./cmd/mesh/...
warning: GOPATH set to GOROOT (/home/jmazzite/source/istio.io/operator) has no effect
cmd/mesh/manifest-migrate.go:18:2: cannot find package "encoding/json" in any of:
	/home/jmazzite/source/istio.io/operator/src/encoding/json (from $GOROOT)
	($GOPATH not set. For more details see: 'go help gopath')
... and more errors...

What should be my GOPATH/GOROOT?

@istio-testing istio-testing added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 20, 2019
@jmazzitelli
Copy link
Member Author

jmazzitelli commented Nov 20, 2019

BUILD_WITH_CONTAINER=0 make update-goldens
make clean gen

I think you need BUILD_WITH_CONTAINER=0 when running make clean gen, too.. e.g.:

export BUILD_WITH_CONTAINER=0
make update-goldens
make clean gen

At least when I do that, make is doing something. I dunno.. all I know is, its starting to work now.

@jmazzitelli
Copy link
Member Author

I have no idea what mandiff is telling me nor what is wrong. default profile has diffs ?

@jmazzitelli
Copy link
Member Author

I ran "make update-charts" and "make generate-types generate-values" just to see if there is anything else I need to do (I'm just guessing - looking at the Makefiles to see what targets are available to run). They changed nothing. So, without documentation directing me on how to develop in this operator repo, I'm going to have to ask that someone "in the know" either tell me what else needs to be done or try to complete the changes required. Right now I'm stumped.

@sdake
Copy link
Member

sdake commented Nov 25, 2019

Please run

BUILD_WITH_CONTAINER=0 make update-goldens
make clean gen

to make the tests pass.

@morvencao why must BUILD_WITH_CONTAINER=0 need be set? If the concern is over HUB/TAG overrides, a) I believe @howardjohn has fixed that b) if he hasn't I will fix it as soon as I have a test case where it is broken c) unset HUB;unset TAG 😀

If there is some other concern, please let me know. This repo is on the BUILD_WITH_CONTAINER plan, and as such, there should be no good reason to turn off BUILD_WITH_CONTAINER - unless as a developer you want to develop with your own dependencies.

Cheers
-steve

@sdake
Copy link
Member

sdake commented Nov 25, 2019

@jmazzitelli my environment on Linux is:

sdake@beast-01:~$ env
TAG=sdake
XDG_SESSION_ID=865
TERM=xterm-256color
SHELL=/bin/bash
ISTIO=/home/sdake/go/src/istio.io
SSH_CLIENT=192.168.7.225 56633 22
SSH_TTY=/dev/pts/0
USER=sdake
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
KUBECONFIG=/home/sdake/.kube/config
MAIL=/var/mail/sdake
PATH=/home/sdake/bin:/home/sdake/.local/bin:/home/sdake/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/usr/local/kubebuilder_1.0.8_linux_amd64/bin:/home/sdake/go/bin
PWD=/home/sdake
LANG=en_US.UTF-8
SHLVL=1
HOME=/home/sdake
GITHUB_USER=sdake
LOGNAME=sdake
HUB=docker.io/sdake
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
SSH_CONNECTION=192.168.7.225 56633 192.168.7.105 22
GOPATH=/home/sdake/go
LESSOPEN=| /usr/bin/lesspipe %s
XDG_RUNTIME_DIR=/run/user/1000
LESSCLOSE=/usr/bin/lesspipe %s %s
_=/usr/bin/env

TLDR;

unset GOROOT
export GOPATH=$HOME/go
mkdir -p $HOME/go/src/istio.io
cd $HOME/go/src/istio.io
git clone https://jmazzitelli/operator
cd operator
make update-goldens

That - coupled with other comments in this review, should get you going.

Please have a read of this (very dated) wiki that explains how to install the various toolchains:

@sdake
Copy link
Member

sdake commented Nov 25, 2019

I have no idea what mandiff is telling me nor what is wrong. default profile has diffs ?

I don't know either and it is very frustrating. When @ostromart says why - and you understand it, would you be kind enough to document it in our developer wiki:
https://github.com/istio/istio/wiki

@sdake
Copy link
Member

sdake commented Nov 25, 2019

I ran "make update-charts" and "make generate-types generate-values" just to see if there is anything else I need to do (I'm just guessing - looking at the Makefiles to see what targets are available to run). They changed nothing. So, without documentation directing me on how to develop in this operator repo, I'm going to have to ask that someone "in the know" either tell me what else needs to be done or try to complete the changes required. Right now I'm stumped.

@jmazzitelli all of Istio's repos have a make gen target which is in theory meant to call all code-generators and generate all code. If that isn't working correctly because of BUILD_WITH_CONTAINER bugs, can someone do me a solid and file a bug with a reproducer that is intelligible, assign to me, and I'll fix?

Cheers
-steve

@jmazzitelli
Copy link
Member Author

jmazzitelli commented Nov 25, 2019

Please have a read of this (very dated) wiki that explains how to install the various toolchains:

@sdake I assume you meant to include a link here?

I just ran "make update-goldens" and got this:

$ make update-goldens
Building with the build container: gcr.io/istio-testing/build-tools:master-2019-11-08T17-21-18.
Using docker credential directory /home/jmazzite/.docker.
REFRESH_GOLDEN=true go test ./cmd/mesh/...
exit status 255
FAIL	istio.io/operator/cmd/mesh	1.249s
FAIL
Makefile.core.mk:88: recipe for target 'update-goldens' failed
make: *** [update-goldens] Error 1
make: *** [update-goldens] Error 2

There is something wrong in my branch to cause the failure, but I don't know what the error is (nothing in those messages above help)... if I run this in master branch, it finishes successfully.

I tried with and without "export BUILD_WITH_CONTAINER=0" - both fail in my branch, but with no error messages to point me in the direction of how to fix.

@jmazzitelli
Copy link
Member Author

There is something wrong in my branch to cause the failure, but I don't know what the error is

The error is because the "manifest generate" command fails with a exit code of 255. It is probably because I didn't update-charts. But I can't update charts because my other PR in istio/installer isn't merged yet, but of course I can't merge it until I can confirm THAT PR works, and I can only confirm THAT PR works if I can run and test THIS PR to confirm that it works. It's a catch-22. I can't merge the istio/installer PR until I confirm this istio/operator PR works, but I can't build/test this istio/operator PR until I merge istio/installer PR.

So, in short, the way these two installer/operator repos work together make it pretty much impossible for a contributor to contribute to them. This needs to be fixed. As it is now, working in these two repos requires the person to have intimate knowledge of the make targets and the build scripts in both repos (none of this is documented) to get this to build and test locally to confirm everything works and get the tests to pass.

@howardjohn
Copy link
Member

@jmazzitelli I, and I think everyone else working on this, completely agrees its a huge mess right now. We are working right now to make this a lot simpler hopefully, see istio/istio#19146. Sorry that its in the current state right now

@istio-testing
Copy link

@jmazzitelli: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
mandiff_operator f3441e9 link /test mandiff_operator
gencheck_operator f3441e9 link /test gencheck_operator
e2e_operator f3441e9 link /test e2e_operator

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@istio-policy-bot
Copy link

🚧 This issue or pull request has been closed due to not having had activity from an Istio team member since 2019-11-27. If you feel this issue or pull request deserves attention, please reopen the issue. Please see this wiki page for more information. Thank you for your contributions.

Created by the issue and PR lifecycle manager.

@istio-policy-bot istio-policy-bot added the lifecycle/automatically-closed Indicates a PR or issue that has been closed automatically. label Jan 13, 2020
@jmazzitelli jmazzitelli deleted the kiali-operator branch January 13, 2020 19:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. do-not-merge Block automatic merging of a PR. lifecycle/automatically-closed Indicates a PR or issue that has been closed automatically. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
7 participants