-
Notifications
You must be signed in to change notification settings - Fork 91
Closed
Labels
Description
Blockers/Dependencies
- [Feature]: Developer can target a
cf-k8sfoundation viacf apicf-k8s-api#10 - [Feature]: Developer can
cf loginto acf-k8sfoundation cf-k8s-api#56
Background
When switching from an API to the other, the CLI deletes the user authentication tokens so that the user is effectively logged out. When working against cf-k8s, the equivalent of those tokens is the reference to the auth-info in use, which in turn allows us to retrive the tokens/certs. When switching to a different API, this information should be deleted too.
Acceptance Criteria
GIVEN I am logged into a cf-k8s API (e.g. I have selected an auth-info)
WHEN I run cf api against a different cf-k8s API
THEN I see something like this in $CF_HOME/config.json:
"CFOnK8s": {
"Enabled": true,
"AuthInfo": ""
}GIVEN I am logged into a cf-k8s API
WHEN I run cf api against a traditional CF API
THEN I see something like this in $CF_HOME/config.json:
"CFOnK8s": {
"Enabled": false,
"AuthInfo": ""
}Dev Notes
There's a couple of ways we can achieve this.
- One way is to add the Kubernetes specific behaviour to the existing one, as we know they're not going to interfere. This is what we do in the spike (although the functionality discussed in this story would be achieved by changing the
SetTargetmethod, notClearTarget). - Alternatively, we could consider adding a
ClearTokenInformationmethod to theConfiginterface and have separate implementations. This would be more elegant but we would end up with an asymmetry:ClearTokenInformationwould be used to undoSetTokenInformationin one case and to undoSetKubernetesUserin the other.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
✅ Done