Skip to content

Commit

Permalink
bump telemetry to 0.5.2 (#13289)
Browse files Browse the repository at this point in the history
* bump telemetry to 0.5.2

* add tests
  • Loading branch information
xrstf committed Apr 17, 2024
1 parent a0d63c4 commit ab54b86
Show file tree
Hide file tree
Showing 7 changed files with 300 additions and 7 deletions.
1 change: 1 addition & 0 deletions charts/telemetry/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test/
2 changes: 1 addition & 1 deletion charts/telemetry/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ apiVersion: v1
name: telemetry
description: A Helm chart to install Kubermatic telemetry agents
version: 9.9.9-dev
appVersion: v0.5.0
appVersion: v0.5.2
keywords:
- telemetry
maintainers:
Expand Down
6 changes: 3 additions & 3 deletions charts/telemetry/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
initContainers:
- name: kubernetes-agent
image: "{{ .Values.telemetry.kubernetesAgent.image.repository }}:{{ .Values.telemetry.kubernetesAgent.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.telemetry.kubernetesAgent.image.pullPolicy }}
imagePullPolicy: {{ default .Values.telemetry.kubernetesAgent.image.pullPolicy "IfNotPresent" }}
command:
- kubernetes-agent
args:
Expand All @@ -45,7 +45,7 @@ spec:
{{- toYaml .Values.telemetry.resources | nindent 16 }}
- name: kubermatic-agent
image: "{{ .Values.telemetry.kubermaticAgent.image.repository }}:{{ .Values.telemetry.kubermaticAgent.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.telemetry.kubermaticAgent.image.pullPolicy }}
imagePullPolicy: {{ default .Values.telemetry.kubermaticAgent.image.pullPolicy "IfNotPresent" }}
command:
- kubermatic-agent
args:
Expand All @@ -61,7 +61,7 @@ spec:
containers:
- name: reporter
image: "{{ .Values.telemetry.reporter.image.repository }}:{{ .Values.telemetry.reporter.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.telemetry.reporter.image.pullPolicy }}
imagePullPolicy: {{ default .Values.telemetry.reporter.image.pullPolicy "IfNotPresent" }}
command:
- reporter
args:
Expand Down
16 changes: 16 additions & 0 deletions charts/telemetry/test/default.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2022 The Kubermatic Kubernetes Platform contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

telemetry:
uuid: "fake-uuid-here"
275 changes: 275 additions & 0 deletions charts/telemetry/test/default.yaml.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,275 @@
---
# Source: telemetry/templates/serviceaccount.yaml
# Copyright 2021 The Kubermatic Kubernetes Platform contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v1
kind: ServiceAccount
metadata:
name: release-name-agent-sa
namespace: default
---
# Source: telemetry/templates/secret.yaml
# Copyright 2021 The Kubermatic Kubernetes Platform contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v1
kind: Secret
metadata:
name: release-name-client-uuid
namespace: default
type: Opaque
data:
uuid: ZmFrZS11dWlkLWhlcmU=
---
# Source: telemetry/templates/kubermatic-role.yaml
# Copyright 2021 The Kubermatic Kubernetes Platform contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: release-name-kubermatic-agent-role
rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- apiGroups:
- kubermatic.k8c.io
resources:
- clusters
- kubermaticconfigurations
- projects
- seeds
- users
- usersshkeys
verbs:
- list
---
# Source: telemetry/templates/kubernetes-role.yaml
# Copyright 2021 The Kubermatic Kubernetes Platform contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: release-name-kubernetes-agent-role
rules:
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- watch
---
# Source: telemetry/templates/kubermatic-rolebinding.yml
# Copyright 2021 The Kubermatic Kubernetes Platform contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: release-name-kubermatic-agent-role
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: release-name-kubermatic-agent-role
subjects:
- kind: ServiceAccount
name: release-name-agent-sa
namespace: default
---
# Source: telemetry/templates/kubernetes-rolebinding.yml
# Copyright 2021 The Kubermatic Kubernetes Platform contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: release-name-kubernetes-agent-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: release-name-kubernetes-agent-role
subjects:
- kind: ServiceAccount
name: release-name-agent-sa
namespace: default
---
# Source: telemetry/templates/cronjob.yaml
# Copyright 2021 The Kubermatic Kubernetes Platform contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: batch/v1
kind: CronJob
metadata:
name: release-name-job
namespace: default
spec:
schedule: "0 0 * * *"
jobTemplate:
spec:
template:
metadata:
labels:
control-plane: release-name
spec:
serviceAccountName: release-name-agent-sa
initContainers:
- name: kubernetes-agent
image: "quay.io/kubermatic/telemetry-agent:v0.5.2"
imagePullPolicy: IfNotPresent
command:
- kubernetes-agent
args:
- "--record-dir=$(RECORD_DIR)"
env:
- name: RECORD_DIR
value: "/records"
volumeMounts:
- name: records
mountPath: "/records"
resources:
limits:
cpu: "1"
memory: 100Mi
requests:
cpu: "0.5"
memory: 100Mi
- name: kubermatic-agent
image: "quay.io/kubermatic/telemetry-agent:v0.5.2"
imagePullPolicy: IfNotPresent
command:
- kubermatic-agent
args:
- "--record-dir=$(RECORD_DIR)"
env:
- name: RECORD_DIR
value: "/records"
volumeMounts:
- name: records
mountPath: "/records"
resources:
limits:
cpu: "1"
memory: 100Mi
requests:
cpu: "0.5"
memory: 100Mi
containers:
- name: reporter
image: "quay.io/kubermatic/telemetry-agent:v0.5.2"
imagePullPolicy: IfNotPresent
command:
- reporter
args:
- http
- --client-uuid=$(CLIENT_UUID)
- --url=$(URL)
- --record-dir=$(RECORD_DIR)
env:
- name: RECORD_DIR
value: "/records"
- name: URL
value: "https://telemetry.k8c.io/api/v1"
- name: CLIENT_UUID
valueFrom:
secretKeyRef:
name: release-name-client-uuid
key: uuid
volumeMounts:
- mountPath: "/records"
name: records
resources:
limits:
cpu: "1"
memory: 100Mi
requests:
cpu: "0.5"
memory: 100Mi
volumes:
- name: records
emptyDir: {}
restartPolicy: OnFailure
1 change: 1 addition & 0 deletions charts/telemetry/test/test.sh
6 changes: 3 additions & 3 deletions charts/telemetry/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ telemetry:
kubermaticAgent:
image:
repository: quay.io/kubermatic/telemetry-agent
tag: "v0.5.0"
tag: "v0.5.2"

kubernetesAgent:
image:
repository: quay.io/kubermatic/telemetry-agent
tag: "v0.5.0"
tag: "v0.5.2"

reporter:
image:
repository: quay.io/kubermatic/telemetry-agent
tag: "v0.5.0"
tag: "v0.5.2"

resources:
limits:
Expand Down

0 comments on commit ab54b86

Please sign in to comment.