cloudfoundry-incubator / kubecf

Cloud Foundry on Kubernetes
Apache License 2.0
115 stars 62 forks source link

CF_INSTANCE_INDEX env var should be available when deploying with Eirini #1358

Open jimmykarily opened 4 years ago

jimmykarily commented 4 years ago

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.

fargozhu commented 4 years ago

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

jimmykarily commented 4 years ago

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

viovanov commented 4 years ago

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

jimmykarily commented 4 years ago

@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).