-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from restatedev/sgp
SecurityGroupPolicy support
- Loading branch information
Showing
8 changed files
with
261 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ module dev.restate.v1.RestateCluster | |
extends "package://pkg.pkl-lang.org/pkl-k8s/[email protected]#/K8sResource.pkl" | ||
|
||
import "package://pkg.pkl-lang.org/pkl-k8s/[email protected]#/apimachinery/pkg/apis/meta/v1/ObjectMeta.pkl" | ||
import "package://pkg.pkl-lang.org/pkl-k8s/[email protected]#/api/core/v1/PodSpec.pkl" | ||
import "package://pkg.pkl-lang.org/pkl-k8s/[email protected]#/api/core/v1/EnvVar.pkl" | ||
import "package://pkg.pkl-lang.org/pkl-k8s/[email protected]#/api/core/v1/ResourceRequirements.pkl" | ||
import "package://pkg.pkl-lang.org/pkl-k8s/[email protected]#/api/networking/v1/NetworkPolicy.pkl" | ||
|
@@ -40,6 +41,15 @@ class Spec { | |
|
||
/// Compute configuration | ||
class Compute { | ||
/// Specifies the DNS parameters of the Restate pod. Parameters specified here will be merged to the | ||
/// generated DNS configuration based on DNSPolicy. | ||
dnsConfig: PodSpec.PodDNSConfig? | ||
|
||
/// Set DNS policy for the pod. Defaults to "ClusterFirst". Valid values are 'ClusterFirstWithHostNet', | ||
/// 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the | ||
/// policy selected with DNSPolicy. | ||
dnsPolicy: String? | ||
|
||
/// List of environment variables to set in the container; these may override defaults | ||
env: Listing<EnvVar>? | ||
|
||
|
@@ -61,10 +71,14 @@ class Compute { | |
|
||
/// Security configuration | ||
class Security { | ||
/// if set, create a AWS PodIdentityAssociation using the ACK CRD in order to give the Restate pod | ||
/// If set, create an AWS PodIdentityAssociation using the ACK CRD in order to give the Restate pod | ||
/// access to this role and allow the cluster to reach the Pod Identity agent. | ||
awsPodIdentityAssociationRoleArn: String? | ||
|
||
/// If set, create an AWS SecurityGroupPolicy CRD object to place the Restate pod into these security | ||
/// groups | ||
awsPodSecurityGroups: Listing<String>? | ||
|
||
/// Egress rules to allow the cluster to make outbound requests; this is in addition to the default of | ||
/// allowing public internet access and cluster DNS access. Providing a single empty rule will allow | ||
/// all outbound traffic - not recommended | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
amends "package://pkg.pkl-lang.org/pkl-pantry/[email protected]#/generate.pkl" | ||
|
||
import "package://pkg.pkl-lang.org/pkl-k8s/[email protected]#/api/core/v1/ResourceRequirements.pkl" | ||
import "package://pkg.pkl-lang.org/pkl-k8s/[email protected]#/api/core/v1/PodSpec.pkl" | ||
import "package://pkg.pkl-lang.org/pkl-k8s/[email protected]#/api/networking/v1/NetworkPolicy.pkl" | ||
import "package://pkg.pkl-lang.org/pkl-k8s/[email protected]#/api/core/v1/EnvVar.pkl" | ||
|
||
|
@@ -10,6 +11,7 @@ converters { | |
["restateclusters.restate.dev"] { | ||
[List("spec", "compute", "env", "env")] = EnvVar | ||
[List("spec", "compute", "resources")] = ResourceRequirements | ||
[List("spec", "compute", "dnsConfig")] = PodSpec.PodDNSConfig | ||
[List("spec", "security", "networkEgressRules", "networkEgressRule")] = NetworkPolicy.NetworkPolicyEgressRule | ||
[List("spec", "security", "networkPeers", "admin", "admin")] = NetworkPolicy.NetworkPolicyPeer | ||
[List("spec", "security", "networkPeers", "ingress", "ingres")] = NetworkPolicy.NetworkPolicyPeer | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,3 +51,4 @@ mod reconcilers; | |
|
||
/// External CRDs | ||
mod podidentityassociations; | ||
mod securitygrouppolicies; |
Oops, something went wrong.