-
Notifications
You must be signed in to change notification settings - Fork 580
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
Add AWSFargateProfile resource #2265
Conversation
Skipping CI for Draft Pull Request. |
78b0067
to
8bd7b32
Compare
8bd7b32
to
2038dc7
Compare
2038dc7
to
eceb96d
Compare
const ( | ||
// maxProfileNameLength isn't defined in the AWS docs but is taken from the | ||
// EKS cluster name max length | ||
maxProfileNameLength = 100 |
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.
Shall we define this once instead of the different variations with the same value?
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.
Not sure, it didn't feel like a given that profile, nodegroup and cluster names have the same max length (although I just checked they do in fact), so it felt better to have different variables.
// +kubebuilder:rbac:groups=core,resources=events,verbs=get;list;watch;create;patch | ||
// +kubebuilder:rbac:groups=controlplane.cluster.x-k8s.io,resources=awsmanagedcontrolplanes;awsmanagedcontrolplanes/status,verbs=get;list;watch | ||
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=awsfargateprofiles,verbs=get;list;watch;create;update;patch;delete | ||
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=awsfargateprofiles/status,verbs=get;update;patch |
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.
Do we also need // +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=clusters;clusters/status,verbs=get;list;watch
?
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.. I've added it to be sure but it does work without it. It doesn't change the generated Role
, I suppose because some other reconciler requests the permissions. The CAPI MachinePool controller doesn't have it listed either for example.
|
||
// FargateProfileSpec defines the desired state of FargateProfile | ||
type FargateProfileSpec struct { | ||
ClusterName string `json:"clusterName,omitempty"` |
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.
Is this needed? Could the cluster name come from the AWSManagedControlPlane
instead?
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.
At the moment Spec.ClusterName
is how I get at the AWSManagedControlPlane
:
in the same way that MachinePool
s use MachinePoolSpec.ClusterName
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've added the missing description to the field
// +kubebuilder:resource:path=awsfargateprofiles,scope=Namespaced,categories=cluster-api | ||
// +kubebuilder:storageversion | ||
// +kubebuilder:subresource:status | ||
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="AWSFargateProfile ready status" |
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.
Perhaps some additional items here like profilename, failure message. What do you think?
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.
added profileName and failureReason
f1454eb
to
17c07e5
Compare
/lgtm |
This PR adds support for setting up Fargate profiles for EKS.
The permissions required for fargate have been added to the role for the controller. Additionally the tests have been updated in light of this change
For final approval: /assign sedefsavas |
/lgtm |
/approve Is adding an e2e test useful here? |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sedefsavas The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thanks @sedefsavas. Yes a e2e test is needed and i created #2317 for this.....this is in the 0.6.5 milestone so i plan to get it implemented this week |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #1786
Special notes for your reviewer:
Checklist:
Release note: