Skip to content

Commit

Permalink
Remove use of "master" in labels and names (#1139)
Browse files Browse the repository at this point in the history
We renamed the `master` command to `aggregator` in #847 (released in
v0.15.3). However, `master` was still being used in some of our
Kubernetes resource labels and names. We want to remove usage of
insensitive language and as such use different labels for
identifying resources.

Now, any aggregator resources will have the label
`sonobuoy-component: aggregator` and plugin resources will have
`sonobuoy-component: plugin`. The existing label is still in place as it
was used to identify the aggregator pod (which is required most sonobuoy
commands once a run has started). Removing it now would prevent users
with older clients from using newer images, or querying the state of
runs started by newer clients. Instead, both labels will be applied
howeve the `sonobuoy-component: aggregator` label is the preferred
label. If the aggregator pod cannot be found using the new label, the
client will retry using the now deprecated label. When retrying, the
client will display a warning that it is attempting to find the pod
using the deprecated label.

Newer clients will be able to query the state of runs with old labels
applied, and older clients will be able to query the state of runs
created by the newer clients.

The name of the service created by Sonobuoy has been renamed to
`sonobuoy-aggregator`. This has no user facing impact.

Signed-off-by: Bridget McErlean <[email protected]>
  • Loading branch information
zubron authored Jul 7, 2020
1 parent e43cefe commit 750f015
Show file tree
Hide file tree
Showing 27 changed files with 155 additions and 98 deletions.
7 changes: 4 additions & 3 deletions pkg/client/testdata/custom-systemd-logs-image.golden
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ metadata:
labels:
component: sonobuoy
run: sonobuoy-master
sonobuoy-component: aggregator
tier: analysis
name: sonobuoy
namespace:
Expand Down Expand Up @@ -109,14 +110,14 @@ kind: Service
metadata:
labels:
component: sonobuoy
run: sonobuoy-master
name: sonobuoy-master
sonobuoy-component: aggregator
name: sonobuoy-aggregator
namespace:
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
run: sonobuoy-master
sonobuoy-component: aggregator
type: ClusterIP
7 changes: 4 additions & 3 deletions pkg/client/testdata/default-plugins-via-nil-selection.golden
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ metadata:
labels:
component: sonobuoy
run: sonobuoy-master
sonobuoy-component: aggregator
tier: analysis
name: sonobuoy
namespace: sonobuoy
Expand Down Expand Up @@ -127,14 +128,14 @@ kind: Service
metadata:
labels:
component: sonobuoy
run: sonobuoy-master
name: sonobuoy-master
sonobuoy-component: aggregator
name: sonobuoy-aggregator
namespace: sonobuoy
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
run: sonobuoy-master
sonobuoy-component: aggregator
type: ClusterIP
7 changes: 4 additions & 3 deletions pkg/client/testdata/default-pod-spec.golden
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ metadata:
labels:
component: sonobuoy
run: sonobuoy-master
sonobuoy-component: aggregator
tier: analysis
name: sonobuoy
namespace:
Expand Down Expand Up @@ -152,14 +153,14 @@ kind: Service
metadata:
labels:
component: sonobuoy
run: sonobuoy-master
name: sonobuoy-master
sonobuoy-component: aggregator
name: sonobuoy-aggregator
namespace:
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
run: sonobuoy-master
sonobuoy-component: aggregator
type: ClusterIP
7 changes: 4 additions & 3 deletions pkg/client/testdata/default.golden
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ metadata:
labels:
component: sonobuoy
run: sonobuoy-master
sonobuoy-component: aggregator
tier: analysis
name: sonobuoy
namespace: sonobuoy
Expand Down Expand Up @@ -127,14 +128,14 @@ kind: Service
metadata:
labels:
component: sonobuoy
run: sonobuoy-master
name: sonobuoy-master
sonobuoy-component: aggregator
name: sonobuoy-aggregator
namespace: sonobuoy
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
run: sonobuoy-master
sonobuoy-component: aggregator
type: ClusterIP
7 changes: 4 additions & 3 deletions pkg/client/testdata/e2e-default.golden
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ metadata:
labels:
component: sonobuoy
run: sonobuoy-master
sonobuoy-component: aggregator
tier: analysis
name: sonobuoy
namespace: sonobuoy
Expand Down Expand Up @@ -98,14 +99,14 @@ kind: Service
metadata:
labels:
component: sonobuoy
run: sonobuoy-master
name: sonobuoy-master
sonobuoy-component: aggregator
name: sonobuoy-aggregator
namespace: sonobuoy
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
run: sonobuoy-master
sonobuoy-component: aggregator
type: ClusterIP
7 changes: 4 additions & 3 deletions pkg/client/testdata/e2e-progress-custom-port.golden
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ metadata:
labels:
component: sonobuoy
run: sonobuoy-master
sonobuoy-component: aggregator
tier: analysis
name: sonobuoy
namespace:
Expand Down Expand Up @@ -101,14 +102,14 @@ kind: Service
metadata:
labels:
component: sonobuoy
run: sonobuoy-master
name: sonobuoy-master
sonobuoy-component: aggregator
name: sonobuoy-aggregator
namespace:
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
run: sonobuoy-master
sonobuoy-component: aggregator
type: ClusterIP
7 changes: 4 additions & 3 deletions pkg/client/testdata/e2e-progress-vs-user-defined.golden
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ metadata:
labels:
component: sonobuoy
run: sonobuoy-master
sonobuoy-component: aggregator
tier: analysis
name: sonobuoy
namespace:
Expand Down Expand Up @@ -101,14 +102,14 @@ kind: Service
metadata:
labels:
component: sonobuoy
run: sonobuoy-master
name: sonobuoy-master
sonobuoy-component: aggregator
name: sonobuoy-aggregator
namespace:
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
run: sonobuoy-master
sonobuoy-component: aggregator
type: ClusterIP
7 changes: 4 additions & 3 deletions pkg/client/testdata/e2e-progress.golden
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ metadata:
labels:
component: sonobuoy
run: sonobuoy-master
sonobuoy-component: aggregator
tier: analysis
name: sonobuoy
namespace:
Expand Down Expand Up @@ -101,14 +102,14 @@ kind: Service
metadata:
labels:
component: sonobuoy
run: sonobuoy-master
name: sonobuoy-master
sonobuoy-component: aggregator
name: sonobuoy-aggregator
namespace:
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
run: sonobuoy-master
sonobuoy-component: aggregator
type: ClusterIP
7 changes: 4 additions & 3 deletions pkg/client/testdata/envoverrides.golden
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ metadata:
labels:
component: sonobuoy
run: sonobuoy-master
sonobuoy-component: aggregator
tier: analysis
name: sonobuoy
namespace:
Expand Down Expand Up @@ -101,14 +102,14 @@ kind: Service
metadata:
labels:
component: sonobuoy
run: sonobuoy-master
name: sonobuoy-master
sonobuoy-component: aggregator
name: sonobuoy-aggregator
namespace:
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
run: sonobuoy-master
sonobuoy-component: aggregator
type: ClusterIP
7 changes: 4 additions & 3 deletions pkg/client/testdata/goRunnerRemoved.golden
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ metadata:
labels:
component: sonobuoy
run: sonobuoy-master
sonobuoy-component: aggregator
tier: analysis
name: sonobuoy
namespace:
Expand Down Expand Up @@ -96,14 +97,14 @@ kind: Service
metadata:
labels:
component: sonobuoy
run: sonobuoy-master
name: sonobuoy-master
sonobuoy-component: aggregator
name: sonobuoy-aggregator
namespace:
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
run: sonobuoy-master
sonobuoy-component: aggregator
type: ClusterIP
7 changes: 4 additions & 3 deletions pkg/client/testdata/imagePullSecrets.golden
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ metadata:
labels:
component: sonobuoy
run: sonobuoy-master
sonobuoy-component: aggregator
tier: analysis
name: sonobuoy
namespace:
Expand Down Expand Up @@ -100,14 +101,14 @@ kind: Service
metadata:
labels:
component: sonobuoy
run: sonobuoy-master
name: sonobuoy-master
sonobuoy-component: aggregator
name: sonobuoy-aggregator
namespace:
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
run: sonobuoy-master
sonobuoy-component: aggregator
type: ClusterIP
7 changes: 4 additions & 3 deletions pkg/client/testdata/manual-custom-plugin-plus-e2e.golden
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ metadata:
labels:
component: sonobuoy
run: sonobuoy-master
sonobuoy-component: aggregator
tier: analysis
name: sonobuoy
namespace:
Expand Down Expand Up @@ -105,14 +106,14 @@ kind: Service
metadata:
labels:
component: sonobuoy
run: sonobuoy-master
name: sonobuoy-master
sonobuoy-component: aggregator
name: sonobuoy-aggregator
namespace:
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
run: sonobuoy-master
sonobuoy-component: aggregator
type: ClusterIP
7 changes: 4 additions & 3 deletions pkg/client/testdata/manual-custom-plugin-plus-systemd.golden
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ metadata:
labels:
component: sonobuoy
run: sonobuoy-master
sonobuoy-component: aggregator
tier: analysis
name: sonobuoy
namespace:
Expand Down Expand Up @@ -115,14 +116,14 @@ kind: Service
metadata:
labels:
component: sonobuoy
run: sonobuoy-master
name: sonobuoy-master
sonobuoy-component: aggregator
name: sonobuoy-aggregator
namespace:
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
run: sonobuoy-master
sonobuoy-component: aggregator
type: ClusterIP
7 changes: 4 additions & 3 deletions pkg/client/testdata/manual-custom-plugin.golden
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ metadata:
labels:
component: sonobuoy
run: sonobuoy-master
sonobuoy-component: aggregator
tier: analysis
name: sonobuoy
namespace:
Expand Down Expand Up @@ -86,14 +87,14 @@ kind: Service
metadata:
labels:
component: sonobuoy
run: sonobuoy-master
name: sonobuoy-master
sonobuoy-component: aggregator
name: sonobuoy-aggregator
namespace:
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
run: sonobuoy-master
sonobuoy-component: aggregator
type: ClusterIP
7 changes: 4 additions & 3 deletions pkg/client/testdata/manual-e2e.golden
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ metadata:
labels:
component: sonobuoy
run: sonobuoy-master
sonobuoy-component: aggregator
tier: analysis
name: sonobuoy
namespace:
Expand Down Expand Up @@ -98,14 +99,14 @@ kind: Service
metadata:
labels:
component: sonobuoy
run: sonobuoy-master
name: sonobuoy-master
sonobuoy-component: aggregator
name: sonobuoy-aggregator
namespace:
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
run: sonobuoy-master
sonobuoy-component: aggregator
type: ClusterIP
Loading

0 comments on commit 750f015

Please sign in to comment.