mirror of
https://github.com/external-secrets/external-secrets.git
synced 2024-12-14 11:57:59 +00:00
also make optional for v1beta1 and add note to docs
This commit is contained in:
parent
739043283c
commit
2f53ab8220
6 changed files with 9 additions and 5 deletions
|
@ -35,7 +35,7 @@ type GCPWorkloadIdentity struct {
|
|||
ServiceAccountRef esmeta.ServiceAccountSelector `json:"serviceAccountRef"`
|
||||
ClusterLocation string `json:"clusterLocation"`
|
||||
ClusterName string `json:"clusterName"`
|
||||
ClusterProjectID string `json:"clusterProjectID"`
|
||||
ClusterProjectID string `json:"clusterProjectID,omitempty"`
|
||||
}
|
||||
|
||||
// GCPSMProvider Configures a store to sync secrets using the GCP Secret Manager provider.
|
||||
|
|
|
@ -1769,7 +1769,6 @@ spec:
|
|||
required:
|
||||
- clusterLocation
|
||||
- clusterName
|
||||
- clusterProjectID
|
||||
- serviceAccountRef
|
||||
type: object
|
||||
type: object
|
||||
|
|
|
@ -1772,7 +1772,6 @@ spec:
|
|||
required:
|
||||
- clusterLocation
|
||||
- clusterName
|
||||
- clusterProjectID
|
||||
- serviceAccountRef
|
||||
type: object
|
||||
type: object
|
||||
|
|
|
@ -1314,7 +1314,6 @@ spec:
|
|||
required:
|
||||
- clusterLocation
|
||||
- clusterName
|
||||
- clusterProjectID
|
||||
- serviceAccountRef
|
||||
type: object
|
||||
type: object
|
||||
|
@ -3759,7 +3758,6 @@ spec:
|
|||
required:
|
||||
- clusterLocation
|
||||
- clusterName
|
||||
- clusterProjectID
|
||||
- serviceAccountRef
|
||||
type: object
|
||||
type: object
|
||||
|
|
|
@ -12,6 +12,8 @@ spec:
|
|||
clusterLocation: europe-central2
|
||||
# name of the GKE cluster
|
||||
clusterName: example-workload-identity
|
||||
# projectID of the cluster (if omitted defaults to spec.provider.gcpsm.projectID)
|
||||
clusterProjectID: my-cluster-project
|
||||
# reference the sa from above
|
||||
serviceAccountRef:
|
||||
name: team-a
|
||||
|
|
|
@ -44,6 +44,7 @@ type workloadIdentityTest struct {
|
|||
genAccessToken func(context.Context, *credentialspb.GenerateAccessTokenRequest, ...gax.CallOption) (*credentialspb.GenerateAccessTokenResponse, error)
|
||||
genIDBindToken func(ctx context.Context, client *http.Client, k8sToken, idPool, idProvider string) (*oauth2.Token, error)
|
||||
genSAToken func(c context.Context, s1, s2, s3 string) (*authv1.TokenRequest, error)
|
||||
genClusterID func(context.Context, *esv1beta1.SecretStore) (*oauth2.Token, error)
|
||||
store esv1beta1.GenericStore
|
||||
kubeObjects []client.Object
|
||||
}
|
||||
|
@ -268,6 +269,11 @@ func defaultTestCase(name string) *workloadIdentityTest {
|
|||
},
|
||||
}, nil
|
||||
},
|
||||
genClusterID: func(context.Context, *esv1beta1.SecretStore) (*oauth2.Token, error) {
|
||||
return &oauth2.Token{
|
||||
AccessToken: defaultGenAccessToken,
|
||||
}, nil
|
||||
},
|
||||
kubeObjects: []client.Object{
|
||||
&v1.ServiceAccount{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
|
|
Loading…
Reference in a new issue