-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRestateCluster.pkl
189 lines (142 loc) · 6.84 KB
/
RestateCluster.pkl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
/// RestateCluster describes the configuration and status of a Restate cluster.
///
/// This module was generated from the CustomResourceDefinition at <file:./crd/crd.yaml>.
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/core/v1/Toleration.pkl"
import "package://pkg.pkl-lang.org/pkl-k8s/[email protected]#/api/networking/v1/NetworkPolicy.pkl"
fixed apiVersion: "restate.dev/v1"
fixed kind: "RestateCluster"
/// Standard object's metadata.
///
/// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>.
metadata: ObjectMeta?
/// Represents the configuration of a Restate Cluster
spec: Spec
/// Status of the RestateCluster. This is set and managed automatically. Read-only. More info:
/// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
status: Status?
/// Represents the configuration of a Restate Cluster
class Spec {
/// clusterName sets the RESTATE_CLUSTER_NAME environment variable. Defaults to the object name.
clusterName: String?
/// Compute configuration
compute: Compute
/// TOML-encoded Restate config file
config: String?
/// Security configuration
security: Security?
/// Storage configuration
storage: Storage
}
/// 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>?
/// Container image name. More info: https://kubernetes.io/docs/concepts/containers/images.
image: String
/// Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is
/// specified, or IfNotPresent otherwise. More info:
/// https://kubernetes.io/docs/concepts/containers/images#updating-images
imagePullPolicy: String?
/// If specified, a node selector for the pod
nodeSelector: Mapping<String, String>?
/// replicas is the desired number of Restate nodes. If unspecified, defaults to 1.
replicas: Int?
/// Compute Resources for the Restate container. More info:
/// https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
resources: ResourceRequirements?
/// If specified, the pod's tolerations.
tolerations: Listing<Toleration>?
}
/// Security configuration
class Security {
/// 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
networkEgressRules: Listing<NetworkPolicy.NetworkPolicyEgressRule>?
/// Network peers to allow inbound access to restate ports If unset, will not allow any new traffic.
/// Set any of these to [] to allow all traffic - not recommended.
networkPeers: NetworkPeers?
/// If set, configure the use of a private key to sign outbound requests from this cluster
requestSigningPrivateKey: RequestSigningPrivateKey?
/// Annotations to set on the ServiceAccount created for Restate
serviceAccountAnnotations: Mapping<String, String>?
/// Annotations to set on the Service created for Restate
serviceAnnotations: Mapping<String, String>?
}
/// Network peers to allow inbound access to restate ports If unset, will not allow any new traffic. Set
/// any of these to [] to allow all traffic - not recommended.
class NetworkPeers {
admin: Listing<NetworkPolicy.NetworkPolicyPeer>?
ingress: Listing<NetworkPolicy.NetworkPolicyPeer>?
metrics: Listing<NetworkPolicy.NetworkPolicyPeer>?
}
/// If set, configure the use of a private key to sign outbound requests from this cluster
class RequestSigningPrivateKey {
/// A Kubernetes Secret source for the private key
secret: Secret?
/// A CSI secret provider source for the private key; will create a SecretProviderClass.
secretProvider: SecretProvider?
/// The version of Restate request signing that the key is for; currently only "v1" accepted.
version: String
}
/// A Kubernetes Secret source for the private key
class Secret {
/// The key of the secret to select from. Must be a valid secret key.
key: String
/// Name of the secret.
secretName: String
}
/// A CSI secret provider source for the private key; will create a SecretProviderClass.
class SecretProvider {
/// Configuration for specific provider
parameters: Mapping<String, String>?
/// The path of the private key relative to the root of the mounted volume
path: String
/// Configuration for provider name
provider: String?
}
/// Storage configuration
class Storage {
/// storageClassName is the name of the StorageClass required by the claim. More info:
/// https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 this field is immutable
storageClassName: String?
/// storageRequestBytes is the amount of storage to request in volume claims. It is allowed to increase
/// but not decrease.
storageRequestBytes: Int(this >= 1.0)
}
/// Status of the RestateCluster. This is set and managed automatically. Read-only. More info:
/// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
class Status {
conditions: Listing<Condition>?
}
class Condition {
/// Last time the condition transitioned from one status to another.
lastTransitionTime: String?
/// Human-readable message indicating details about last transition.
message: String?
/// Unique, one-word, CamelCase reason for the condition's last transition.
reason: String?
/// Status is the status of the condition. Can be True, False, Unknown.
status: String
/// Type of the condition, known values are (`Ready`).
type: String
}