Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JoshVanL The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold |
26aa55e to
02f85b5
Compare
|
/hold cancel |
|
🙃 |
pkg/issuer/vault/setup.go
Outdated
| v.issuer.GetSpec().Vault.Auth.AppRole.SecretRef.Name == "" { | ||
| v.issuer.GetSpec().Vault.Auth.AppRole.SecretRef.Name == "" && | ||
| v.issuer.GetSpec().Vault.Auth.Kubernetes.Role == "" && | ||
| v.issuer.GetSpec().Vault.Auth.Kubernetes.SecretRef.Name == "" { |
There was a problem hiding this comment.
Instead of checking particular fields of these different auth types, we should make each auth type structure a pointer and then just check if they are nil here. This is super messy right now and could really confuse users IMO.
pkg/issuer/vault/setup.go
Outdated
| v.issuer.GetSpec().Vault.Auth.Kubernetes.SecretRef.Name != "" && | ||
| (v.issuer.GetSpec().Vault.Auth.AppRole.RoleId != "" || | ||
| v.issuer.GetSpec().Vault.Auth.AppRole.SecretRef.Name != "" || | ||
| v.issuer.GetSpec().Vault.Auth.TokenSecretRef.Name != "") { |
There was a problem hiding this comment.
I'm not even going to try and parse this combination of &&, (, ) and || to understand this 🙈
|
|
||
| // CleanKubernetesRole cleans up the ClusterRoleBinding and ServiceAccount for Kubernetes auth delegation | ||
| func (v *VaultInitializer) CleanKubernetesRole(client kubernetes.Interface, namespace, roleName, serviceAccountName string) error { | ||
| client.RbacV1().ClusterRoleBindings().Delete(fmt.Sprintf("%s:%s:auth-delegator", namespace, serviceAccountName), nil) |
There was a problem hiding this comment.
nit (not essential given this is test code) - is there any way to not have to re-template this? It's a bit annoying and given we don't check errors from this method, if we change something in future it's unlikely we'll notice this line breaking.
4d29860 to
723b675
Compare
723b675 to
ae1af2f
Compare
ae1af2f to
82ea2f4
Compare
4e08719 to
c4b55c9
Compare
|
/retest |
c4b55c9 to
0324959
Compare
| // `/v1/auth/foo/login`. If unspecified, the default value "kubernetes" will | ||
| // be used. | ||
| // +optional | ||
| Path string `json:"mountPath"` |
There was a problem hiding this comment.
Add ,omitempty to optional fields 😄
Signed-off-by: Adam Kunicki <adam@streamsets.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
dcc570f to
5ae6be9
Compare
| apiext "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" | ||
| metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
|
|
||
| cmmeta "github.com/jetstack/cert-manager/pkg/apis/meta/v1" |
There was a problem hiding this comment.
nit: unnecessary/incorrect change
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
5ae6be9 to
e1875bc
Compare
|
/retest |
|
/lgtm |
|
/retest |
fixes #647
Taking over from #649