Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[collector] move app.kubernetes.io/component to be only labels not selectors #1432

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/opentelemetry-collector/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opentelemetry-collector
version: 0.110.2
version: 0.110.3
description: OpenTelemetry Collector Helm chart for Kubernetes
type: application
home: https://opentelemetry.io/
Expand Down
4 changes: 4 additions & 0 deletions charts/opentelemetry-collector/UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ These upgrade guidelines only contain instructions for version upgrades which re
If the version you want to upgrade to is not listed here, then there is nothing to do for you.
Just upgrade and enjoy.

## 0.110.0 to 0.110.1 or 0.110.2

We broke the selector labels in `0.110.0`, which causes `helm upgrades` to fail. Do not attempt to upgrade from `0.110.0` to either `0.110.1` or `0.110.2`. Go straight to `0.110.3` instead.

## 0.97.2 to 0.98.0

> [!WARNING]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ kind: ClusterRole
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm

app.kubernetes.io/component: standalone-collector
rules:
- apiGroups: [""]
resources: ["pods", "namespaces"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ kind: ClusterRoleBinding
metadata:
name: example-opentelemetry-collector
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm

app.kubernetes.io/component: standalone-collector
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ metadata:
name: example-opentelemetry-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm

app.kubernetes.io/component: standalone-collector
data:
relay: |
exporters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,30 @@ metadata:
name: example-opentelemetry-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm

app.kubernetes.io/component: standalone-collector
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/component: standalone-collector
component: standalone-collector
strategy:
type: RollingUpdate
template:
metadata:
annotations:
checksum/config: 76282a3f2d4d10f47ad8dc760ded5edf0f25b0cf540e4652c5568e5ba975185f
checksum/config: 2872550fe0484308dc5d7b7083d6656162378f162feab8fa95dc6b9a36ec8048

labels:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/component: standalone-collector
component: standalone-collector

spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ metadata:
name: example-opentelemetry-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm

app.kubernetes.io/component: standalone-collector
component: standalone-collector
spec:
Expand Down Expand Up @@ -46,6 +45,5 @@ spec:
selector:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/component: standalone-collector
component: standalone-collector
internalTrafficPolicy: Cluster
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ metadata:
name: example-opentelemetry-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: standalone-collector
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ resources:
cpu: 100m
memory: 200M

serviceAccount:
create: false
name: "example-opentelemetry-collector"
Comment on lines +35 to +37
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change needed?

Copy link
Member Author

@TylerHelmuth TylerHelmuth Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example suffers from the fact that we can only have 1 serviceAccount.yaml file saved in the dir. This was causing a race condition between whether the daemonset or deployment got to render it. This wasn't a problem before bc the component label wasnt there to differentiate but now it is.

In reality a user when doing 2 installs would get 2 different service accounts based on the install names. But this example saves the objects as files and we cant control the file name output.


Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ metadata:
name: example-opentelemetry-collector-agent
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm

app.kubernetes.io/component: agent-collector
data:
relay: |
exporters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ metadata:
name: example-opentelemetry-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm

app.kubernetes.io/component: standalone-collector
data:
relay: |
exporters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,28 @@ metadata:
name: example-opentelemetry-collector-agent
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm

app.kubernetes.io/component: agent-collector
spec:
selector:
matchLabels:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/component: agent-collector
component: agent-collector
updateStrategy:
type: RollingUpdate
template:
metadata:
annotations:
checksum/config: 135a073d9761a400a684ac63b44bc8782c7bd9f971ea778de6c580ec33be465d
checksum/config: 11c36648943067ed80da755ca3ee1bfebb57bcd8348837ad77de278b45ebb473

labels:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/component: agent-collector
component: agent-collector

spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,30 @@ metadata:
name: example-opentelemetry-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm

app.kubernetes.io/component: standalone-collector
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/component: standalone-collector
component: standalone-collector
strategy:
type: RollingUpdate
template:
metadata:
annotations:
checksum/config: 20bfa2c5ded67ff812448ab7cd0ac82de243c86309570920516ecd639162d193
checksum/config: 140c221efb1ad3a958c46fb344c33491bd96b2b12f0bca8f8608f6555f36b14c

labels:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/component: standalone-collector
component: standalone-collector

spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ metadata:
name: example-opentelemetry-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm

app.kubernetes.io/component: standalone-collector
component: standalone-collector
spec:
Expand Down Expand Up @@ -46,6 +45,5 @@ spec:
selector:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/component: standalone-collector
component: standalone-collector
internalTrafficPolicy: Cluster
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ metadata:
name: example-opentelemetry-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: standalone-collector
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ metadata:
name: example-opentelemetry-collector-agent
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm

app.kubernetes.io/component: agent-collector
data:
relay: |
exporters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,28 @@ metadata:
name: example-opentelemetry-collector-agent
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm

app.kubernetes.io/component: agent-collector
spec:
selector:
matchLabels:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/component: agent-collector
component: agent-collector
updateStrategy:
type: RollingUpdate
template:
metadata:
annotations:
checksum/config: 80140a7f836e5149f3b03cb919acf5381025c7c8b521e549bea489bff7f9c6d3
checksum/config: 74c25153740696df89c5337591f1986b8915c01c27a365e5d2d6ddca126eb9c2

labels:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/component: agent-collector
component: agent-collector

spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ metadata:
name: example-opentelemetry-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: agent-collector
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ metadata:
name: example-opentelemetry-collector-agent
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm

app.kubernetes.io/component: agent-collector
data:
relay: |
exporters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,28 @@ metadata:
name: example-opentelemetry-collector-agent
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm

app.kubernetes.io/component: agent-collector
spec:
selector:
matchLabels:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/component: agent-collector
component: agent-collector
updateStrategy:
type: RollingUpdate
template:
metadata:
annotations:
checksum/config: cb58f4f723647a2cc625f382aafa842904d841d87eec5678beb75a600ae79d17
checksum/config: 0c4cce18bf13a82b29a71f0a2f36b9ed2980fe441a2dd91ac531f26470c5eb78

labels:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/component: agent-collector
component: agent-collector

spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ metadata:
name: example-opentelemetry-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.110.2
helm.sh/chart: opentelemetry-collector-0.110.3
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.114.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: agent-collector
Loading