Skip to content

Commit

Permalink
feat: add migration solution to use telemetry-controller
Browse files Browse the repository at this point in the history
Signed-off-by: Bence Csati <[email protected]>
  • Loading branch information
csatib02 committed Dec 13, 2024
1 parent b38428a commit d08e259
Show file tree
Hide file tree
Showing 24 changed files with 703 additions and 121 deletions.
9 changes: 9 additions & 0 deletions charts/logging-operator/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dependencies:
- name: logging-operator-crds
repository: ""
version: 0.0.0
- name: telemetry-controller
repository: oci://ghcr.io/kube-logging/helm-charts
version: 0.0.13
digest: sha256:e760bc606b1ce484a13b0382a6c67e6b5511066c02b5296759f64d4f7ee50ef0
generated: "2024-12-06T09:31:12.29452+01:00"
4 changes: 4 additions & 0 deletions charts/logging-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ dependencies:
- name: logging-operator-crds
version: 0.0.0
condition: logging-operator-crds.install
- name: telemetry-controller
version: 0.0.13
repository: oci://ghcr.io/kube-logging/helm-charts
condition: telemetry-controller.install
1 change: 1 addition & 0 deletions charts/logging-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Use `createCustomResource=false` with Helm v3 to avoid trying to create CRDs fro
| createCustomResource | bool | `false` | Deploy CRDs used by Logging Operator. |
| 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) |
| logging-operator-crds.annotations | object | `{}` | Annotations to be added to all CRDs |
| telemetry-controller.install | bool | `false` | Toggle to install and upgrade Telemetry Controller from a subchart. |
| http.port | int | `8080` | HTTP listen port number. |
| http.service | object | `{"annotations":{},"clusterIP":"None","labels":{},"type":"ClusterIP"}` | Service definition for query http service. |
| rbac.enabled | bool | `true` | Create rbac service account and roles. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,9 @@ spec:
type: object
controlNamespace:
type: string
x-kubernetes-validations:
- message: Value is immutable, please recreate the resource
rule: self == oldSelf
image:
properties:
imagePullSecrets:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ spec:
type: object
controlNamespace:
type: string
x-kubernetes-validations:
- message: Value is immutable, please recreate the resource
rule: self == oldSelf
defaultFlow:
properties:
filters:
Expand Down Expand Up @@ -12593,6 +12596,39 @@ spec:
type: string
type: object
type: array
routeConfig:
properties:
disableLoggingRoute:
type: boolean
enableTelemetryControllerRoute:
type: boolean
tenantLabels:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
type: object
type: object
x-kubernetes-map-type: atomic
type: object
skipInvalidResources:
type: boolean
syslogNG:
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ spec:
type: object
controlNamespace:
type: string
x-kubernetes-validations:
- message: Value is immutable, please recreate the resource
rule: self == oldSelf
image:
properties:
imagePullSecrets:
Expand Down
36 changes: 36 additions & 0 deletions charts/logging-operator/crds/logging.banzaicloud.io_loggings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ spec:
type: object
controlNamespace:
type: string
x-kubernetes-validations:
- message: Value is immutable, please recreate the resource
rule: self == oldSelf
defaultFlow:
properties:
filters:
Expand Down Expand Up @@ -12590,6 +12593,39 @@ spec:
type: string
type: object
type: array
routeConfig:
properties:
disableLoggingRoute:
type: boolean
enableTelemetryControllerRoute:
type: boolean
tenantLabels:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
type: object
type: object
x-kubernetes-map-type: atomic
type: object
skipInvalidResources:
type: boolean
syslogNG:
Expand Down
16 changes: 16 additions & 0 deletions charts/logging-operator/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -243,4 +243,20 @@ rules:
- patch
- update
- watch
- apiGroups:
- telemetry.kube-logging.dev
resources:
- bridges
- collectors
- outputs
- subscriptions
- tenants
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
{{- end }}
5 changes: 5 additions & 0 deletions charts/logging-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ logging-operator-crds:
# -- Annotations to be added to all CRDs
annotations: {}

## Telemetry Controller defined as a dependency chart
telemetry-controller:
# -- Toggle to install and upgrade Telemetry Controller from a subchart.
install: false

http:
# -- HTTP listen port number.
port: 8080
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ spec:
type: object
controlNamespace:
type: string
x-kubernetes-validations:
- message: Value is immutable, please recreate the resource
rule: self == oldSelf
image:
properties:
imagePullSecrets:
Expand Down
36 changes: 36 additions & 0 deletions config/crd/bases/logging.banzaicloud.io_loggings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ spec:
type: object
controlNamespace:
type: string
x-kubernetes-validations:
- message: Value is immutable, please recreate the resource
rule: self == oldSelf
defaultFlow:
properties:
filters:
Expand Down Expand Up @@ -12590,6 +12593,39 @@ spec:
type: string
type: object
type: array
routeConfig:
properties:
disableLoggingRoute:
type: boolean
enableTelemetryControllerRoute:
type: boolean
tenantLabels:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
type: string
values:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
type: object
type: object
x-kubernetes-map-type: atomic
type: object
skipInvalidResources:
type: boolean
syslogNG:
Expand Down
16 changes: 16 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,19 @@ rules:
- patch
- update
- watch
- apiGroups:
- telemetry.kube-logging.dev
resources:
- bridges
- collectors
- outputs
- subscriptions
- tenants
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
Loading

0 comments on commit d08e259

Please sign in to comment.