Skip to content

Commit

Permalink
rename replicationControllerAnnotations to workloadAnnotations
Browse files Browse the repository at this point in the history
  • Loading branch information
SamWheating committed Mar 20, 2024
1 parent ee37b18 commit b71f372
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 52 deletions.
10 changes: 5 additions & 5 deletions apis/druid/v1alpha1/druid_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ type DruidSpec struct {
// +optional
PodAnnotations map[string]string `json:"podAnnotations,omitempty"`

// ReplicationControllerAnnotations annotations to be populated in StatefulSet or Deployment spec.
// if the same key is specified at both the DruidNodeSpec level and DruidSpec level, the DruidNodeSpec ReplicationControllerAnnotations will take precedence.
// WorkloadAnnotations annotations to be populated in StatefulSet or Deployment spec.
// if the same key is specified at both the DruidNodeSpec level and DruidSpec level, the DruidNodeSpec WorkloadAnnotations will take precedence.
// +optional
ReplicationControllerAnnotations map[string]string `json:"replicationControllerAnnotations,omitempty"`
WorkloadAnnotations map[string]string `json:"workloadAnnotations,omitempty"`

// PodManagementPolicy
// +optional
Expand Down Expand Up @@ -438,9 +438,9 @@ type DruidNodeSpec struct {
// +optional
IngressAnnotations map[string]string `json:"ingressAnnotations,omitempty"`

// ReplicationControllerAnnotations annotations to be populated in StatefulSet or Deployment spec.
// WorkloadAnnotations annotations to be populated in StatefulSet or Deployment spec.
// +optional
ReplicationControllerAnnotations map[string]string `json:"replicationControllerAnnotations,omitempty"`
WorkloadAnnotations map[string]string `json:"workloadAnnotations,omitempty"`

// Ingress Kubernetes Native `Ingress` specification.
// +optional
Expand Down
8 changes: 4 additions & 4 deletions apis/druid/v1alpha1/zz_generated.deepcopy.go

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

28 changes: 14 additions & 14 deletions chart/templates/crds/druid.apache.org_druids.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5715,12 +5715,6 @@ spec:
format: int32
minimum: 0
type: integer
replicationControllerAnnotations:
additionalProperties:
type: string
description: ReplicationControllerAnnotations annotations to
be populated in StatefulSet or Deployment spec.
type: object
resources:
description: Resources Kubernetes Native `resources` specification.
properties:
Expand Down Expand Up @@ -9031,6 +9025,12 @@ spec:
- name
type: object
type: array
workloadAnnotations:
additionalProperties:
type: string
description: WorkloadAnnotations annotations to be populated
in StatefulSet or Deployment spec.
type: object
required:
- druid.port
- nodeConfigMountPath
Expand Down Expand Up @@ -9203,14 +9203,6 @@ spec:
format: int32
type: integer
type: object
replicationControllerAnnotations:
additionalProperties:
type: string
description: ReplicationControllerAnnotations annotations to be populated
in StatefulSet or Deployment spec. if the same key is specified
at both the DruidNodeSpec level and DruidSpec level, the DruidNodeSpec
ReplicationControllerAnnotations will take precedence.
type: object
rollingDeploy:
default: true
description: 'RollingDeploy Whether to deploy the components in a
Expand Down Expand Up @@ -12108,6 +12100,14 @@ spec:
- name
type: object
type: array
workloadAnnotations:
additionalProperties:
type: string
description: WorkloadAnnotations annotations to be populated in StatefulSet
or Deployment spec. if the same key is specified at both the DruidNodeSpec
level and DruidSpec level, the DruidNodeSpec WorkloadAnnotations
will take precedence.
type: object
zookeeper:
description: 'Zookeeper IGNORED (Future API): In order to make Druid
dependency setup extensible from within Druid operator.'
Expand Down
28 changes: 14 additions & 14 deletions config/crd/bases/druid.apache.org_druids.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5715,12 +5715,6 @@ spec:
format: int32
minimum: 0
type: integer
replicationControllerAnnotations:
additionalProperties:
type: string
description: ReplicationControllerAnnotations annotations to
be populated in StatefulSet or Deployment spec.
type: object
resources:
description: Resources Kubernetes Native `resources` specification.
properties:
Expand Down Expand Up @@ -9031,6 +9025,12 @@ spec:
- name
type: object
type: array
workloadAnnotations:
additionalProperties:
type: string
description: WorkloadAnnotations annotations to be populated
in StatefulSet or Deployment spec.
type: object
required:
- druid.port
- nodeConfigMountPath
Expand Down Expand Up @@ -9203,14 +9203,6 @@ spec:
format: int32
type: integer
type: object
replicationControllerAnnotations:
additionalProperties:
type: string
description: ReplicationControllerAnnotations annotations to be populated
in StatefulSet or Deployment spec. if the same key is specified
at both the DruidNodeSpec level and DruidSpec level, the DruidNodeSpec
ReplicationControllerAnnotations will take precedence.
type: object
rollingDeploy:
default: true
description: 'RollingDeploy Whether to deploy the components in a
Expand Down Expand Up @@ -12108,6 +12100,14 @@ spec:
- name
type: object
type: array
workloadAnnotations:
additionalProperties:
type: string
description: WorkloadAnnotations annotations to be populated in StatefulSet
or Deployment spec. if the same key is specified at both the DruidNodeSpec
level and DruidSpec level, the DruidNodeSpec WorkloadAnnotations
will take precedence.
type: object
zookeeper:
description: 'Zookeeper IGNORED (Future API): In order to make Druid
dependency setup extensible from within Druid operator.'
Expand Down
6 changes: 3 additions & 3 deletions controllers/druid/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1294,11 +1294,11 @@ func makeLabelsForNodeSpec(nodeSpec *v1alpha1.DruidNodeSpec, m *v1alpha1.Druid,
func makeAnnotationsForReplicationController(nodeSpec *v1alpha1.DruidNodeSpec, m *v1alpha1.Druid) map[string]string {
var annotations = map[string]string{}

if nodeSpec.ReplicationControllerAnnotations != nil && m.Spec.ReplicationControllerAnnotations != nil {
annotations = m.Spec.ReplicationControllerAnnotations
if m.Spec.WorkloadAnnotations != nil {
annotations = m.Spec.WorkloadAnnotations
}

for k, v := range nodeSpec.ReplicationControllerAnnotations {
for k, v := range nodeSpec.WorkloadAnnotations {
annotations[k] = v
}

Expand Down
4 changes: 2 additions & 2 deletions controllers/druid/testdata/druid-test-cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
image: himanshu01/druid:druid-0.12.0-1
defaultProbes: true
priorityClassName: high-priority
replicationControllerAnnotations:
workloadAnnotations:
kubernetes.io/cluster-scoped-annotation: "cluster"
kubernetes.io/override-annotation: "cluster-scoped-annotation"
podAnnotations:
Expand Down Expand Up @@ -112,7 +112,7 @@ spec:
nodes:
brokers:
nodeType: "broker"
replicationControllerAnnotations:
workloadAnnotations:
kubernetes.io/node-scoped-annotation: "broker"
kubernetes.io/override-annotation: "node-scoped-annotation"
services:
Expand Down
16 changes: 8 additions & 8 deletions docs/api_specifications/druid.md
Original file line number Diff line number Diff line change
Expand Up @@ -609,15 +609,15 @@ map[string]string
</tr>
<tr>
<td>
<code>replicationControllerAnnotations</code><br>
<code>workloadAnnotations</code><br>
<em>
map[string]string
</em>
</td>
<td>
<em>(Optional)</em>
<p>ReplicationControllerAnnotations annotations to be populated in StatefulSet or Deployment spec.
if the same key is specified at both the DruidNodeSpec level and DruidSpec level, the DruidNodeSpec ReplicationControllerAnnotations will take precedence.</p>
<p>WorkloadAnnotations annotations to be populated in StatefulSet or Deployment spec.
if the same key is specified at both the DruidNodeSpec level and DruidSpec level, the DruidNodeSpec WorkloadAnnotations will take precedence.</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1806,14 +1806,14 @@ map[string]string
</tr>
<tr>
<td>
<code>replicationControllerAnnotations</code><br>
<code>workloadAnnotations</code><br>
<em>
map[string]string
</em>
</td>
<td>
<em>(Optional)</em>
<p>ReplicationControllerAnnotations annotations to be populated in StatefulSet or Deployment spec.</p>
<p>WorkloadAnnotations annotations to be populated in StatefulSet or Deployment spec.</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -2328,15 +2328,15 @@ map[string]string
</tr>
<tr>
<td>
<code>replicationControllerAnnotations</code><br>
<code>workloadAnnotations</code><br>
<em>
map[string]string
</em>
</td>
<td>
<em>(Optional)</em>
<p>ReplicationControllerAnnotations annotations to be populated in StatefulSet or Deployment spec.
if the same key is specified at both the DruidNodeSpec level and DruidSpec level, the DruidNodeSpec ReplicationControllerAnnotations will take precedence.</p>
<p>WorkloadAnnotations annotations to be populated in StatefulSet or Deployment spec.
if the same key is specified at both the DruidNodeSpec level and DruidSpec level, the DruidNodeSpec WorkloadAnnotations will take precedence.</p>
</td>
</tr>
<tr>
Expand Down
4 changes: 2 additions & 2 deletions e2e/configs/druid-cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
release: alpha
podAnnotations:
dummy: k8s_extn_needs_atleast_one_annotation
replicationControllerAnnotations:
workloadAnnotations:
kubernetes.io/cluster-scoped-annotation: "cluster"
readinessProbe:
httpGet:
Expand Down Expand Up @@ -131,7 +131,7 @@ spec:
# imagePullSecrets:
# - name: tutu
priorityClassName: system-cluster-critical
replicationControllerAnnotations:
workloadAnnotations:
kubernetes.io/node-scoped-annotation: "broker"
druid.port: 8088
services:
Expand Down

0 comments on commit b71f372

Please sign in to comment.