You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/clusters/v1alpha1/accessrequest_types.go
+24-7Lines changed: 24 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ const (
16
16
17
17
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.clusterRef) || has(self.clusterRef)", message="clusterRef may not be removed once set"
18
18
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.requestRef) || has(self.requestRef)", message="requestRef may not be removed once set"
19
+
// +kubebuilder:validation:XValidation:rule="(has(self.token) && !has(self.oidc)) || (!has(self.token) && has(self.oidc))",message="exactly one of spec.token or spec.oidc must be set"
19
20
typeAccessRequestSpecstruct {
20
21
// ClusterRef is the reference to the Cluster for which access is requested.
21
22
// If set, requestRef will be ignored.
@@ -31,21 +32,37 @@ type AccessRequestSpec struct {
0 commit comments