kubecf icon indicating copy to clipboard operation
kubecf copied to clipboard

CF_INSTANCE_INDEX env var should be available when deploying with Eirini

Open jimmykarily opened this issue 4 years ago • 4 comments

This is a needed feature + it breaks some CATs (e.g. https://github.com/cloudfoundry/cf-acceptance-tests/blob/46f2bb669c30fa03a46201980454f6b8beaca789/ssh/ssh.go#L67).

This has already been fixed in upstream Eirini (https://github.com/cloudfoundry-incubator/eirini/blob/master/cmd/instance-index-env-injector/main.go) but it's not yet part of any eirini-release release so we don't consume it yet in kubecf. If we need it before Eirini is released with that, we can just use the code in the Eirini repo to build it and consume it in kubecf like we do with the rest of the eirinix plugins.

jimmykarily avatar Sep 22 '20 09:09 jimmykarily

@jimmykarily Eirni 1.9.0 is out with CF_INSTANCE_INDEX support and a bump card created in our board #1380

fargozhu avatar Sep 25 '20 07:09 fargozhu

We needed that so we used the code from Eirini master (before the release) to build it. It can be added like this: https://github.com/cloudfoundry-incubator/kubecf/commit/2e75a190a4bdf515a4d17bfe60ea11a5d26f6ad2

Commit is part of this branch: https://github.com/cloudfoundry-incubator/kubecf/tree/dk/cats_debug

jimmykarily avatar Sep 25 '20 08:09 jimmykarily

@jimmykarily is there a release of Eirini we can use that has this available yet?

viovanov avatar Nov 05 '20 17:11 viovanov

@viovanov 1.9.0 seems to have it: https://github.com/cloudfoundry-incubator/eirini-release/releases/tag/v1.9.0 (https://github.com/cloudfoundry-incubator/eirini-release/blob/master/helm/eirini/templates/instance-index-env-injector.yml). Given we no longer consume eirini-release directly but have our own copies of yaml in mixins, maybe this is a no-op. I mean, we just ported that component before we bumped the rest of them. If I'm not mistaken, we simply have to build the index injector image based on 1.9.0 code instead of master: https://github.com/SUSE/scf-eirini-ci/blob/master/pipeline.yaml.gomplate#L337 and make sure we consume the new image (assuming we bump all eirini components to 1.9.0, that is).

jimmykarily avatar Nov 06 '20 07:11 jimmykarily