How does someone modify the yaml that is baked into istioctl?

Hey Istio Folks,

This is likely my inexperience with go, but I’m having a heck of a time figuring out where to make edits to yaml so that I see my edits in a copy of istioctl that I built locally. I followed https://github.com/istio/istio/wiki/Preparing-for-Development, and can now $ make istioctl-all and get an istioctl-linux build in out/linux_amd64/release. That’s all great.

Now, suppose I want to tackle a bug I reported: https://github.com/istio/istio/issues/19763 . Presumably I need to edit yaml somewhere and add a

accessLogFormat: {{ .Values.global.proxy.accessLogFormat }}

line, but I have no idea where that somewhere is. Do I need a local copy of https://github.com/istio/installer/ checked out? If so, where do I put that checkout, and how do I cause my local istioctl builder to build against my istio/installer checkout? Maybe I’m on an entirely wrong track?

Sorry for the n00b questions; I appreciate any help in advance!

Taylor

Hi Taylor,
The easiest way to try out your change is to use the -f flag to point to an IstioControlPlane manifest that has installPackagePath set to the local file path to the charts where you’re making changes (https://istio.io/docs/setup/install/istioctl/#install-from-external-charts).
Then, when your changes are good, create a PR in istio/installer and they will eventually make it into istioctl when SHAs are updated.
We’re in the process of merging the installer and operator repos into istio/istio so the syncing process will be simplified soon.
Martin

Hey @ostromart - thanks for pointing me in the right direction. I ended up checking out istio/operator, istio/installer and istio/istio, testing changes in istio/operator, and then making a commit to istio/installer. Setup took a while, but when I got everything working it went well. Simplification of the dev process would definitely be nice. I appreciate the help!

For anyone else looking for an answer to this, here’s what I ended up doing:

  • Get go set up as you normally would.
  • Clone istio/istio, istio/installer, and istio/operator into $GOPATH/src/istio.io/
  • Make whatever edits you need to istio.io/installer
  • Set environment variable $INSTALLER_DIR to your istio.io/installer checkout directory
  • Run istio.io/istio/operator/scripts/run_update_charts.sh
  • cd into istio.io/operator/pkg/vfs and run go generate to generate a new assets.gen.go
  • Force your istio.io/istio checkout to reference your local istio.io/operator checkout by adding replace istio.io/operator => ../operator to istio.io/istio/go.mod.
  • Within istio.io/istio run make clean && make istioctl-all. The resulting istioctl* binaries in out/linux_amd64/release/ will contain your YAML changes that you made to istio/installer. When deploying via istioctl, you may need to throw a --set values.global.tag=1.4.2 or whatever onto your istioctl invocation to pull down images that actually exist.