-
Notifications
You must be signed in to change notification settings - Fork 635
✨ feat: Add IRSA support for self-managed clusters (rebase) #5109
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package v1beta2 | ||
|
||
import ( | ||
"k8s.io/apimachinery/pkg/util/validation/field" | ||
|
||
"sigs.k8s.io/cluster-api-provider-aws/v2/feature" | ||
) | ||
|
||
// Validate will validate the spec fields. | ||
func (s *AWSClusterSpec) Validate() []*field.Error { | ||
var errs field.ErrorList | ||
|
||
// Check the feature gate is enabled for OIDC Provider. | ||
if s.AssociateOIDCProvider && !feature.Gates.Enabled(feature.OIDCProviderUnmanagedClusters) { | ||
errs = append(errs, | ||
field.Forbidden(field.NewPath("spec", "associateOIDCProvider"), | ||
"can be enabled only if the OIDCProviderUnmanagedClusters feature gate is enabled"), | ||
) | ||
return errs | ||
} | ||
|
||
return errs | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this removed on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, this PR was based on work started by @luthermonson so I don't have the full history.
I see the check still exists in the v1beta2 validation, so I'll revert this and do some tests.