-
Notifications
You must be signed in to change notification settings - Fork 46
feat: add private nodes support via networkConfig #149
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?
feat: add private nodes support via networkConfig #149
Conversation
|
Thanks to your contribution, the maintainers will review it as soon as they can! |
|
The release note is either empty or incomplete, please consider: |
09d35f2 to
015529a
Compare
|
Hi, @pedro-tamandua thanks for your contribution, can you help fix the DCO workflow? |
Add NetworkConfig to GCENodeClass spec to control external IP allocation and subnet selection for provisioned nodes. Features: - Add NetworkConfig struct with enableExternalIPAccess and subnetwork fields - Implement resolveAccessConfigs() to conditionally disable external IPs - Implement resolveSubnetwork() to allow custom subnet configuration - Update CRD with new networkConfig fields - Simplify CRD validation rules to meet Kubernetes cost limits - Add unit tests for network configuration resolution - Add example manifests for private nodes and custom subnets When enableExternalIPAccess is false, nodes are provisioned without external IP addresses (private nodes), improving security posture. Backward compatible: defaults to existing behavior when networkConfig is not specified. RELEASE NOTE: Add support for private nodes via networkConfig in GCENodeClass to improve security by allowing nodes to be provisioned without external IP addresses. Users can now configure enableExternalIPAccess and subnetwork fields to control network settings. Signed-off-by: pedro-tamandua <[email protected]>
015529a to
170b1ad
Compare
|
DCO workflow fixed. |
jwcesign
left a comment
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.
Thanks @pedro-tamandua
Other lgtm
| NetworkTags []string `json:"networkTags,omitempty"` | ||
| // NetworkConfig specifies network configuration for instances | ||
| // +optional | ||
| NetworkConfig *NetworkConfig `json:"networkConfig,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.
- Put NetworkTags into NetworkConfig field
- It could have multiple network interface, so,
EnableExternalIPAccessandSubnetworkshould be array list. Something like:
type xxx struct {
..
NetworkConfig NetworkConfig
}
type NetworkConfig {
Tags []string
NetworkInterfaces []NetworkInterface
}
type NetworkInterface {
EnableExternalIPAccess bool
Subnetwork string
}

Add NetworkConfig to GCENodeClass spec to control external IP allocation and subnet selection for provisioned nodes.
Features:
When enableExternalIPAccess is false, nodes are provisioned without external IP addresses (private nodes), improving security posture.
Usage Example
apiVersion: karpenter.k8s.gcp/v1alpha1
kind: GCENodeClass
metadata:
name: private-nodes
spec:
networkConfig:
enableExternalIPAccess: false
imageSelectorTerms:
- alias: ContainerOptimizedOS@latest## Testing
resolveAccessConfigsandresolveSubnetworkBackward Compatibility
Fully backward compatible. When
networkConfigis not specified, behavior remains unchanged (nodes get external IPs by default).