Skip to content

Commit ce2a0b4

Browse files
some PR updates
- temporary replaced caarlos0/env with fork till caarlos0/env#412 is merged - consolidate all functions for cluster defaults population - merged CommonDefaultableParams and CommonApplicationDeploymentParams into CommonAppsParams - moved setting terminationGracePeriodSeconds to defaults management
1 parent df7bb65 commit ce2a0b4

File tree

97 files changed

+1076
-2100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1076
-2100
lines changed

api/operator/v1/vlagent_types.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,8 @@ type VLAgentSpec struct {
9191
// +optional
9292
ServiceAccountName string `json:"serviceAccountName,omitempty"`
9393

94-
*vmv1beta1.EmbeddedProbes `json:",inline"`
95-
vmv1beta1.CommonDefaultableParams `json:",inline,omitempty"`
96-
vmv1beta1.CommonApplicationDeploymentParams `json:",inline,omitempty"`
94+
*vmv1beta1.EmbeddedProbes `json:",inline"`
95+
vmv1beta1.CommonAppsParams `json:",inline,omitempty"`
9796
}
9897

9998
type VLAgentK8sCollector struct {

api/operator/v1/vlcluster_types.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,7 @@ type VLInsert struct {
259259
// +optional
260260
RollingUpdate *appsv1.RollingUpdateDeployment `json:"rollingUpdate,omitempty"`
261261

262-
vmv1beta1.CommonDefaultableParams `json:",inline"`
263-
vmv1beta1.CommonApplicationDeploymentParams `json:",inline"`
262+
vmv1beta1.CommonAppsParams `json:",inline"`
264263
}
265264

266265
// Probe implements build.probeCRD interface
@@ -444,8 +443,7 @@ type VLSelect struct {
444443
// ExtraStorageNodes - defines additional storage nodes to VLSelect
445444
ExtraStorageNodes []VLStorageNode `json:"extraStorageNodes,omitempty"`
446445

447-
vmv1beta1.CommonDefaultableParams `json:",inline"`
448-
vmv1beta1.CommonApplicationDeploymentParams `json:",inline"`
446+
vmv1beta1.CommonAppsParams `json:",inline"`
449447
}
450448

451449
// GetMetricsPath returns prefixed path for metric requests
@@ -577,8 +575,7 @@ type VLStorage struct {
577575
// +optional
578576
MaintenanceSelectNodeIDs []int32 `json:"maintenanceSelectNodeIDs,omitempty"`
579577

580-
vmv1beta1.CommonDefaultableParams `json:",inline"`
581-
vmv1beta1.CommonApplicationDeploymentParams `json:",inline"`
578+
vmv1beta1.CommonAppsParams `json:",inline"`
582579

583580
// RollingUpdateStrategyBehavior defines customized behavior for rolling updates.
584581
// It applies if the RollingUpdateStrategy is set to OnDelete, which is the default.

api/operator/v1/vlsingle_types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ type VLSingleSpec struct {
4343
// created by operator for the given CustomResource
4444
ManagedMetadata *vmv1beta1.ManagedObjectsMetadata `json:"managedMetadata,omitempty"`
4545

46-
vmv1beta1.CommonDefaultableParams `json:",inline,omitempty"`
47-
vmv1beta1.CommonApplicationDeploymentParams `json:",inline,omitempty"`
46+
vmv1beta1.CommonAppsParams `json:",inline,omitempty"`
4847

4948
// LogLevel for VictoriaLogs to be configured with.
5049
// +optional

api/operator/v1/vmanomaly_types.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,8 @@ type VMAnomalySpec struct {
105105
License *vmv1beta1.License `json:"license,omitempty"`
106106
// ServiceAccountName is the name of the ServiceAccount to use to run the pods
107107
// +optional
108-
ServiceAccountName string `json:"serviceAccountName,omitempty"`
109-
vmv1beta1.CommonDefaultableParams `json:",inline,omitempty"`
110-
vmv1beta1.CommonApplicationDeploymentParams `json:",inline,omitempty"`
108+
ServiceAccountName string `json:"serviceAccountName,omitempty"`
109+
vmv1beta1.CommonAppsParams `json:",inline,omitempty"`
111110
}
112111

113112
// VMAnomalyWritersSpec defines writer configuration for VMAnomaly

api/operator/v1/vtcluster_types.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,7 @@ type VTInsert struct {
251251
// +optional
252252
RollingUpdate *appsv1.RollingUpdateDeployment `json:"rollingUpdate,omitempty"`
253253

254-
vmv1beta1.CommonDefaultableParams `json:",inline"`
255-
vmv1beta1.CommonApplicationDeploymentParams `json:",inline"`
254+
vmv1beta1.CommonAppsParams `json:",inline"`
256255
}
257256

258257
// Probe implements build.probeCRD interface
@@ -351,8 +350,7 @@ type VTSelect struct {
351350
// ExtraStorageNodes - defines additional storage nodes to VTSelect
352351
ExtraStorageNodes []VTStorageNode `json:"extraStorageNodes,omitempty"`
353352

354-
vmv1beta1.CommonDefaultableParams `json:",inline"`
355-
vmv1beta1.CommonApplicationDeploymentParams `json:",inline"`
353+
vmv1beta1.CommonAppsParams `json:",inline"`
356354
}
357355

358356
// GetMetricsPath returns prefixed path for metric requests
@@ -487,8 +485,7 @@ type VTStorage struct {
487485
// +optional
488486
MaintenanceSelectNodeIDs []int32 `json:"maintenanceSelectNodeIDs,omitempty"`
489487

490-
vmv1beta1.CommonDefaultableParams `json:",inline"`
491-
vmv1beta1.CommonApplicationDeploymentParams `json:",inline"`
488+
vmv1beta1.CommonAppsParams `json:",inline"`
492489

493490
// RollingUpdateStrategyBehavior defines customized behavior for rolling updates.
494491
// It applies if the RollingUpdateStrategy is set to OnDelete, which is the default.

api/operator/v1/vtsingle_types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ type VTSingleSpec struct {
4343
// created by operator for the given CustomResource
4444
ManagedMetadata *vmv1beta1.ManagedObjectsMetadata `json:"managedMetadata,omitempty"`
4545

46-
vmv1beta1.CommonDefaultableParams `json:",inline,omitempty"`
47-
vmv1beta1.CommonApplicationDeploymentParams `json:",inline,omitempty"`
46+
vmv1beta1.CommonAppsParams `json:",inline,omitempty"`
4847

4948
// LogLevel for VictoriaTraces to be configured with.
5049
// +optional

api/operator/v1/zz_generated.deepcopy.go

Lines changed: 10 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/operator/v1alpha1/vmdistributed_types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,7 @@ type VMDistributedZoneAgentSpec struct {
214214
// +optional
215215
ServiceAccountName string `json:"serviceAccountName,omitempty"`
216216

217-
vmv1beta1.CommonDefaultableParams `json:",inline,omitempty"`
218-
vmv1beta1.CommonApplicationDeploymentParams `json:",inline,omitempty"`
217+
vmv1beta1.CommonAppsParams `json:",inline,omitempty"`
219218
}
220219

221220
func (s *VMDistributedZoneAgentSpec) ToVMAgentSpec() (*vmv1beta1.VMAgentSpec, error) {

api/operator/v1alpha1/zz_generated.deepcopy.go

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/operator/v1beta1/vlogs_types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ type VLogsSpec struct {
4444
// created by operator for the given CustomResource
4545
ManagedMetadata *ManagedObjectsMetadata `json:"managedMetadata,omitempty"`
4646

47-
CommonDefaultableParams `json:",inline,omitempty"`
48-
CommonApplicationDeploymentParams `json:",inline,omitempty"`
47+
CommonAppsParams `json:",inline,omitempty"`
4948

5049
// LogLevel for VictoriaLogs to be configured with.
5150
// +optional

0 commit comments

Comments
 (0)