Skip to content

Commit

Permalink
Merge pull request #835 from Patryk-Stefanski/THREESCALE-8999
Browse files Browse the repository at this point in the history
THREESCALE-8999-Allow adding labels to components via APIManager CR
  • Loading branch information
eguzki committed Jul 10, 2023
2 parents a9754fb + 2d0b31e commit f8916eb
Show file tree
Hide file tree
Showing 15 changed files with 385 additions and 4 deletions.
32 changes: 32 additions & 0 deletions apis/apps/v1alpha1/apimanager_types.go
Expand Up @@ -267,6 +267,8 @@ type ApicastProductionSpec struct {
PriorityClassName *string `json:"priorityClassName,omitempty"`
// +optional
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
}

type ApicastStagingSpec struct {
Expand Down Expand Up @@ -329,6 +331,8 @@ type ApicastStagingSpec struct {
PriorityClassName *string `json:"priorityClassName,omitempty"`
// +optional
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
}

type BackendSpec struct {
Expand All @@ -348,6 +352,8 @@ type BackendSpec struct {
RedisPriorityClassName *string `json:"redisPriorityClassName,omitempty"`
// +optional
RedisTopologySpreadConstraints []v1.TopologySpreadConstraint `json:"redisTopologySpreadConstraints,omitempty"`
// +optional
RedisLabels map[string]string `json:"redisLabels,omitempty"`

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

type BackendWorkerSpec struct {
Expand All @@ -390,6 +398,8 @@ type BackendWorkerSpec struct {
PriorityClassName *string `json:"priorityClassName,omitempty"`
// +optional
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
}

type BackendCronSpec struct {
Expand All @@ -405,6 +415,8 @@ type BackendCronSpec struct {
PriorityClassName *string `json:"priorityClassName,omitempty"`
// +optional
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
}

type SystemSpec struct {
Expand All @@ -424,6 +436,8 @@ type SystemSpec struct {
MemcachedPriorityClassName *string `json:"memcachedPriorityClassName,omitempty"`
// +optional
MemcachedTopologySpreadConstraints []v1.TopologySpreadConstraint `json:"memcachedTopologySpreadConstraints,omitempty"`
// +optional
MemcachedLabels map[string]string `json:"memcachedLabels,omitempty"`

// +optional
RedisImage *string `json:"redisImage,omitempty"`
Expand All @@ -439,6 +453,8 @@ type SystemSpec struct {
RedisPriorityClassName *string `json:"redisPriorityClassName,omitempty"`
// +optional
RedisTopologySpreadConstraints []v1.TopologySpreadConstraint `json:"redisTopologySpreadConstraints,omitempty"`
// +optional
RedisLabels map[string]string `json:"redisLabels,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 @@ -485,6 +501,8 @@ type SystemAppSpec struct {
PriorityClassName *string `json:"priorityClassName,omitempty"`
// +optional
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
}

type SystemSidekiqSpec struct {
Expand All @@ -500,6 +518,8 @@ type SystemSidekiqSpec struct {
PriorityClassName *string `json:"priorityClassName,omitempty"`
// +optional
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
}

type SystemSearchdSpec struct {
Expand All @@ -517,6 +537,8 @@ type SystemSearchdSpec struct {
PriorityClassName *string `json:"priorityClassName,omitempty"`
// +optional
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
}

type SystemSphinxSpec struct {
Expand Down Expand Up @@ -609,6 +631,8 @@ type SystemMySQLSpec struct {
PriorityClassName *string `json:"priorityClassName,omitempty"`
// +optional
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
}

type SystemPostgreSQLSpec struct {
Expand All @@ -627,6 +651,8 @@ type SystemPostgreSQLSpec struct {
PriorityClassName *string `json:"priorityClassName,omitempty"`
// +optional
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
}

type ZyncSpec struct {
Expand All @@ -652,6 +678,8 @@ type ZyncSpec struct {
DatabasePriorityClassName *string `json:"databasePriorityClassName,omitempty"`
// +optional
DatabaseTopologySpreadConstraints []v1.TopologySpreadConstraint `json:"databaseTopologySpreadConstraints,omitempty"`
// +optional
DatabaseLabels map[string]string `json:"databaseLabels,omitempty"`
}

type ZyncAppSpec struct {
Expand All @@ -667,6 +695,8 @@ type ZyncAppSpec struct {
PriorityClassName *string `json:"priorityClassName,omitempty"`
// +optional
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,omitempty"`
}

type ZyncQueSpec struct {
Expand All @@ -682,6 +712,8 @@ type ZyncQueSpec struct {
PriorityClassName *string `json:"priorityClassName,omitempty"`
// +optional
TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// +optional
Labels map[string]string `json:"labels,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 f8916eb

Please sign in to comment.