This repository has been archived by the owner on Mar 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 101
/
types.go
681 lines (531 loc) · 29.2 KB
/
types.go
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
package v1
import (
v1 "github.com/acorn-io/runtime/pkg/apis/internal.acorn.io/v1"
adminv1 "github.com/acorn-io/runtime/pkg/apis/internal.admin.acorn.io/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type App struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Spec v1.AppInstanceSpec `json:"spec,omitempty"`
Status v1.AppInstanceStatus `json:"status,omitempty"`
}
func (in *App) GetStopped() bool {
return in.Spec.Stop != nil && *in.Spec.Stop && in.DeletionTimestamp.IsZero()
}
func (in *App) GetRegion() string {
if in.Spec.Region != "" {
return in.Spec.Region
}
return in.Status.Defaults.Region
}
type Acornfile v1.AppSpec
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type AppList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []App `json:"items"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ContainerReplica struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Spec ContainerReplicaSpec `json:"spec,omitempty"`
Status ContainerReplicaStatus `json:"status,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ContainerReplicaList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ContainerReplica `json:"items"`
}
// EmbeddedContainer is used to allow embedding of the v1.Container type but
// not pick up the UnmarshalJSON method from v1.Container. Otherwise the
// type embedding v1.Container automatically inherits UnmarshalJSON and breaks
// the unmarshalling
type EmbeddedContainer v1.Container
type ContainerReplicaSpec struct {
EmbeddedContainer `json:",inline"`
AppName string `json:"appName,omitempty"`
JobName string `json:"jobName,omitempty"`
ContainerName string `json:"containerName,omitempty"`
SidecarName string `json:"sidecarName,omitempty"`
Region string `json:"region,omitempty"`
}
type ContainerReplicaColumns struct {
State string `json:"state,omitempty"`
App string `json:"app,omitempty"`
}
type ContainerReplicaStatus struct {
PodName string `json:"podName,omitempty"`
PodNamespace string `json:"podNamespace,omitempty"`
Phase corev1.PodPhase `json:"phase,omitempty"`
PodMessage string `json:"message,omitempty"`
PodReason string `json:"reason,omitempty"`
ContainerSpec corev1.Container `json:"containerSpec,omitempty"`
ContainerStatus corev1.ContainerStatus `json:"containerStatus,omitempty"`
Columns ContainerReplicaColumns `json:"columns,omitempty"`
State corev1.ContainerState `json:"state,omitempty"`
LastTerminationState corev1.ContainerState `json:"lastState,omitempty"`
Ready bool `json:"ready"`
RestartCount int32 `json:"restartCount"`
Image string `json:"image"`
ImageID string `json:"imageID"`
Started *bool `json:"started,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type Job struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Spec JobSpec `json:"spec,omitempty"`
Status v1.JobStatus `json:"status,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type JobList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Job `json:"items"`
}
type JobSpec struct {
AppName string `json:"appName,omitempty"`
JobName string `json:"jobName,omitempty"`
Schedule string `json:"schedule,omitempty"`
}
type JobColumns struct {
State string `json:"state,omitempty"`
App string `json:"app,omitempty"`
NextRun *metav1.Time `json:"nextRun,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type JobRestart struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
}
// EnsureRegion checks or sets the region of a ContainerReplica.
// If a ContainerReplica's region is unset, EnsureRegion sets it to the given region and returns true.
// Otherwise, it returns true if and only if the ContainerReplica belongs to the given region.
func (in *ContainerReplica) EnsureRegion(region string) bool {
// If the region of a Container Replica is not set, then it hasn't been synced yet. In this case, we assume that it is in
// the same region as the app, and return true.
if in.Spec.Region == "" {
in.Spec.Region = region
}
return in.Spec.Region == region
}
func (in *ContainerReplica) HasRegion(region string) bool {
return in.Spec.Region == region
}
func (in *ContainerReplica) GetRegion() string {
return in.Spec.Region
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type Image struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Remote bool `json:"remote,omitempty"`
Repo string `json:"repo,omitempty"`
Digest string `json:"digest,omitempty"`
Tags []string `json:"tags,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ImagePush struct {
metav1.TypeMeta `json:",inline"`
Auth *RegistryAuth `json:"auth,omitempty"`
}
type RegistryAuth struct {
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ImagePull struct {
metav1.TypeMeta `json:",inline"`
Auth *RegistryAuth `json:"auth,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ImageCopy struct {
metav1.TypeMeta `json:",inline"`
Source string `json:"source,omitempty"`
Dest string `json:"dest,omitempty"`
SourceAuth *RegistryAuth `json:"sourceAuth,omitempty"`
DestAuth *RegistryAuth `json:"destAuth,omitempty"`
AllTags bool `json:"allTags,omitempty"`
Force bool `json:"force,omitempty"`
}
type LogMessage struct {
Line string `json:"line,omitempty"`
AppName string `json:"appName,omitempty"`
ContainerName string `json:"containerName,omitempty"`
Time metav1.Time `json:"time,omitempty"`
Error string `json:"error,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type IconOptions struct {
metav1.TypeMeta `json:",inline"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type LogOptions struct {
metav1.TypeMeta `json:",inline"`
Tail *int64 `json:"tailLines,omitempty"`
Follow bool `json:"follow,omitempty"`
ContainerReplica string `json:"containerReplica,omitempty"`
Container string `json:"container,omitempty"`
Since string `json:"since,omitempty"`
}
type PortForwardOptions struct {
metav1.TypeMeta `json:",inline"`
Tail *int64 `json:"tailLines,omitempty"`
Follow bool `json:"follow,omitempty"`
ContainerReplica string `json:"containerReplica,omitempty"`
Since string `json:"since,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type AppPullImage struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type AppInfo struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Info string `json:"info,omitempty"`
InterpolationError string `json:"interpolationError,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ConfirmUpgrade struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type IgnoreCleanup struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ImageDetails struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Input Params
ImageName string `json:"imageName,omitempty"`
NestedDigest string `json:"nestedDigest,omitempty"`
DeployArgs v1.GenericMap `json:"deployArgs,omitempty"`
Profiles []string `json:"profiles,omitempty"`
Auth *RegistryAuth `json:"auth,omitempty"`
IncludeNested bool `json:"includeNested,omitempty"`
// NoDefaultRegistry - if true, do not assume a default registry on the image if none is specified
NoDefaultRegistry bool `json:"noDefaultRegistry,omitempty"`
// Output Params
AppImage v1.AppImage `json:"appImage,omitempty"`
AppSpec *v1.AppSpec `json:"appSpec,omitempty"`
Params *v1.ParamSpec `json:"params,omitempty"`
Permissions []v1.Permissions `json:"permissions,omitempty"`
SignatureDigest string `json:"signatureDigest,omitempty"`
Readme string `json:"readme,omitempty"`
NestedImages []NestedImage `json:"nestedImages,omitempty"`
ParseError string `json:"parseError,omitempty"`
}
func (i ImageDetails) GetParseError() string {
if i.ParseError != "" {
return i.ParseError
}
for _, nested := range i.NestedImages {
if nested.ParseError != "" {
return nested.ParseError
}
}
return ""
}
func (i *ImageDetails) GetPermissions() (result []v1.Permissions) {
result = append(result, i.Permissions...)
for _, nested := range i.NestedImages {
result = append(result, nested.Permissions...)
}
return
}
type NestedImage struct {
Name string `json:"name,omitempty"`
Digest string `json:"digest,omitempty"`
Permissions []v1.Permissions `json:"permissions,omitempty"`
SignatureDigest string `json:"signatureDigest,omitempty"`
ParseError string `json:"parseError,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ImageTag struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Tag string `json:"tag,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ImageList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Image `json:"items"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ImageSignature struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Input Params
// - Generic
Auth *RegistryAuth `json:"auth,omitempty"`
// - Verification / Deduplication
PublicKey string `json:"publicKeys,omitempty"` // either reference or PEM encoded key
Annotations v1.SignatureAnnotations `json:"annotations,omitempty"`
// - Signing
Payload []byte `json:"payload,omitempty"`
SignatureB64 string `json:"signature,omitempty"`
// Output
SignatureDigest string `json:"signatureDigest,omitempty"`
}
type VolumeCreateOptions struct {
AccessModes []v1.AccessMode `json:"accessModes,omitempty"`
Class string `json:"class,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type Volume struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Spec VolumeSpec `json:"spec,omitempty"`
Status VolumeStatus `json:"status,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type VolumeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Volume `json:"items"`
}
type VolumeSpec struct {
Capacity *resource.Quantity `json:"capacity,omitempty"`
AccessModes []v1.AccessMode `json:"accessModes,omitempty"`
Class string `json:"class,omitempty"`
Region string `json:"region,omitempty"`
}
type VolumeStatus struct {
AppName string `json:"appName,omitempty"`
AppPublicName string `json:"appPublicName,omitempty"`
AppNamespace string `json:"appNamespace,omitempty"`
VolumeName string `json:"volumeName,omitempty"`
Status string `json:"status,omitempty"`
Columns VolumeColumns `json:"columns,omitempty"`
}
type VolumeColumns struct {
AccessModes string `json:"accessModes,omitempty"`
}
// EnsureRegion checks or sets the region of a Volume.
// If a Volume's region is unset, EnsureRegion sets it to the given region and returns true.
// Otherwise, it returns true if and only if the Volume belongs to the given region.
func (in *Volume) EnsureRegion(region string) bool {
// If the region of a volume is not set, then it hasn't been synced yet. In this case, we assume that the volume is in
// the same region as the app, and return true.
if in.Spec.Region == "" {
in.Spec.Region = region
}
return in.Spec.Region == region
}
func (in *Volume) HasRegion(region string) bool {
return in.Spec.Region == region
}
func (in *Volume) GetRegion() string {
return in.Spec.Region
}
// +k8s:conversion-gen:explicit-from=net/url.Values
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ContainerReplicaExecOptions struct {
metav1.TypeMeta `json:",inline"`
Command []string `json:"command,omitempty"`
TTY bool `json:"tty,omitempty"`
DebugImage string `json:"debugImage,omitempty"`
}
// +k8s:conversion-gen:explicit-from=net/url.Values
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ContainerReplicaPortForwardOptions struct {
metav1.TypeMeta `json:",inline"`
Port int `json:"port,omitempty"`
}
const (
SecretTypeCredential = "acorn.io/credential"
SecretTypeContext = "acorn.io/context"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type Credential struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
ServerAddress string `json:"serverAddress,omitempty"`
Username string `json:"username,omitempty"`
Password *string `json:"password,omitempty"`
SkipChecks bool `json:"skipChecks,omitempty"`
LocalStorage bool `json:"localStorage,omitempty"`
}
func (c *Credential) GetPassword() string {
if c.Password == nil {
return ""
}
return *c.Password
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type CredentialList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Credential `json:"items"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type Secret struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Type string `json:"type,omitempty"`
Data map[string][]byte `json:"data,omitempty"`
Keys []string `json:"keys,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type SecretList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Secret `json:"items"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type Info struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Regions map[string]InfoSpec `json:"regions,omitempty"`
ExtraData map[string]string `json:"extraData,omitempty"`
}
// +k8s:conversion-gen:explicit-from=net/url.Values
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type BuilderPortOptions struct {
metav1.TypeMeta `json:",inline"`
}
type InfoSpec struct {
Version string `json:"version"`
Tag string `json:"tag"`
GitCommit string `json:"gitCommit"`
Dirty bool `json:"dirty"`
ControllerImage string `json:"controllerImage"`
APIServerImage string `json:"apiServerImage,omitempty"`
PublicKeys []EncryptionKey `json:"publicKeys,omitempty"`
Config Config `json:"config"`
UserConfig Config `json:"userConfig"`
LetsEncryptCertificate string `json:"letsEncryptCertificate,omitempty"`
}
type Config struct {
// Do not set omitEmpty on the json fields. Also make strings and bool a
// pointer unless the default value (false, "") is not a valid configuration
// For repeatable flags, ensure the struct and json fields are plural and the flag name is singular.
// See ClusterDomains as an example.
IngressClassName *string `json:"ingressClassName" usage:"The ingress class name to assign to all created ingress resources (default '')"`
ClusterDomains []string `json:"clusterDomains" name:"cluster-domain" usage:"The externally addressable cluster domain (default .oss-acorn.io)"`
LetsEncrypt *string `json:"letsEncrypt" name:"lets-encrypt" usage:"enabled|disabled|staging. If enabled, acorn generated endpoints will be secured using TLS certificate from Let's Encrypt. Staging uses Let's Encrypt's staging environment. (default disabled)"`
LetsEncryptEmail string `json:"letsEncryptEmail" name:"lets-encrypt-email" usage:"Required if --lets-encrypt=enabled. The email address to use for Let's Encrypt registration(default '')"`
LetsEncryptTOSAgree *bool `json:"letsEncryptTOSAgree" name:"lets-encrypt-tos-agree" usage:"Required if --lets-encrypt=enabled. If true, you agree to the Let's Encrypt terms of service (default false)"`
SetPodSecurityEnforceProfile *bool `json:"setPodSecurityEnforceProfile" usage:"Set the PodSecurity profile on created namespaces (default true)"`
PodSecurityEnforceProfile string `json:"podSecurityEnforceProfile" usage:"The name of the PodSecurity profile to set (default baseline)" wrangler:"nullable"`
HttpEndpointPattern *string `json:"httpEndpointPattern" name:"http-endpoint-pattern" usage:"Go template for formatting application http endpoints. Valid variables to use are: App, Container, Namespace, Hash and ClusterDomain. (default pattern is {{hashConcat 8 .Container .App .Namespace | truncate}}.{{.ClusterDomain}})" wrangler:"nullable"`
InternalClusterDomain string `json:"internalClusterDomain" usage:"The Kubernetes internal cluster domain (default svc.cluster.local)" wrangler:"nullable"`
AcornDNS *string `json:"acornDNS" name:"acorn-dns" usage:"enabled|disabled|auto. If enabled, containers created by Acorn will get public FQDNs. Auto functions as disabled if a custom clusterDomain has been supplied (default auto)"`
AcornDNSEndpoint *string `json:"acornDNSEndpoint" name:"acorn-dns-endpoint" usage:"The URL to access the Acorn DNS service"`
AutoUpgradeInterval *string `json:"autoUpgradeInterval" name:"auto-upgrade-interval" usage:"For apps configured with automatic upgrades enabled, the interval at which to check for new versions. Upgrade intervals configured at the application level cannot be smaller than this. (default '5m' - 5 minutes)"`
RecordBuilds *bool `json:"recordBuilds" name:"record-builds" usage:"Keep a record of each acorn build that happens"`
PublishBuilders *bool `json:"publishBuilders" name:"publish-builders" usage:"Publish the builders through ingress to so build traffic does not traverse the api-server"`
BuilderPerProject *bool `json:"builderPerProject" name:"builder-per-project" usage:"Create a dedicated builder per project"`
InternalRegistryPrefix *string `json:"internalRegistryPrefix" name:"internal-registry-prefix" usage:"The image prefix to use when pushing internal images (example ghcr.io/my-org/)"`
IgnoreUserLabelsAndAnnotations *bool `json:"ignoreUserLabelsAndAnnotations" name:"ignore-user-labels-and-annotations" usage:"Don't propagate user-defined labels and annotations to dependent objects"`
AllowUserLabels []string `json:"allowUserLabels" name:"allow-user-label" usage:"Allow these labels to propagate to dependent objects, no effect if --ignore-user-labels-and-annotations not true"`
AllowUserAnnotations []string `json:"allowUserAnnotations" name:"allow-user-annotation" usage:"Allow these annotations to propagate to dependent objects, no effect if --ignore-user-labels-and-annotations not true"`
AllowUserMetadataNamespaces []string `json:"allowUserMetadataNamespaces" name:"allow-user-metadata-namespace" usage:"Allow these namespaces to propagate labels and annotations to dependent objects, no effect if --ignore-user-labels-and-annotations not true"`
WorkloadMemoryDefault *int64 `json:"workloadMemoryDefault" name:"workload-memory-default" quantity:"true" usage:"Set the default memory for acorn workloads. Accepts binary suffixes (Ki, Mi, Gi, etc) and \".\" and \"_\" seperators (default 0)" short:"m"`
WorkloadMemoryMaximum *int64 `json:"workloadMemoryMaximum" name:"workload-memory-maximum" quantity:"true" usage:"Set the maximum memory for acorn workloads. Accepts binary suffixes (Ki, Mi, Gi, etc) and \".\" and \"_\" seperators (default 0)"`
UseCustomCABundle *bool `json:"useCustomCABundle" name:"use-custom-ca-bundle" usage:"Use CA bundle for admin supplied secret for all acorn control plane components. Defaults to false."`
PropagateProjectAnnotations []string `json:"propagateProjectAnnotations" name:"propagate-project-annotation" usage:"The list of keys of annotations to propagate from acorn project to app namespaces"`
PropagateProjectLabels []string `json:"propagateProjectLabels" name:"propagate-project-label" usage:"The list of keys of labels to propagate from acorn project to app namespaces"`
ManageVolumeClasses *bool `json:"manageVolumeClasses" name:"manage-volume-classes" usage:"Manually manage volume classes rather than sync with storage classes, setting to 'true' will delete Acorn-created volume classes"`
NetworkPolicies *bool `json:"networkPolicies" name:"network-policies" usage:"Create Kubernetes NetworkPolicies which block cross-project network traffic (default false)"`
IngressControllerNamespace *string `json:"ingressControllerNamespace" name:"ingress-controller-namespace" usage:"The namespace where the ingress controller runs - used to secure published HTTP ports with NetworkPolicies."`
AllowTrafficFromNamespace []string `json:"allowTrafficFromNamespace" name:"allow-traffic-from-namespace" usage:"Namespaces that are allowed to send network traffic to all Acorn apps"`
ServiceLBAnnotations []string `json:"serviceLBAnnotations" name:"service-lb-annotation" usage:"Annotation to add to the service of type LoadBalancer. Defaults to empty. (example key=value)"`
AWSIdentityProviderARN *string `json:"awsIdentityProviderArn" name:"aws-identity-provider-arn" usage:"ARN of cluster's OpenID Connect provider registered in AWS"`
EventTTL *string `json:"eventTTL" name:"event-ttl" usage:"Amount of time an Acorn event will be stored before being deleted (default '168h' - 7 days)"`
Features map[string]bool `json:"features" name:"features" boolmap:"true" usage:"Enable or disable features. (example foo=true,bar=false)"`
CertManagerIssuer *string `json:"certManagerIssuer" name:"cert-manager-issuer" usage:"The name of the cert-manager cluster issuer to use for TLS certificates on custom domains" default:""`
Profile *string `json:"profile" name:"profile" usage:"The name of the profile to use for the installation. Profiles options are production (prod) and default. (default profile is default)"`
// Flags for setting resource request and limits on sytem components
ControllerMemory *string `json:"controllerMemory" name:"controller-memory" usage:"The memory to allocate to the runtime-controller in the format of <req>:<limit> (example 256Mi:1Gi)"`
ControllerCPU *string `json:"controllerCPU" name:"controller-cpu" usage:"The CPU to allocate to the runtime-controller in the format of <req>:<limit> (example 200m:1000m)"`
APIServerMemory *string `json:"apiServerMemory" name:"api-server-memory" usage:"The memory to allocate to the runtime-api-server in the format of <req>:<limit> (example 256Mi:1Gi)"`
APIServerCPU *string `json:"apiServerCPU" name:"api-server-cpu" usage:"The CPU to allocate to the runtime-api-server in the format of <req>:<limit> (example 200m:1000m)"`
BuildkitdMemory *string `json:"buildkitdMemory" name:"buildkitd-memory" usage:"The memory to allocate to buildkitd in the format of <req>:<limit> (example 256Mi:1Gi)"`
BuildkitdCPU *string `json:"buildkitdCPU" name:"buildkitd-cpu" usage:"The CPU to allocate to buildkitd in the format of <req>:<limit> (example 200m:1000m)"`
BuildkitdServiceMemory *string `json:"buildkitdServiceMemory" name:"buildkitd-service-memory" usage:"The memory to allocate to the buildkitd service in the format of <req>:<limit> (example 256Mi:1Gi)"`
BuildkitdServiceCPU *string `json:"buildkitdServiceCPU" name:"buildkitd-service-cpu" usage:"The CPU to allocate to the buildkitd service in the format of <req>:<limit> (example 200m:1000m)"`
RegistryMemory *string `json:"registryMemory" name:"registry-memory" usage:"The memory to allocate to the registry in the format of <req>:<limit> (example 256Mi:1Gi)"`
RegistryCPU *string `json:"registryCPU" name:"registry-cpu" usage:"The CPU to allocate to the registry in the format of <req>:<limit> (example 200m:1000m)"`
}
type EncryptionKey struct {
KeyID string `json:"keyID"`
Annotations map[string]string `json:"annotations,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type InfoList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Info `json:"items"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type Project v1.ProjectInstance
func (p *Project) NamespaceScoped() bool {
return false
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ProjectList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Project `json:"items"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type Builder v1.BuilderInstance
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type BuilderList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Builder `json:"items"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type AcornImageBuild v1.AcornImageBuildInstance
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type AcornImageBuildList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AcornImageBuild `json:"items"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type VolumeClass adminv1.ProjectVolumeClassInstance
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type VolumeClassList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []VolumeClass `json:"items"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type Service v1.ServiceInstance
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ServiceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Service `json:"items"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ImageAllowRule v1.ImageAllowRuleInstance
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ImageAllowRuleList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ImageAllowRule `json:"items"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type DevSession v1.DevSessionInstance
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type DevSessionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []DevSession `json:"items"`
}