Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for CredentialsBindings #521

Open
etiennnr opened this issue Feb 19, 2025 · 0 comments
Open

Add support for CredentialsBindings #521

etiennnr opened this issue Feb 19, 2025 · 0 comments
Labels
component/gardenctl Gardener CLI kind/enhancement Enhancement, improvement, extension

Comments

@etiennnr
Copy link
Contributor

What would you like to be added:
Right now, when using provider-env to login to the Cloud provider CLI, gardenctl fetches the credentials based on the shoot's secretBindingName

if (shoot.Spec.SecretBindingName == nil || *shoot.Spec.SecretBindingName == "") &&
(shoot.Spec.CredentialsBindingName == nil || *shoot.Spec.CredentialsBindingName == "") {
return fmt.Errorf("shoot %q is not bound to a cloud provider credential", o.Target.ShootName())
}
var (
secretName string
secretNamespace string
)
if shoot.Spec.SecretBindingName != nil && *shoot.Spec.SecretBindingName != "" {
secretBinding, err := client.GetSecretBinding(ctx, shoot.Namespace, *shoot.Spec.SecretBindingName)
if err != nil {
return err
}
secretName = secretBinding.SecretRef.Name
secretNamespace = secretBinding.SecretRef.Namespace

However, with GEP-26, a new way of authenticating using CredentialsBindings has been added. The end goal of CredentialsBindings is to enable thrust based authentication (which would probably break the provider-env feature anyway), however it also supports secrets referencing (similar to the way secretBindings works, but the format is a bit different, see https://github.com/gardener/gardener/blob/master/example/80-credentialsbinding.yaml)

Why is this needed:

Support the case where we are using CredentialsBindings that is still referencing a secret, aka not break the feature.

@etiennnr etiennnr added component/gardenctl Gardener CLI kind/enhancement Enhancement, improvement, extension labels Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/gardenctl Gardener CLI kind/enhancement Enhancement, improvement, extension
Projects
None yet
Development

No branches or pull requests

1 participant