Skip to content

Commit

Permalink
THREESCALE-9000 Allow adding annotations to components via APIManager CR
Browse files Browse the repository at this point in the history
  • Loading branch information
valerymo committed Jul 11, 2023
1 parent f8916eb commit ec722ac
Show file tree
Hide file tree
Showing 44 changed files with 557 additions and 29 deletions.
32 changes: 32 additions & 0 deletions apis/apps/v1alpha1/apimanager_types.go
Expand Up @@ -269,6 +269,8 @@ type ApicastProductionSpec struct {
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}

type ApicastStagingSpec struct {
Expand Down Expand Up @@ -333,6 +335,8 @@ type ApicastStagingSpec struct {
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}

type BackendSpec struct {
Expand All @@ -354,6 +358,8 @@ type BackendSpec struct {
RedisTopologySpreadConstraints []v1.TopologySpreadConstraint `json:"redisTopologySpreadConstraints,omitempty"`
// +optional
RedisLabels map[string]string `json:"redisLabels,omitempty"`
// +optional
RedisAnnotations map[string]string `json:"redisAnnotations,omitempty"`

// +optional
ListenerSpec *BackendListenerSpec `json:"listenerSpec,omitempty"`
Expand Down Expand Up @@ -383,6 +389,8 @@ type BackendListenerSpec struct {
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}

type BackendWorkerSpec struct {
Expand All @@ -400,6 +408,8 @@ type BackendWorkerSpec struct {
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}

type BackendCronSpec struct {
Expand All @@ -417,6 +427,8 @@ type BackendCronSpec struct {
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}

type SystemSpec struct {
Expand All @@ -438,6 +450,8 @@ type SystemSpec struct {
MemcachedTopologySpreadConstraints []v1.TopologySpreadConstraint `json:"memcachedTopologySpreadConstraints,omitempty"`
// +optional
MemcachedLabels map[string]string `json:"memcachedLabels,omitempty"`
// +optional
MemcachedAnnotations map[string]string `json:"memcachedAnnotations,omitempty"`

// +optional
RedisImage *string `json:"redisImage,omitempty"`
Expand All @@ -455,6 +469,8 @@ type SystemSpec struct {
RedisTopologySpreadConstraints []v1.TopologySpreadConstraint `json:"redisTopologySpreadConstraints,omitempty"`
// +optional
RedisLabels map[string]string `json:"redisLabels,omitempty"`
// +optional
RedisAnnotations map[string]string `json:"redisAnnotations,omitempty"`

// TODO should this field be optional? We have different approaches in Kubernetes.
// For example, in v1.Volume it is optional and there's an implied behaviour
Expand Down Expand Up @@ -503,6 +519,8 @@ type SystemAppSpec struct {
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}

type SystemSidekiqSpec struct {
Expand All @@ -520,6 +538,8 @@ type SystemSidekiqSpec struct {
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}

type SystemSearchdSpec struct {
Expand All @@ -539,6 +559,8 @@ type SystemSearchdSpec struct {
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}

type SystemSphinxSpec struct {
Expand Down Expand Up @@ -633,6 +655,8 @@ type SystemMySQLSpec struct {
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}

type SystemPostgreSQLSpec struct {
Expand All @@ -653,6 +677,8 @@ type SystemPostgreSQLSpec struct {
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}

type ZyncSpec struct {
Expand Down Expand Up @@ -680,6 +706,8 @@ type ZyncSpec struct {
DatabaseTopologySpreadConstraints []v1.TopologySpreadConstraint `json:"databaseTopologySpreadConstraints,omitempty"`
// +optional
DatabaseLabels map[string]string `json:"databaseLabels,omitempty"`
// +optional
DatabaseAnnotations map[string]string `json:"databaseAnnotations,omitempty"`
}

type ZyncAppSpec struct {
Expand All @@ -697,6 +725,8 @@ type ZyncAppSpec struct {
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}

type ZyncQueSpec struct {
Expand All @@ -714,6 +744,8 @@ type ZyncQueSpec struct {
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}

type HighAvailabilitySpec struct {
Expand Down
112 changes: 112 additions & 0 deletions apis/apps/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ec722ac

Please sign in to comment.