Skip to content

Commit 8158fa9

Browse files
committed
feat: add migration solution to use telemetry-controller
Signed-off-by: Bence Csati <bence.csati@axoflow.com>
1 parent 213e265 commit 8158fa9

File tree

24 files changed

+639
-121
lines changed

24 files changed

+639
-121
lines changed

charts/logging-operator/Chart.lock

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
dependencies:
2+
- name: logging-operator-crds
3+
repository: ""
4+
version: 0.0.0
5+
- name: telemetry-controller
6+
repository: oci://ghcr.io/kube-logging/helm-charts
7+
version: 0.0.13
8+
digest: sha256:e760bc606b1ce484a13b0382a6c67e6b5511066c02b5296759f64d4f7ee50ef0
9+
generated: "2024-12-06T09:31:12.29452+01:00"

charts/logging-operator/Chart.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ dependencies:
1717
- name: logging-operator-crds
1818
version: 0.0.0
1919
condition: logging-operator-crds.install
20+
- name: telemetry-controller
21+
version: 0.0.13
22+
repository: oci://ghcr.io/kube-logging/helm-charts
23+
condition: telemetry-controller.install

charts/logging-operator/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Use `createCustomResource=false` with Helm v3 to avoid trying to create CRDs fro
5050
| createCustomResource | bool | `false` | Deploy CRDs used by Logging Operator. |
5151
| logging-operator-crds.install | bool | `false` | Toggle to install and upgrade CRDs from a subchart. Make sure to use it with `--skip-crds` to avoid conflicts. [More info about limitations on CRDs in Helm 3](https://helm.sh/docs/topics/charts/#limitations-on-crds) |
5252
| logging-operator-crds.annotations | object | `{}` | Annotations to be added to all CRDs |
53+
| telemetry-controller.install | bool | `false` | Toggle to install and upgrade Telemetry Controller from a subchart. |
5354
| http.port | int | `8080` | HTTP listen port number. |
5455
| http.service | object | `{"annotations":{},"clusterIP":"None","labels":{},"type":"ClusterIP"}` | Service definition for query http service. |
5556
| rbac.enabled | bool | `true` | Create rbac service account and roles. |

charts/logging-operator/charts/logging-operator-crds/templates/logging-extensions.banzaicloud.io_eventtailers.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,9 @@ spec:
333333
type: object
334334
controlNamespace:
335335
type: string
336+
x-kubernetes-validations:
337+
- message: Value is immutable, please recreate the resource
338+
rule: self == oldSelf
336339
image:
337340
properties:
338341
imagePullSecrets:

charts/logging-operator/charts/logging-operator-crds/templates/logging.banzaicloud.io_loggings.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ spec:
8484
type: object
8585
controlNamespace:
8686
type: string
87+
x-kubernetes-validations:
88+
- message: Value is immutable, please recreate the resource
89+
rule: self == oldSelf
8790
defaultFlow:
8891
properties:
8992
filters:
@@ -12597,6 +12600,17 @@ spec:
1259712600
type: string
1259812601
type: object
1259912602
type: array
12603+
routeConfig:
12604+
properties:
12605+
disableLoggingRoute:
12606+
type: boolean
12607+
enableTelemetryControllerRoute:
12608+
type: boolean
12609+
tenantLabels:
12610+
additionalProperties:
12611+
type: string
12612+
type: object
12613+
type: object
1260012614
skipInvalidResources:
1260112615
type: boolean
1260212616
syslogNG:
153 KB
Binary file not shown.

charts/logging-operator/crds/logging-extensions.banzaicloud.io_eventtailers.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ spec:
330330
type: object
331331
controlNamespace:
332332
type: string
333+
x-kubernetes-validations:
334+
- message: Value is immutable, please recreate the resource
335+
rule: self == oldSelf
333336
image:
334337
properties:
335338
imagePullSecrets:

charts/logging-operator/crds/logging.banzaicloud.io_loggings.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ spec:
8181
type: object
8282
controlNamespace:
8383
type: string
84+
x-kubernetes-validations:
85+
- message: Value is immutable, please recreate the resource
86+
rule: self == oldSelf
8487
defaultFlow:
8588
properties:
8689
filters:
@@ -12594,6 +12597,17 @@ spec:
1259412597
type: string
1259512598
type: object
1259612599
type: array
12600+
routeConfig:
12601+
properties:
12602+
disableLoggingRoute:
12603+
type: boolean
12604+
enableTelemetryControllerRoute:
12605+
type: boolean
12606+
tenantLabels:
12607+
additionalProperties:
12608+
type: string
12609+
type: object
12610+
type: object
1259712611
skipInvalidResources:
1259812612
type: boolean
1259912613
syslogNG:

charts/logging-operator/templates/clusterrole.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,4 +243,20 @@ rules:
243243
- patch
244244
- update
245245
- watch
246+
- apiGroups:
247+
- telemetry.kube-logging.dev
248+
resources:
249+
- bridges
250+
- collectors
251+
- outputs
252+
- subscriptions
253+
- tenants
254+
verbs:
255+
- create
256+
- delete
257+
- get
258+
- list
259+
- patch
260+
- update
261+
- watch
246262
{{- end }}

charts/logging-operator/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ logging-operator-crds:
4444
# -- Annotations to be added to all CRDs
4545
annotations: {}
4646

47+
## Telemetry Controller defined as a dependency chart
48+
telemetry-controller:
49+
# -- Toggle to install and upgrade Telemetry Controller from a subchart.
50+
install: false
51+
4752
http:
4853
# -- HTTP listen port number.
4954
port: 8080

0 commit comments

Comments
 (0)