mirror of
https://github.com/external-secrets/external-secrets.git
synced 2024-12-14 11:57:59 +00:00
feat: set default namespace on vault secretStore (namespaced ressource) (#2869)
* feat: set default namespace on vault secretStore Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr> * fix: unit test Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr> * feat: remove depreciation message Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr> --------- Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr>
This commit is contained in:
parent
6bffc9563f
commit
0a02f73142
2 changed files with 9 additions and 5 deletions
|
@ -1067,8 +1067,9 @@ func (v *client) newConfig() (*vault.Config, error) {
|
|||
|
||||
func getCertFromSecret(v *client) ([]byte, error) {
|
||||
secretRef := esmeta.SecretKeySelector{
|
||||
Name: v.store.CAProvider.Name,
|
||||
Key: v.store.CAProvider.Key,
|
||||
Name: v.store.CAProvider.Name,
|
||||
Namespace: &v.namespace,
|
||||
Key: v.store.CAProvider.Key,
|
||||
}
|
||||
|
||||
if v.store.CAProvider.Namespace != nil {
|
||||
|
@ -1086,7 +1087,8 @@ func getCertFromSecret(v *client) ([]byte, error) {
|
|||
|
||||
func getCertFromConfigMap(v *client) ([]byte, error) {
|
||||
objKey := types.NamespacedName{
|
||||
Name: v.store.CAProvider.Name,
|
||||
Name: v.store.CAProvider.Name,
|
||||
Namespace: v.namespace,
|
||||
}
|
||||
|
||||
if v.store.CAProvider.Namespace != nil {
|
||||
|
|
|
@ -437,7 +437,8 @@ MIIFkTCCA3mgAwIBAgIUBEUg3m/WqAsWHG4Q/II3IePFfuowDQYJKoZIhvcNAQELBQAwWDELMAkGA1UE
|
|||
ns: "default",
|
||||
kube: clientfake.NewClientBuilder().WithObjects(&corev1.ConfigMap{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "vault-cert",
|
||||
Name: "vault-cert",
|
||||
Namespace: "default",
|
||||
},
|
||||
Data: map[string]string{
|
||||
"cert": string(clientCrt),
|
||||
|
@ -467,7 +468,8 @@ MIIFkTCCA3mgAwIBAgIUBEUg3m/WqAsWHG4Q/II3IePFfuowDQYJKoZIhvcNAQELBQAwWDELMAkGA1UE
|
|||
},
|
||||
}, &corev1.ConfigMap{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "vault-cert",
|
||||
Name: "vault-cert",
|
||||
Namespace: "default",
|
||||
},
|
||||
Data: map[string]string{},
|
||||
}).Build(),
|
||||
|
|
Loading…
Reference in a new issue