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
expectedErr: `error updating pod identity association "kube-system/aws-node": only namespace, serviceAccountNameand roleARN can be specified if the role was not created by eksctl`,
267
+
expectedErr: `error updating pod identity association "kube-system/aws-node": only namespace, serviceAccountName, roleARN and policy can be specified if the role was not created by eksctl`,
266
268
}),
267
269
268
270
Entry("roleName specified when the pod identity association was not created with a roleName", updateEntry{
Copy file name to clipboardExpand all lines: pkg/apis/eksctl.io/v1alpha5/assets/schema.json
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2868,6 +2868,11 @@
2868
2868
"permissionsBoundaryARN": {
2869
2869
"type": "string"
2870
2870
},
2871
+
"policy": {
2872
+
"type": "string",
2873
+
"description": "optional policy that applies additional restrictions to this pod identity association beyond the IAM policies attached to the IAM role.",
2874
+
"x-intellij-html-description": "optional policy that applies additional restrictions to this pod identity association beyond the IAM policies attached to the IAM role."
// Policy is the optional policy that applies additional restrictions to this pod identity association beyond the IAM policies attached to the IAM role.
Copy file name to clipboardExpand all lines: pkg/ctl/cmdutils/pod_identity_association.go
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@ var (
22
22
"create-service-account",
23
23
"target-role-arn",
24
24
"disable-session-tags",
25
+
"policy",
25
26
}
26
27
)
27
28
@@ -181,12 +182,14 @@ type UpdatePodIdentityAssociationOptions struct {
181
182
// DisableSessionTags is a boolean flag to enable or disable session tags.
182
183
// This is used for cross-account pod identity access.
183
184
DisableSessionTags*bool
185
+
// Policy is the optional policy that applies additional restrictions to this pod identity association beyond the IAM policies attached to the IAM role.
186
+
Policy*string
184
187
}
185
188
186
189
// NewUpdatePodIdentityAssociationLoader will load config or use flags for `eksctl update podidentityassociation`.
@@ -74,8 +80,10 @@ func configureCreatePodIdentityAssociationCmd(cmd *cmdutils.Cmd, pia *api.PodIde
74
80
fs.StringVar(&pia.PermissionsBoundaryARN, "permission-boundary-arn", "", "ARN of the policy that is used to set the permission boundary for the role")
75
81
vartargetRoleARNstring
76
82
vardisableSessionTagsbool
83
+
varpolicystring
77
84
fs.StringVar(&targetRoleARN, "target-role-arn", "", "ARN of the target IAM role for cross-account access (default to empty string for no cross-account access)")
78
85
fs.BoolVar(&disableSessionTags, "disable-session-tags", false, "Disable session tags added by EKS Pod Identity (if not provided, session tags are enabled by default)")
86
+
fs.StringVar(&policy, "policy", "", "Optional policy that applies additional restrictions to this pod identity association beyond the IAM policies attached to the IAM role")
0 commit comments