/
verrazzano_types.go
1387 lines (1229 loc) · 59.9 KB
/
verrazzano_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
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright (c) 2020, 2023, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
package v1alpha1
import (
vmov1 "github.com/verrazzano/verrazzano-monitoring-operator/pkg/apis/vmcontroller/v1"
corev1 "k8s.io/api/core/v1"
rbacv1 "k8s.io/api/rbac/v1"
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// ProfileType is the type of installation profile.
type ProfileType string
const (
// Dev identifies the development install profile
Dev ProfileType = "dev"
// Prod identifies the production install profile
Prod ProfileType = "prod"
// None identifies a profile with all components disabled
None ProfileType = "none"
// ManagedCluster identifies the production managed-cluster install profile
ManagedCluster ProfileType = "managed-cluster"
)
const (
// LoadBalancer is an ingress type of LoadBalancer. This is the default value.
LoadBalancer IngressType = "LoadBalancer"
// NodePort is an ingress type of NodePort.
NodePort IngressType = "NodePort"
)
// +kubebuilder:object:root=true
// +kubebuilder:resource:path=verrazzanos
// +kubebuilder:subresource:status
// +kubebuilder:resource:shortName=vz;vzs
// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.available",description="Available/Enabled Verrazzano Components."
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[-1:].type",description="The current status of the install/uninstall."
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".status.version",description="The current version of the Verrazzano installation."
// +kubebuilder:deprecatedversion:warning="install.verrazzano.io/v1alpha1 Verrazzano is deprecated. To migrate to install.verrazzano.io/v1beta1 Verrazzano, see https://verrazzano.io/latest/docs/releasenotes/#v140."
// +genclient
// Verrazzano specifies the Verrazzano API.
type Verrazzano struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VerrazzanoSpec `json:"spec,omitempty"`
Status VerrazzanoStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// VerrazzanoList contains a list of Verrazzano resources.
type VerrazzanoList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Verrazzano `json:"items"`
}
// VerrazzanoSpec defines the desired state of a Verrazzano resource.
type VerrazzanoSpec struct {
// The Verrazzano components.
// +optional
// +patchStrategy=merge
Components ComponentSpec `json:"components,omitempty" patchStrategy:"merge"`
// Defines the type of volume to be used for persistence for all components unless overridden, and can be one of
// either EmptyDirVolumeSource or PersistentVolumeClaimVolumeSource. If PersistentVolumeClaimVolumeSource is
// declared, then the `claimName` must reference the name of an existing `VolumeClaimSpecTemplate` declared in the
// `volumeClaimSpecTemplates` section.
// +optional
// +patchStrategy=replace
DefaultVolumeSource *corev1.VolumeSource `json:"defaultVolumeSource,omitempty" patchStrategy:"replace"`
// Name of the installation. This name is part of the endpoint access URLs that are generated.
// The default value is `default`.
// +optional
EnvironmentName string `json:"environmentName,omitempty"`
// The installation profile to select. Valid values are `prod` (production), `dev` (development), and `managed-cluster`.
// The default is `prod`.
// +optional
Profile ProfileType `json:"profile,omitempty"`
// Security specifies Verrazzano security configuration.
// +optional
Security SecuritySpec `json:"security,omitempty"`
// The version to install. Valid versions can be found
// <a href="https://github.com/verrazzano/verrazzano/releases/">here</a>.
// Defaults to the current version supported by the Verrazzano platform operator.
// +optional
Version string `json:"version,omitempty"`
// Defines a named set of PVC configurations that can be referenced from components to configure persistent volumes.
// +optional
// +patchStrategy=merge,retainKeys
VolumeClaimSpecTemplates []VolumeClaimSpecTemplate `json:"volumeClaimSpecTemplates,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"`
}
// Kubernetes resources that are common to a subgroup of components.
type CommonKubernetesSpec struct {
// Specifies the number of pod instances to run.
// +optional
Replicas uint32 `json:"replicas,omitempty"`
// Specifies the group of affinity scheduling rules.
// +optional
Affinity *corev1.Affinity `json:"affinity,omitempty"`
}
// SecuritySpec defines the security configuration for Verrazzano.
type SecuritySpec struct {
// Specifies subjects that should be bound to the verrazzano-admin role.
// +optional
AdminSubjects []rbacv1.Subject `json:"adminSubjects,omitempty"`
// Specifies subjects that should be bound to the verrazzano-monitor role.
// +optional
MonitorSubjects []rbacv1.Subject `json:"monitorSubjects,omitempty"`
}
// VolumeClaimSpecTemplate Contains common PVC configurations that can be referenced from Components; these
// do not actually result in generated PVCs, but can be used to provide common configurations to components that
// declare a PersistentVolumeClaimVolumeSource.
type VolumeClaimSpecTemplate struct {
// Metadata about the PersistentVolumeClaimSpec template.
// +kubebuilder:pruning:PreserveUnknownFields
metav1.ObjectMeta `json:"metadata,omitempty"`
// A `PersistentVolumeClaimSpec` template that can be referenced by a Component to override its default storage
// settings for a profile. At present, only a subset of the `resources.requests` object are honored depending on
// the component.
Spec corev1.PersistentVolumeClaimSpec `json:"spec,omitempty"`
}
// InstanceInfo details of installed Verrazzano instance maintained in status field.
type InstanceInfo struct {
// The Alertmanager URL for this Verrazzano installation.
AlertmanagerURL *string `json:"alertmanagerUrl,omitempty"`
// The Argo CD UI URL for this Verrazzano installation.
ArgoCDURL *string `json:"argoCDUrl,omitempty"`
// The Console URL for this Verrazzano installation.
ConsoleURL *string `json:"consoleUrl,omitempty"`
// The OpenSearch URL for this Verrazzano installation.
ElasticURL *string `json:"elasticUrl,omitempty"`
// The Grafana URL for this Verrazzano installation.
GrafanaURL *string `json:"grafanaUrl,omitempty"`
// The Jaeger UI URL for this Verrazzano installation.
JaegerURL *string `json:"jaegerUrl,omitempty"`
// The KeyCloak URL for this Verrazzano installation.
KeyCloakURL *string `json:"keyCloakUrl,omitempty"`
// The Kiali URL for this Verrazzano installation.
KialiURL *string `json:"kialiUrl,omitempty"`
// The OpenSearch Dashboards URL for this Verrazzano installation.
KibanaURL *string `json:"kibanaUrl,omitempty"`
// The Prometheus URL for this Verrazzano installation.
PrometheusURL *string `json:"prometheusUrl,omitempty"`
// The Rancher URL for this Verrazzano installation.
RancherURL *string `json:"rancherUrl,omitempty"`
// The Thanos Query URL for this Verrazzano installation.
// The Thanos Query ingress gets forwarded to the Thanos Query Frontend service.
ThanosQueryURL *string `json:"thanosQueryUrl,omitempty"`
// The Thanos Ruler URL for this Verrazzano installation.
ThanosRulerURL *string `json:"thanosRulerUrl,omitempty"`
}
// VerrazzanoStatus defines the observed state of a Verrazzano resource.
type VerrazzanoStatus struct {
// The summary of Verrazzano component availability.
Available *string `json:"available,omitempty"`
// States of the individual installed components.
Components ComponentStatusMap `json:"components,omitempty"`
// The latest available observations of an object's current state.
Conditions []Condition `json:"conditions,omitempty"`
// State of the Verrazzano custom resource.
State VzStateType `json:"state,omitempty"`
// The Verrazzano instance information.
VerrazzanoInstance *InstanceInfo `json:"instance,omitempty"`
// The version of Verrazzano that is installed.
Version string `json:"version,omitempty"`
}
// ComponentStatusMap is a map of components status details.
type ComponentStatusMap map[string]*ComponentStatusDetails
// ComponentStatusDetails defines the observed state of a component.
type ComponentStatusDetails struct {
// Whether a component is available for use.
Available *ComponentAvailability `json:"available,omitempty"`
// Information about the current state of a component.
Conditions []Condition `json:"conditions,omitempty"`
// The generation of the last Verrazzano resource the Component was successfully reconciled against.
LastReconciledGeneration int64 `json:"lastReconciledGeneration,omitempty"`
// Name of the component.
Name string `json:"name,omitempty"`
// The generation of the Verrazzano resource the Component is currently being reconciled against.
ReconcilingGeneration int64 `json:"reconcilingGeneration,omitempty"`
// The state of a component.
State CompStateType `json:"state,omitempty"`
// The version of a component.
Version string `json:"version,omitempty"`
}
// ConditionType identifies the condition of the install, uninstall, or upgrade, which can be checked with `kubectl wait`.
type ConditionType string
const (
// CondPreInstall means an install about to start.
CondPreInstall ConditionType = "PreInstall"
// CondInstallStarted means an install is in progress.
CondInstallStarted ConditionType = "InstallStarted"
// CondInstallComplete means the install job has completed its execution successfully
CondInstallComplete ConditionType = "InstallComplete"
// CondInstallFailed means the install job has failed during execution.
CondInstallFailed ConditionType = "InstallFailed"
// CondUninstallStarted means an uninstall is in progress.
CondUninstallStarted ConditionType = "UninstallStarted"
// CondUninstallComplete means the uninstall job has completed its execution successfully
CondUninstallComplete ConditionType = "UninstallComplete"
// CondUninstallFailed means the uninstall job has failed during execution.
CondUninstallFailed ConditionType = "UninstallFailed"
// CondUpgradeStarted means that an upgrade has been started.
CondUpgradeStarted ConditionType = "UpgradeStarted"
// CondUpgradePaused means that an upgrade has been paused awaiting a VZ version update.
CondUpgradePaused ConditionType = "UpgradePaused"
// CondUpgradeFailed means the upgrade has failed during execution.
CondUpgradeFailed ConditionType = "UpgradeFailed"
// CondUpgradeComplete means the upgrade has completed successfully
CondUpgradeComplete ConditionType = "UpgradeComplete"
)
// Condition describes the current state of an installation.
type Condition struct {
// Last time the condition transitioned from one status to another.
LastTransitionTime string `json:"lastTransitionTime,omitempty"`
// Human readable message indicating details about the last transition.
Message string `json:"message,omitempty"`
// Status of the condition: one of `True`, `False`, or `Unknown`.
Status corev1.ConditionStatus `json:"status"`
// Type of condition.
Type ConditionType `json:"type"`
}
// ComponentAvailability identifies the availability of a Verrazzano Component.
type ComponentAvailability string
const (
//ComponentAvailable signifies that a Verrazzano Component is ready for use.
ComponentAvailable = "Available"
//ComponentUnavailable signifies that a Verrazzano Component is not ready for use.
ComponentUnavailable = "Unavailable"
)
// VzStateType identifies the state of a Verrazzano installation.
type VzStateType string
const (
// VzStateUninstalling is the state when an uninstall is in progress
VzStateUninstalling VzStateType = "Uninstalling"
// VzStateUpgrading is the state when an upgrade is in progress
VzStateUpgrading VzStateType = "Upgrading"
// VzStatePaused is the state when an upgrade is paused due to version mismatch
VzStatePaused VzStateType = "Paused"
// VzStateReady is the state when a Verrazzano resource can perform an uninstall or upgrade
VzStateReady VzStateType = "Ready"
// VzStateFailed is the state when an install/uninstall/upgrade has failed
VzStateFailed VzStateType = "Failed"
// VzStateReconciling is the state when a resource is in progress reconciling
VzStateReconciling VzStateType = "Reconciling"
)
// CompStateType identifies the state of a component.
type CompStateType string
const (
// CompStateDisabled is the state for when a component is not currently installed
CompStateDisabled CompStateType = "Disabled"
// CompStatePreInstalling is the state when an install is about to be started
CompStatePreInstalling CompStateType = "PreInstalling"
// CompStateInstalling is the state when an install is in progress
CompStateInstalling CompStateType = "Installing"
// CompStateUninstalling is the state when an uninstall is in progress
CompStateUninstalling CompStateType = "Uninstalling"
// CompStateUninstalled is the state when a component has been uninstalled
CompStateUninstalled CompStateType = "Uninstalled"
// CompStateUpgrading is the state when an upgrade is in progress
CompStateUpgrading CompStateType = "Upgrading"
// CompStateError is the state when a Verrazzano resource has experienced an error that may leave it in an unstable state
CompStateError CompStateType = "Error"
// CompStateReady is the state when a Verrazzano resource can perform an uninstall or upgrade
CompStateReady CompStateType = "Ready"
// CompStateFailed is the state when an install/uninstall/upgrade has failed
CompStateFailed CompStateType = "Failed"
// CompStateReconciling is the state when a module is reconciling
CompStateReconciling CompStateType = "Reconciling"
)
// ComponentSpec contains a set of components used by Verrazzano.
type ComponentSpec struct {
// The Application Operator component configuration.
// +optional
ApplicationOperator *ApplicationOperatorComponent `json:"applicationOperator,omitempty"`
// The Argo CD component configuration.
// +optional
ArgoCD *ArgoCDComponent `json:"argoCD,omitempty"`
// The AuthProxy component configuration.
// +optional
AuthProxy *AuthProxyComponent `json:"authProxy,omitempty"`
// The ClusterAPI component configuration.
// +optional
ClusterAPI *ClusterAPIComponent `json:"clusterAPI,omitempty"`
// The ClusterAgent configuration.
// +optional
ClusterAgent *ClusterAgentComponent `json:"clusterAgent,omitempty"`
// ClusterIssuer defines the Cert-Manager ClusterIssuer configuration for Verrazzano
// +optional
ClusterIssuer *ClusterIssuerComponent `json:"clusterIssuer,omitempty"`
// The Verrazzano-managed Cert-Manager component configuration; note that this is mutually exclusive of the
// ExternalCertManager component
// +optional
CertManager *CertManagerComponent `json:"certManager,omitempty"`
// CertManagerWebhookOCI configures the Verrazzano OCI DNS webhook plugin for Cert-Manager
// +optional
CertManagerWebhookOCI *CertManagerWebhookOCIComponent `json:"certManagerWebhookOCI,omitempty"`
// The Cluster Operator component configuration.
// +optional
ClusterOperator *ClusterOperatorComponent `json:"clusterOperator,omitempty"`
// The Coherence Operator component configuration.
// +optional
CoherenceOperator *CoherenceOperatorComponent `json:"coherenceOperator,omitempty"`
// The Verrazzano Console component configuration.
// +optional
Console *ConsoleComponent `json:"console,omitempty"`
// The Dex component configuration.
// +optional
Dex *DexComponent `json:"dex,omitempty"`
// The DNS component configuration.
// +optional
// +patchStrategy=replace
DNS *DNSComponent `json:"dns,omitempty" patchStrategy:"replace"`
// The Elasticsearch component configuration.
// +optional
Elasticsearch *ElasticsearchComponent `json:"elasticsearch,omitempty"`
// The Fluentd component configuration.
// +optional
Fluentd *FluentdComponent `json:"fluentd,omitempty"`
// The FluentOperator component configuration.
// +optional
FluentOperator *FluentOperatorComponent `json:"fluentOperator,omitempty"`
// The FluentbitOpensearchOutput component configuration.
// +optional
FluentbitOpensearchOutput *FluentbitOpensearchOutputComponent `json:"fluentbitOpensearchOutput,omitempty"`
// The Grafana component configuration.
// +optional
Grafana *GrafanaComponent `json:"grafana,omitempty"`
// The ingress NGINX component configuration.
// +optional
Ingress *IngressNginxComponent `json:"ingress,omitempty"`
// The Istio component configuration.
// +optional
Istio *IstioComponent `json:"istio,omitempty"`
// The Jaeger Operator component configuration.
// +optional
JaegerOperator *JaegerOperatorComponent `json:"jaegerOperator,omitempty"`
// The Kiali component configuration.
// +optional
Kiali *KialiComponent `json:"kiali,omitempty"`
// The Kibana component configuration.
// +optional
Kibana *KibanaComponent `json:"kibana,omitempty"`
// The Keycloak component configuration.
// +optional
Keycloak *KeycloakComponent `json:"keycloak,omitempty"`
// The kube-state-metrics component configuration.
// +optional
KubeStateMetrics *KubeStateMetricsComponent `json:"kubeStateMetrics,omitempty"`
// The MySQL Operator component configuration.
// +optional
MySQLOperator *MySQLOperatorComponent `json:"mySQLOperator,omitempty"`
// The OAM component configuration.
// +optional
OAM *OAMComponent `json:"oam,omitempty"`
// The OpenSearchOperator component configuration
// +optional
OpenSearchOperator *OpenSearchOperatorComponent `json:"opensearchOperator,omitempty"`
// The Prometheus component configuration.
// +optional
Prometheus *PrometheusComponent `json:"prometheus,omitempty"`
// The Prometheus Adapter component configuration.
// +optional
PrometheusAdapter *PrometheusAdapterComponent `json:"prometheusAdapter,omitempty"`
// The Prometheus Node Exporter component configuration.
// +optional
PrometheusNodeExporter *PrometheusNodeExporterComponent `json:"prometheusNodeExporter,omitempty"`
// The Prometheus Operator component configuration.
// +optional
PrometheusOperator *PrometheusOperatorComponent `json:"prometheusOperator,omitempty"`
// The Prometheus Pushgateway component configuration.
// +optional
PrometheusPushgateway *PrometheusPushgatewayComponent `json:"prometheusPushgateway,omitempty"`
// The Rancher component configuration.
// +optional
Rancher *RancherComponent `json:"rancher,omitempty"`
// The rancherBackup component configuration.
// +optional
RancherBackup *RancherBackupComponent `json:"rancherBackup,omitempty"`
// The Thanos component configuration.
// +optional
Thanos *ThanosComponent `json:"thanos,omitempty"`
// The Velero component configuration.
// +optional
Velero *VeleroComponent `json:"velero,omitempty"`
// The Verrazzano component configuration.
// +optional
Verrazzano *VerrazzanoComponent `json:"verrazzano,omitempty"`
// The WebLogic Kubernetes Operator component configuration.
// +optional
WebLogicOperator *WebLogicOperatorComponent `json:"weblogicOperator,omitempty"`
}
// OpenSearchOperatorComponent specifies the OpenSearchOperator configuration
type OpenSearchOperatorComponent struct {
// If true, then OpenSearchOperator will be installed
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of Overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/thirdparty/charts/opensearch-operator/values.yaml %}} )
// and invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
type FluentbitOpensearchOutputComponent struct {
// If true, then the FluentbitOpensearchOutput will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/helm_config/charts/fluentbit-opensearch-output/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
// ElasticsearchComponent specifies the Elasticsearch configuration.
type ElasticsearchComponent struct {
// If true, then OpenSearch will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// A list of values to use during the OpenSearch installation. Each argument is specified as either a `name/value` or
// `name/valueList` pair. For sample usage, see
// <a href="../../../docs/observability/logging/configure-opensearch/opensearch/">Customize OpenSearch</a>.
// +optional
// +patchMergeKey=name
// +patchStrategy=merge,retainKeys
ESInstallArgs []InstallArgs `json:"installArgs,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"`
// A list of OpenSearch node groups.
// +optional
// +patchMergeKey=name
// +patchStrategy=merge,retainKeys
Nodes []OpenSearchNode `json:"nodes,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"`
// A list of <a href="https://opensearch.org/docs/2.3/im-plugin/ism/index/">Index State Management</a> policies
// to enable on OpenSearch.
Policies []vmov1.IndexManagementPolicy `json:"policies,omitempty"`
// Enable to add 3rd Party / Custom plugins not offered in the default OpenSearch image
// +optional
Plugins vmov1.OpenSearchPlugins `json:"plugins,omitempty"`
// To disable the default ISM policies.
DisableDefaultPolicy bool `json:"disableDefaultPolicy,omitempty"`
}
// OpenSearchNode specifies a node group in the OpenSearch cluster.
type OpenSearchNode struct {
// Name of the node group.
Name string `json:"name,omitempty"`
// Node group replica count.
// +optional
Replicas *int32 `json:"replicas,omitempty"`
// Kubernetes container resources for nodes in the node group.
// +optional
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
// Role or roles that nodes in the group will assume: may be `master`, `data`, and/or `ingest`.
Roles []vmov1.NodeRole `json:"roles,omitempty"`
// Storage settings for the node group.
// +optional
Storage *OpenSearchNodeStorage `json:"storage,omitempty"`
// JavaOpts settings for the OpenSearch JVM.
// +optional
JavaOpts string `json:"javaOpts,omitempty"`
}
type OpenSearchNodeStorage struct {
// Node group storage size expressed as a
// <a href="https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/#Quantity">Quantity</a>.
Size string `json:"size"`
}
// KibanaComponent specifies the Kibana configuration.
type KibanaComponent struct {
// If true, then OpenSearch Dashboards will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// The number of pods to replicate. The default is `1`.
Replicas *int32 `json:"replicas,omitempty"`
// Enable to add 3rd Party / Custom plugins not offered in the default OpenSearch-Dashboard image
// +optional
Plugins vmov1.OpenSearchDashboardsPlugins `json:"plugins,omitempty"`
}
// KubeStateMetricsComponent specifies the kube-state-metrics configuration.
type KubeStateMetricsComponent struct {
// If true, then kube-state-metrics will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/thirdparty/charts/prometheus-community/kube-state-metrics/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
// DatabaseInfo specifies the database connection information for the Grafana DB instance.
type DatabaseInfo struct {
// The host of the database.
Host string `json:"host,omitempty"`
// The name of the database.
Name string `json:"name,omitempty"`
}
// GrafanaComponent specifies the Grafana configuration.
type GrafanaComponent struct {
// The information to configure a connection to an external Grafana database.
// +optional
Database *DatabaseInfo `json:"database,omitempty"`
// If true, then Grafana will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// The number of pods to replicate. The default is `1`.
// +optional
Replicas *int32 `json:"replicas,omitempty"`
// The SMTP notification settings.
// +optional
SMTP *vmov1.SMTPInfo `json:"smtp,omitempty"`
}
// PrometheusComponent specifies the Prometheus configuration.
type PrometheusComponent struct {
// If true, then Prometheus will be installed.
// This is a legacy setting; the preferred way to configure Prometheus is using the
// [PrometheusOperatorComponent](#install.verrazzano.io/v1alpha1.PrometheusOperatorComponent).
// +optional
Enabled *bool `json:"enabled,omitempty"`
}
// PrometheusAdapterComponent specifies the Prometheus Adapter configuration.
type PrometheusAdapterComponent struct {
// If true, then Prometheus Adaptor will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/thirdparty/charts/prometheus-community/prometheus-adapter/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
// PrometheusNodeExporterComponent specifies the Prometheus Node Exporter configuration.
type PrometheusNodeExporterComponent struct {
// If true, then Prometheus Node Exporter will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/thirdparty/charts/prometheus-community/prometheus-node-exporter/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
// PrometheusOperatorComponent specifies the Prometheus Operator configuration.
type PrometheusOperatorComponent struct {
// If true, then Prometheus Operator will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/thirdparty/charts/prometheus-community/kube-prometheus-stack/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
// PrometheusPushgatewayComponent specifies the Prometheus Pushgateway configuration.
type PrometheusPushgatewayComponent struct {
// If true, then Prometheus Pushgateway will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/thirdparty/charts/prometheus-community/prometheus-pushgateway/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
// ClusterAPIComponent specifies the Cluster API configuration.
type ClusterAPIComponent struct {
// If true, then Cluster API Providers will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// Overrides are merged together, but in the event of conflicting fields, the last override in the list
// takes precedence over any others. You can find all possible values
// [here]( {{% release_source_url path=platform-operator/helm_config/overrides/cluster-api-values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
// CertManagerComponent specifies the cert-manager configuration.
type CertManagerComponent struct {
// Deprecated. Use the ClusterIssuerComponent to configure the Verrazzano ClusterIssuer instead
// +optional
// +patchStrategy=replace
Certificate Certificate `json:"certificate,omitempty" patchStrategy:"replace"`
// If true, then cert-manager will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/thirdparty/charts/cert-manager/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
// ClusterAgentComponent configures the Cluster Agent
type ClusterAgentComponent struct {
// If true, then Cluster Agent will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/helm_config/charts/verrazzano-cluster-agent/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
// ClusterIssuerComponent configures the Verrazzano ClusterIssuer
type ClusterIssuerComponent struct {
// Enabled indicates that Verrazzano ClusterIssuer shall be configured
// +kubebuilder:default=true
// +optional
Enabled *bool `json:"enabled,omitempty"`
// The clusterResourceNamespace configured for the Verrazzano Cert-Manager instance; if an externally-managed
// Cert-Manager is being used with a non-default location, this should point to the clusterResourceNamespace used by
// that installation. See the Cert-Manager documentation details on this namespace.
// +kubebuilder:default=cert-manager
ClusterResourceNamespace string `json:"clusterResourceNamespace,omitempty"`
// IssuerConfig contains the configuration for the Verrazzano Cert-Manager ClusterIssuer
IssuerConfig `json:",inline"`
}
// CertManagerWebhookOCIComponent configures the CertManager OCI DNS solver webhook; the
// webhook is required for LetsEncrypt Certificates using OCI DNS
type CertManagerWebhookOCIComponent struct {
// Enabled will deploy the webhook if true, or if the LetsEncrypt issuer is configured with OCI DNS
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/thirdparty/charts/cert-manager-webhook-oci/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
// CoherenceOperatorComponent specifies the Coherence Operator configuration.
type CoherenceOperatorComponent struct {
// If true, then Coherence Operator will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/thirdparty/charts/coherence-operator/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
// ApplicationOperatorComponent specifies the Application Operator configuration.
type ApplicationOperatorComponent struct {
// If true, then Application Operator will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/helm_config/charts/verrazzano-application-operator/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
// AuthProxyKubernetesSection specifies the Kubernetes resources that can be customized for AuthProxy.
type AuthProxyKubernetesSection struct {
CommonKubernetesSpec `json:",inline"`
}
// AuthProxyComponent specifies the AuthProxy configuration.
type AuthProxyComponent struct {
// If true, then AuthProxy will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/helm_config/charts/verrazzano-authproxy/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
// The Kubernetes resources that can be configured for AuthProxy.
// +optional
Kubernetes *AuthProxyKubernetesSection `json:"kubernetes,omitempty"`
}
// OAMComponent specifies the OAM configuration.
type OAMComponent struct {
// If true, then OAM will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/thirdparty/charts/oam-kubernetes-runtime/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
// VerrazzanoComponent specifies the Verrazzano configuration.
type VerrazzanoComponent struct {
// If true, then Verrazzano will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// Arguments for installing Verrazzano.
// +optional
// +patchMergeKey=name
// +patchStrategy=merge,retainKeys
InstallArgs []InstallArgs `json:"installArgs,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/helm_config/charts/verrazzano/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
// ClusterOperatorComponent specifies the Cluster Operator configuration.
type ClusterOperatorComponent struct {
// If true, then the Cluster Operator will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/helm_config/charts/verrazzano-cluster-operator/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
// KialiComponent specifies the Kiali configuration.
type KialiComponent struct {
// If true, then Kiali will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/thirdparty/charts/kiali-server/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
// ConsoleComponent specifies the Verrazzano Console configuration.
type ConsoleComponent struct {
// If true, then the Verrazzano Console will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/helm_config/charts/verrazzano-console/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}
// DNSComponent specifies the DNS configuration.
type DNSComponent struct {
// External DNS configuration.
// +optional
External *External `json:"external,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/thirdparty/charts/external-dns/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
// Oracle Cloud Infrastructure DNS configuration.
// +optional
OCI *OCI `json:"oci,omitempty"`
// Wildcard DNS configuration. This is the default with a domain of nip.io.
// +optional
Wildcard *Wildcard `json:"wildcard,omitempty"`
}
// IngressNginxComponent specifies the ingress-nginx configuration.
type IngressNginxComponent struct {
// If true, then ingress NGINX will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// Name of the ingress class used by the ingress controller. Defaults to `verrazzano-nginx`.
// +optional
IngressClassName *string `json:"ingressClassName,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/thirdparty/charts/ingress-nginx/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
// Arguments for installing NGINX.
// +optional
// +patchMergeKey=name
// +patchStrategy=merge,retainKeys
NGINXInstallArgs []InstallArgs `json:"nginxInstallArgs,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"`
// The list of port configurations used by the ingress.
// +optional
Ports []corev1.ServicePort `json:"ports,omitempty"`
// The ingress type. Valid values are `LoadBalancer` and `NodePort`. The default value is `LoadBalancer`. If the ingress
// type is `NodePort`, then a valid and accessible IP address must be specified using the `controller.service.externalIPs`
// key in NGINXInstallArgs. For sample usage, see
// <a href="../../../docs/networking/traffic/externallbs/">External Load Balancers</a>.
// +optional
Type IngressType `json:"type,omitempty"`
}
// IstioIngressSection specifies the specific configuration options available for the Istio ingress gateways.
type IstioIngressSection struct {
// The Istio ingress type. Valid values are `LoadBalancer` and `NodePort`. The default value is `LoadBalancer`. If the
// Istio ingress type is `NodePort`, then a valid and accessible IP address must be specified using the
// `gateways.istio-ingressgateway.externalIPs` key in IstioInstallArgs. For sample usage, see
// <a href="../../../docs/networking/traffic/externallbs/">External Load Balancers</a>.
// +optional
Type IngressType `json:"type,omitempty"`
// The list port configurations used by the Istio ingress.
// +optional
Ports []corev1.ServicePort `json:"ports,omitempty"`
// The Kubernetes resources that can be configured for an Istio ingress gateway.
// +optional
Kubernetes *IstioKubernetesSection `json:"kubernetes,omitempty"`
}
// IstioEgressSection specifies the specific configuration options available for the Istio egress gateways.
type IstioEgressSection struct {
// The Kubernetes resources that can be configured for an Istio egress gateway.
// +optional
Kubernetes *IstioKubernetesSection `json:"kubernetes,omitempty"`
}
// IstioKubernetesSection specifies the Kubernetes resources that can be customized for Istio.
type IstioKubernetesSection struct {
CommonKubernetesSpec `json:",inline"`
}
// IstioComponent specifies the Istio configuration.
type IstioComponent struct {
// The Istio egress gateway configuration.
// +optional
Egress *IstioEgressSection `json:"egress,omitempty"`
// If true, then Istio will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// The Istio ingress gateway configuration.
// +optional
Ingress *IstioIngressSection `json:"ingress,omitempty"`
// Istio sidecar injection enabled for installed components. Default is `true`.
// +optional
InjectionEnabled *bool `json:"injectionEnabled,omitempty"`
// List of overrides for default IstioOperator. Overrides are merged together, but in the event of conflicting
// fields, the last override in the list takes precedence over any others. You can find all possible values
// <a href="https://istio.io/v1.13/docs/reference/config/istio.operator.v1alpha1/#IstioOperatorSpec">here</a>
// Passing through an invalid IstioOperator resource will result in an error.
// +optional
InstallOverrides `json:",inline"`
// Arguments for installing Istio.
// +optional
// +patchMergeKey=name
// +patchStrategy=merge,retainKeys
IstioInstallArgs []InstallArgs `json:"istioInstallArgs,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"`
}
// IsInjectionEnabled is istio sidecar injection enabled check.
func (c *IstioComponent) IsInjectionEnabled() bool {
if c.Enabled == nil || *c.Enabled {
return c.InjectionEnabled == nil || *c.InjectionEnabled
}
return c.InjectionEnabled != nil && *c.InjectionEnabled
}
// JaegerOperatorComponent specifies the Jaeger Operator configuration.
type JaegerOperatorComponent struct {
// If true, then Jaeger Operator will be installed.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// List of overrides for the default `values.yaml` file for the component Helm chart. Overrides are merged together,
// but in the event of conflicting fields, the last override in the list takes precedence over any others. You can
// find all possible values
// [here]( {{% release_source_url path=platform-operator/thirdparty/charts/jaegertracing/jaeger-operator/values.yaml %}} );
// invalid values will be ignored.
// +optional
InstallOverrides `json:",inline"`
}