-
Notifications
You must be signed in to change notification settings - Fork 56
Support security group names in VPC Resource controller #389
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
Changes from 18 commits
6bbd9d1
830d0f8
2c6e2f9
38059b8
c58a042
57e66e8
eb3f84f
eb8485e
702614e
e03ef8d
6735aa7
12e7f9f
9fbbd1b
04b028b
4360caa
b0b5546
f82aeef
25bc6c3
6709269
88dfd8f
4fb7bdc
ae62cf2
8dfb5d4
e9d5231
6bdcaa3
617f995
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,15 @@ type SecurityGroupPolicySpec struct { | |
PodSelector *metav1.LabelSelector `json:"podSelector,omitempty"` | ||
ServiceAccountSelector *metav1.LabelSelector `json:"serviceAccountSelector,omitempty"` | ||
SecurityGroups GroupIds `json:"securityGroups,omitempty"` | ||
SecurityGroupNames GroupNames `json:"securityGroupNames,omitempty"` | ||
} | ||
|
||
// GroupNames contains the list of security group names that will be applied to the network interface of the pod matching the criteria. | ||
type GroupNames struct { | ||
// Groups is the list of EC2 Security Group Names that need to be applied to the ENI of a Pod. | ||
// +kubebuilder:validation:MinItems=1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should have We need to enforce that both lists combined is not empty though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ya thats a good call out, let me see what we can do here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The non-empty check I believe is checked on CreateNetworkInterface. Do you have different place in mind? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, it would be good to include in CRD validation, let me see how to do this with |
||
// +kubebuilder:validation:MaxItems=5 | ||
GroupNames []string `json:"groupNames,omitempty"` | ||
} | ||
|
||
// GroupIds contains the list of security groups that will be applied to the network interface of the pod matching the criteria. | ||
|
@@ -45,6 +54,7 @@ type ServiceAccountSelector struct { | |
|
||
// +kubebuilder:object:root=true | ||
// +kubebuilder:printcolumn:name="Security-Group-Ids",type=string,JSONPath=`.spec.securityGroups.groupIds`,description="The security group IDs to apply to the elastic network interface of pods that match this policy" | ||
// +kubebuilder:printcolumn:name="Security-Group-Names",type=string,JSONPath=`.spec.securityGroups.groupNames`,description="The security group names to apply to the elastic network interface of pods that match this policy" | ||
// +kubebuilder:resource:shortName=sgp | ||
|
||
// Custom Resource Definition for applying security groups to pods | ||
|
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.
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.
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.
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.
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.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.